]> sjero.net Git - linphone/commitdiff
Add API to control DCCP/UDP, CCID, and video output destination
authorSamuel Jero <sj323707@ohio.edu>
Wed, 30 Jan 2013 23:06:00 +0000 (18:06 -0500)
committerSamuel Jero <sj323707@ohio.edu>
Wed, 30 Jan 2013 23:06:00 +0000 (18:06 -0500)
coreapi/linphonecall.c
coreapi/linphonecore.c
coreapi/linphonecore.h
mediastreamer2
oRTP

index 9ad1e177615eda7cd5c78d45c49e197228cb3c9f..f5c13251b78a30abd38e940c48734c69d05baed3 100644 (file)
@@ -1075,7 +1075,12 @@ 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));
+       if(linphone_core_get_dccp(lc)){
+               call->audiostream=audiostream=audio_stream_dccp_new(call->audio_port,call->audio_port+1,
+                               linphone_core_ipv6_enabled(lc),linphone_core_get_ccid(lc));
+       }else{
+               call->audiostream=audiostream=audio_stream_new(call->audio_port,call->audio_port+1,linphone_core_ipv6_enabled(lc));
+       }
        dscp=linphone_core_get_audio_dscp(lc);
        if (dscp!=-1)
                audio_stream_set_dscp(audiostream,dscp);
@@ -1138,7 +1143,15 @@ void linphone_call_init_video_stream(LinphoneCall *call){
                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));
+               if(linphone_core_get_dccp(lc)){
+                       call->videostream=video_stream_dccp_new(call->video_port,call->video_port+1,
+                                       linphone_core_ipv6_enabled(lc),linphone_core_get_ccid(lc));
+               }else{
+                       call->videostream=video_stream_new(call->video_port,call->video_port+1,linphone_core_ipv6_enabled(lc));
+               }
+               if(lp_config_get_int(lc->config,"video", "outfile", 0)){
+                       video_stream_set_display_name(call->videostream, "MSFileRecord");
+               }
                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 4ec64b418b2f6856d4fa47b3c8605e543a419bc6..1f1915811d20f0bbdcafa283c52a5c4c6301ebc8 100644 (file)
@@ -3989,6 +3989,9 @@ static void toggle_video_preview(LinphoneCore *lc, bool_t val){
        if (val){
                if (lc->previewstream==NULL){
                        lc->previewstream=video_preview_new();
+                       if(lp_config_get_int(lc->config,"video", "outfile", 0)){
+                               video_stream_set_display_name(lc->previewstream, "MSFileRecord");
+                       }
                        video_preview_set_size(lc->previewstream,lc->video_conf.vsize);
                        if (lc->video_conf.displaytype)
                                video_preview_set_display_filter_name(lc->previewstream,lc->video_conf.displaytype);
@@ -5414,3 +5417,27 @@ void linphone_core_set_video_dscp(LinphoneCore *lc, int dscp){
 int linphone_core_get_video_dscp(const LinphoneCore *lc){
        return lp_config_get_int(lc->config,"rtp","video_dscp",0x2e);
 }
+
+void linphone_core_set_video_out_record(const LinphoneCore *lc, bool_t val){
+       return lp_config_set_int(lc->config,"video", "outfile", val);
+}
+
+bool_t linphone_core_get_video_out_record(const LinphoneCore *lc){
+       return lp_config_get_int(lc->config,"video", "outfile", 0);
+}
+
+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 f1a9174c8e3ad0c03447d8a01ad6e053e7676359..bbb1bb73e1a5f971b5c214b0ff5c7ced7e41ae94 100644 (file)
@@ -1444,6 +1444,15 @@ 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_video_out_record(const LinphoneCore *lc, bool_t val);
+bool_t linphone_core_get_video_out_record(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 981e8d32e7a66b4c9795e8471fb7c7e323f90d28..a15b4c24e8a1e45595f92273675c3cfb860b732e 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 981e8d32e7a66b4c9795e8471fb7c7e323f90d28
+Subproject commit a15b4c24e8a1e45595f92273675c3cfb860b732e
diff --git a/oRTP b/oRTP
index 3e65fd320e55208720daefe917b87261928caa46..848b4c95b969dd8ee903d53648ce35904d8082ea 160000 (submodule)
--- a/oRTP
+++ b/oRTP
@@ -1 +1 @@
-Subproject commit 3e65fd320e55208720daefe917b87261928caa46
+Subproject commit 848b4c95b969dd8ee903d53648ce35904d8082ea