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:
__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;
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) {
__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 */
__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);
/* 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);