diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index b420dbd3c..8519c08cb 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 e363192ac..7517dca55 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -1401,6 +1401,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 5b7873ee3..ff9b20e9f 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 5b7873ee3cbc460138015ba244330d99aa861d7f +Subproject commit ff9b20e9fbccb0c3ca401544d2cdc39dd8ee629e diff --git a/oRTP b/oRTP index 2c37d1205..462296433 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 2c37d1205e9dd0e30a918ccf666ab217b66c2899 +Subproject commit 462296433f10bd84cb605edb0b38d16a4cd81d9e