]> sjero.net Git - linphone/blobdiff - coreapi/linphonecore.c
Add linphone_core_get_camera_sensor_rotation().
[linphone] / coreapi / linphonecore.c
index f60640160f3f9cb7d16a989afb4479e61100e133..202519d76358fdd346be84d3c1274a1263502300 100644 (file)
@@ -825,6 +825,7 @@ typedef struct codec_desc{
 }codec_desc_t;
 
 static codec_desc_t codec_pref_order[]={
+       {"opus", 48000},
        {"SILK", 16000},
        {"speex", 16000},
        {"speex", 8000},
@@ -1287,6 +1288,7 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta
        linphone_core_assign_payload_type(lc,&payload_type_g729,18,"annexb=no");
        linphone_core_assign_payload_type(lc,&payload_type_aaceld_22k,-1,"config=F8EE2000; constantDuration=512;  indexDeltaLength=3; indexLength=3; mode=AAC-hbr; profile-level-id=76; sizeLength=13; streamType=5");
        linphone_core_assign_payload_type(lc,&payload_type_aaceld_44k,-1,"config=F8E82000; constantDuration=512;  indexDeltaLength=3; indexLength=3; mode=AAC-hbr; profile-level-id=76; sizeLength=13; streamType=5");
+       linphone_core_assign_payload_type(lc,&payload_type_opus,-1,"useinbandfec=1; usedtx=1");
        linphone_core_handle_static_payloads(lc);
        
        ms_init();
@@ -4742,6 +4744,16 @@ void linphone_core_set_device_rotation(LinphoneCore *lc, int rotation) {
 #endif
 }
 
+int linphone_core_get_camera_sensor_rotation(LinphoneCore *lc) {
+#ifdef VIDEO_ENABLED
+       LinphoneCall *call = linphone_core_get_current_call(lc);
+       if ((call != NULL) && (call->videostream != NULL)) {
+               return video_stream_get_camera_sensor_rotation(call->videostream);
+       }
+#endif
+       return -1;
+}
+
 static MSVideoSizeDef supported_resolutions[]={
 #ifdef ENABLE_HD
        {       {MS_VIDEO_SIZE_1080P_W,MS_VIDEO_SIZE_1080P_H}   ,       "1080p" },