]> sjero.net Git - linphone/commitdiff
Linphone DCCP Support for-linphone
authorSamuel Jero <sj323707@ohio.edu>
Tue, 11 Jun 2013 00:35:48 +0000 (20:35 -0400)
committerSamuel Jero <sj323707@ohio.edu>
Tue, 11 Jun 2013 18:11:57 +0000 (14:11 -0400)
Add support for calls using RTP over the Datagram Congestion Control Protocol (DCCP) instead of only RTP over UDP. This updates oRTP and mediastreamer2 to support DCCP and includes API and configuration changes to allow selection of transport portocol.

console/sipomatic.c
coreapi/conference.c
coreapi/linphonecall.c
coreapi/linphonecore.c
coreapi/linphonecore.h
mediastreamer2
oRTP

index e7a1c6a88830640b0d3315a130a05cbc0d5f6a53..5e436becdcd00157f6324d027c0340fc598372ae 100644 (file)
@@ -97,7 +97,7 @@ void call_accept(Call *call)
        osip_message_set_content_type(msg,"application/sdp");
        osip_message_set_body(msg,call->sdpc->answerstr,strlen(call->sdpc->answerstr));
        eXosip_call_send_answer(call->tid,200,msg);
-       call->audio_stream=audio_stream_new(call->audio.localport,call->audio.localport+1,call->root->ipv6);
+       call->audio_stream=audio_stream_new(call->audio.localport,call->audio.localport+1,call->root->ipv6, FALSE, 0);
        audio_stream_start_with_files(call->audio_stream, call->profile,
                                call->audio.remaddr,call->audio.remoteport,call->audio.remoteport+1,
                                 call->audio.pt,20,hellofile,record_file);
index 0d8ea39a0fdd0e6b44f76581961744a63d5e4ff7..9c75b57f1fdeddc989074a485cb3cf0cd56c1235 100644 (file)
@@ -126,7 +126,7 @@ static RtpProfile *make_dummy_profile(int samplerate){
 static void add_local_endpoint(LinphoneConference *conf,LinphoneCore *lc){
        /*create a dummy audiostream in order to extract the local part of it */
        /* network address and ports have no meaning and are not used here. */
-       AudioStream *st=audio_stream_new(65000,65001,FALSE);
+       AudioStream *st=audio_stream_new(65000,65001,FALSE,FALSE,0);
        MSSndCard *playcard=lc->sound_conf.lsd_card ? 
                        lc->sound_conf.lsd_card : lc->sound_conf.play_sndcard;
        MSSndCard *captcard=lc->sound_conf.capt_sndcard;
index d5366e5c66a3da90a322392b1adaa029a39626b9..389a7a6b1b4eaf55a947d7c98f6a08aaf10a1d03 100644 (file)
@@ -1198,7 +1198,9 @@ void linphone_call_init_audio_stream(LinphoneCall *call){
        int dscp;
 
        if (call->audiostream != NULL) return;
-       call->audiostream=audiostream=audio_stream_new(call->audio_port,call->audio_port+1,linphone_core_ipv6_enabled(lc));
+       call->audiostream=audiostream=audio_stream_new(call->audio_port,call->audio_port+1,
+                                                                               linphone_core_ipv6_enabled(lc),linphone_core_get_dccp(lc),
+                                                                               linphone_core_get_ccid(lc));
        dscp=linphone_core_get_audio_dscp(lc);
        if (dscp!=-1)
                audio_stream_set_dscp(audiostream,dscp);
@@ -1260,8 +1262,9 @@ void linphone_call_init_video_stream(LinphoneCall *call){
        if ((lc->video_conf.display || lc->video_conf.capture) && call->params.has_video){
                int video_recv_buf_size=lp_config_get_int(lc->config,"video","recv_buf_size",0);
                int dscp=linphone_core_get_video_dscp(lc);
-               
-               call->videostream=video_stream_new(call->video_port,call->video_port+1,linphone_core_ipv6_enabled(lc));
+               call->videostream=video_stream_new(call->video_port,call->video_port+1,
+                                                                               linphone_core_ipv6_enabled(lc),linphone_core_get_dccp(lc),
+                                                                               linphone_core_get_ccid(lc));
                if (dscp!=-1)
                        video_stream_set_dscp(call->videostream,dscp);
                video_stream_enable_display_filter_auto_rotate(call->videostream, lp_config_get_int(lc->config,"video","display_filter_auto_rotate",0));
index 202519d76358fdd346be84d3c1274a1263502300..f9b5c0703ecd7ac0df2a4d1a62086d24cdb09979 100644 (file)
@@ -5866,7 +5866,6 @@ int linphone_core_get_video_dscp(const LinphoneCore *lc){
        return lp_config_get_int(lc->config,"rtp","video_dscp",0x2e);
 }
 
-
 /**
  * Sets the database filename where chat messages will be stored.
  * If the file does not exist, it will be created.
@@ -5885,4 +5884,18 @@ void linphone_core_set_chat_database_path(LinphoneCore *lc, const char *path){
        }
 }
 
+void linphone_core_set_dccp(const LinphoneCore *lc, bool_t val){
+       return lp_config_set_int(lc->config,"rtp", "dccp", val);
+}
+
+bool_t linphone_core_get_dccp(const LinphoneCore *lc){
+       return lp_config_get_int(lc->config,"rtp", "dccp", 0);
+}
 
+void linphone_core_set_ccid(const LinphoneCore *lc, int val){
+       return lp_config_set_int(lc->config,"rtp", "ccid", val);
+}
+
+int linphone_core_get_ccid(const LinphoneCore *lc){
+       return lp_config_get_int(lc->config,"rtp", "ccid", 3);
+}
index 50686a2c973934662dd43c8c3c958fe72240f111..f612f1dac0b30edbe0dccf3a4dd4cc54c5afb058 100644 (file)
@@ -1531,6 +1531,11 @@ int linphone_core_get_audio_dscp(const LinphoneCore *lc);
 void linphone_core_set_video_dscp(LinphoneCore *lc, int dscp);
 int linphone_core_get_video_dscp(const LinphoneCore *lc);
 
+void linphone_core_set_dccp(const LinphoneCore *lc, bool_t val);
+bool_t linphone_core_get_dccp(const LinphoneCore *lc);
+
+void linphone_core_set_ccid(const LinphoneCore *lc, int val);
+int linphone_core_get_ccid(const LinphoneCore *lc);
 
 #ifdef __cplusplus
 }
index ff9b20e9fbccb0c3ca401544d2cdc39dd8ee629e..1fda4f80bb1af07dd60c2ec733d57eff821d6f03 160000 (submodule)
@@ -1 +1 @@
-Subproject commit ff9b20e9fbccb0c3ca401544d2cdc39dd8ee629e
+Subproject commit 1fda4f80bb1af07dd60c2ec733d57eff821d6f03
diff --git a/oRTP b/oRTP
index 462296433f10bd84cb605edb0b38d16a4cd81d9e..e7ebed986b3049f19259d703a1b0af7b467498ec 160000 (submodule)
--- a/oRTP
+++ b/oRTP
@@ -1 +1 @@
-Subproject commit 462296433f10bd84cb605edb0b38d16a4cd81d9e
+Subproject commit e7ebed986b3049f19259d703a1b0af7b467498ec