From: Eunhye Choi Date: Wed, 5 Jul 2023 08:40:36 +0000 (+0900) Subject: [0.6.285] fix hls prepare issue X-Git-Tag: accepted/tizen/unified/20230711.091722^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git;a=commitdiff_plain;h=b7a03314339be1baad6690707119db59d95cce00 [0.6.285] fix hls prepare issue - add video parser to avoid prepare error - if the video parser is not added in parsebin which is in adaptivedemux, it get error during prepare. Change-Id: Iba33fd6efee16d2fa36c7cc43dfd28080cf09a4a --- diff --git a/packaging/libmm-player.spec b/packaging/libmm-player.spec index 0e183cb..0261739 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.284 +Version: 0.6.285 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_player_gst.c b/src/mm_player_gst.c index 88f4f8e..27498b7 100644 --- a/src/mm_player_gst.c +++ b/src/mm_player_gst.c @@ -2991,13 +2991,16 @@ __mmplayer_gst_select_stream (GstElement * uridecodebin, GstStreamCollection * c if (player->track[MM_PLAYER_TRACK_TYPE_VIDEO].total_track_num >= 1) goto EXIT; - mm_attrs_get_int_by_name(player->attrs, "display_surface_type", &stype); - - /* don't make video because of not required */ - if ((stype == MM_DISPLAY_SURFACE_NULL) && - (!player->set_mode.video_export)) { - LOGD("no need video decoding, skip video stream"); - goto EXIT; + // FIXME: it cause block during preparing + if ((!MMPLAYER_IS_HTTP_LIVE_STREAMING(player)) && (!MMPLAYER_IS_DASH_STREAMING(player))) { + mm_attrs_get_int_by_name(player->attrs, "display_surface_type", &stype); + + /* don't make video because of not required */ + if ((stype == MM_DISPLAY_SURFACE_NULL) && + (!player->set_mode.video_export)) { + LOGD("no need video decoding, skip video stream"); + goto EXIT; + } } if (caps_structure) { diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index 2b7bd0a..c1e1518 100644 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -7567,14 +7567,19 @@ _mmplayer_gst_decode_autoplug_select(GstElement *bin, GstPad *pad, gint stype = 0; gint width = 0; GstStructure *str = NULL; - mm_attrs_get_int_by_name(player->attrs, "display_surface_type", &stype); - /* don't make video because of not required */ - if ((stype == MM_DISPLAY_SURFACE_NULL) && - (!player->set_mode.video_export)) { - LOGD("no need video decoding, expose pad"); - result = GST_AUTOPLUG_SELECT_EXPOSE; - goto DONE; + /* parsebin in adaptivedemux get error if there is no parser */ + if ((!g_strrstr(GST_ELEMENT_NAME(bin), "parsebin")) || + ((!MMPLAYER_IS_HTTP_LIVE_STREAMING(player)) && (!MMPLAYER_IS_DASH_STREAMING(player)))) { + mm_attrs_get_int_by_name(player->attrs, "display_surface_type", &stype); + + /* don't make video because of not required */ + if ((stype == MM_DISPLAY_SURFACE_NULL) && + (!player->set_mode.video_export)) { + LOGD("no need video decoding, expose pad"); + result = GST_AUTOPLUG_SELECT_EXPOSE; + goto DONE; + } } /* get w/h for omx state-tune */