diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index f90124fd0..13529889e 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -4825,6 +4825,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" }, diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 5cbffe51c..c8494434f 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -1413,6 +1413,17 @@ void linphone_core_use_preview_window(LinphoneCore *lc, bool_t yesno); int linphone_core_get_device_rotation(LinphoneCore *lc ); void linphone_core_set_device_rotation(LinphoneCore *lc, int rotation); +/** + * @brief Get the camera sensor rotation. + * + * This is needed on some mobile platforms to get the number of degrees the camera sensor + * is rotated relative to the screen. + * + * @param lc The linphone core related to the operation + * @return The camera sensor rotation in degrees (0 to 360) or -1 if it could not be retrieved + */ +int linphone_core_get_camera_sensor_rotation(LinphoneCore *lc); + /* start or stop streaming video in case of embedded window */ void linphone_core_show_video(LinphoneCore *lc, bool_t show); diff --git a/coreapi/message_storage.c b/coreapi/message_storage.c index deed140c7..765543f7a 100644 --- a/coreapi/message_storage.c +++ b/coreapi/message_storage.c @@ -83,7 +83,7 @@ void linphone_sql_request_message(sqlite3 *db,const char *stmt,LinphoneChatRoom int ret; ret=sqlite3_exec(db,stmt,callback,cr,&errmsg); if(ret != SQLITE_OK) { - printf("Error in creation: %s.\n", errmsg); + ms_error("Error in creation: %s.\n", errmsg); sqlite3_free(errmsg); } } @@ -197,7 +197,7 @@ void linphone_create_table(sqlite3* db){ ret=sqlite3_exec(db,"CREATE TABLE if not exists history (id INTEGER PRIMARY KEY AUTOINCREMENT, localContact TEXT NOT NULL, remoteContact TEXT NOT NULL, direction INTEGER, message TEXT, time TEXT NOT NULL, read INTEGER, status INTEGER);", 0,0,&errmsg); if(ret != SQLITE_OK) { - printf("Error in creation: %s.\n", errmsg); + ms_error("Error in creation: %s.\n", errmsg); sqlite3_free(errmsg); } } @@ -209,7 +209,7 @@ void linphone_core_message_storage_init(LinphoneCore *lc){ ret=sqlite3_open(lc->chat_db_file,&db); if(ret != SQLITE_OK) { errmsg=sqlite3_errmsg(db); - printf("Error in the opening: %s.\n", errmsg); + ms_error("Error in the opening: %s.\n", errmsg); sqlite3_close(db); } linphone_create_table(db); diff --git a/gtk/main.c b/gtk/main.c index e914e42bd..1aa2e287c 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -568,7 +568,7 @@ static gboolean linphone_gtk_iterate(LinphoneCore *lc){ if (id!=0){ ms_message("Updating window decorations"); #ifndef WIN32 - w=gdk_window_foreign_new(id); + w=gdk_window_foreign_new((GdkNativeWindow)id); #else w=gdk_window_foreign_new((HANDLE)id); #endif @@ -587,7 +587,7 @@ static gboolean linphone_gtk_iterate(LinphoneCore *lc){ if (id!=0){ ms_message("Updating window decorations for preview"); #ifndef WIN32 - w=gdk_window_foreign_new(id); + w=gdk_window_foreign_new((GdkNativeWindow)id); #else w=gdk_window_foreign_new((HANDLE)id); #endif diff --git a/mediastreamer2 b/mediastreamer2 index dd0116eb8..3f06cd60f 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit dd0116eb8e26f128a2366b38115b602def4b4073 +Subproject commit 3f06cd60f1864b8c811e0f4e4590991802ce5ea7 diff --git a/oRTP b/oRTP index 2c37d1205..1a103971b 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 2c37d1205e9dd0e30a918ccf666ab217b66c2899 +Subproject commit 1a103971b84d39510ad14f327bd6834b3d88063f