[0.6.285] fix hls prepare issue 36/295336/2 accepted/tizen/unified/20230711.091722
authorEunhye Choi <eunhae1.choi@samsung.com>
Wed, 5 Jul 2023 08:40:36 +0000 (17:40 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Wed, 5 Jul 2023 11:23:39 +0000 (20:23 +0900)
- 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

packaging/libmm-player.spec
src/mm_player_gst.c
src/mm_player_priv.c

index 0e183cb..0261739 100644 (file)
@@ -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
index 88f4f8e..27498b7 100644 (file)
@@ -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) {
index 2b7bd0a..c1e1518 100644 (file)
@@ -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 */