From: Hyunil Date: Tue, 9 Jan 2018 07:05:16 +0000 (+0900) Subject: [0.6.86] Change condition for update_all_param with ROI mode X-Git-Tag: submit/tizen/20180109.083155^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ee9d4b179bc9dcc76116ac1903cb085dba43711;p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git [0.6.86] Change condition for update_all_param with ROI mode Change-Id: I78bd9946a81ef06b6cc71a89ed1dcc45710d89dd Signed-off-by: Hyunil --- diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 617f5e4..d8e9874 100644 --- a/packaging/libmm-player.spec +++ b/packaging/libmm-player.spec @@ -1,6 +1,6 @@ Name: libmm-player Summary: Multimedia Framework Player Library -Version: 0.6.85 +Version: 0.6.86 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index 80d8ccd..9e17f92 100644 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -1019,9 +1019,8 @@ __mmplayer_handle_buffering_message(mm_player_t* player) case MM_PLAYER_STATE_PLAYING: /* rtsp streaming pause makes rtsp server stop sending data. */ - if (!MMPLAYER_IS_RTSP_STREAMING(player)) { + if (!MMPLAYER_IS_RTSP_STREAMING(player)) __gst_pause(player, TRUE); - } break; case MM_PLAYER_STATE_PAUSED: @@ -3879,7 +3878,6 @@ int __mmplayer_video_param_set_render_rectangle(mm_player_t* player) { MMHandleType attrs = 0; - int display_method = 0; void *handle = NULL; /*set wl_display*/ int wl_window_x = 0; @@ -3895,12 +3893,6 @@ __mmplayer_video_param_set_render_rectangle(mm_player_t* player) attrs = MMPLAYER_GET_ATTRS(player); MMPLAYER_RETURN_VAL_IF_FAIL(attrs, MM_ERROR_PLAYER_INTERNAL); - /* check roi mode is set */ - mm_attrs_get_int_by_name(attrs, "display_method", &display_method); - if (display_method != PLAYER_DISPLAY_MODE_DST_ROI) { - LOGE("must be set display-geometry-method to DISP_GEO_METHOD_CUSTOM_ROI before setting render rectangle"); - return MM_ERROR_PLAYER_INTERNAL; - } mm_attrs_get_data_by_name(attrs, "display_overlay", &handle); if (handle) { @@ -3955,6 +3947,8 @@ int __mmplayer_update_wayland_videosink_video_param(mm_player_t* player, char *param_name) { bool update_all_param = FALSE; + MMHandleType attrs = 0; + int display_method = 0; MMPLAYER_FENTER(); /* check video sinkbin is created */ @@ -3974,11 +3968,13 @@ __mmplayer_update_wayland_videosink_video_param(mm_player_t* player, char *param __mmplayer_video_param_set_display_overlay(player); if (update_all_param || !g_strcmp0(param_name, "display_method")) __mmplayer_video_param_set_display_method(player); - if (update_all_param || !g_strcmp0(param_name, "wl_window_render_x")) { - if (MM_ERROR_NONE != __mmplayer_video_param_set_render_rectangle(player)) { - if (!update_all_param) - return MM_ERROR_PLAYER_INTERNAL; - } + /* check roi mode is set */ + attrs = MMPLAYER_GET_ATTRS(player); + MMPLAYER_RETURN_VAL_IF_FAIL(attrs, MM_ERROR_PLAYER_INTERNAL); + mm_attrs_get_int_by_name(attrs, "display_method", &display_method); + if ((display_method == PLAYER_DISPLAY_MODE_DST_ROI) && (update_all_param || !g_strcmp0(param_name, "wl_window_render_x"))) { + if (MM_ERROR_NONE != __mmplayer_video_param_set_render_rectangle(player)) + return MM_ERROR_PLAYER_INTERNAL; } if (update_all_param || !g_strcmp0(param_name, "display_visible")) __mmplayer_video_param_set_display_visible(player); @@ -13326,11 +13322,11 @@ int _mmplayer_set_external_subtitle_path(MMHandleType hplayer, const char* filep /* filepath can be null in idle state */ if (filepath) { /* check file path */ - if ((path = strstr(filepath, "file://"))) { + if ((path = strstr(filepath, "file://"))) result = util_exist_file_path(path + 7); - } else { + else result = util_exist_file_path(filepath); - } + if (result != MM_ERROR_NONE) { LOGE("invalid subtitle path 0x%X", result);