[0.6.281][adaptive] fix query duration error 46/294646/1
authorEunhye Choi <eunhae1.choi@samsung.com>
Thu, 22 Jun 2023 06:50:42 +0000 (15:50 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Thu, 22 Jun 2023 06:50:44 +0000 (15:50 +0900)
- fix query duration error just after prepare()
  in case of adaptive streaming playback
- state-holder is removed earlier than expected
  by streams_selected msg which is posted from adaptivedemux2
- do not select invalid audio track to make decodebin3 post
  stream_selected msg

Change-Id: I0e68e5344c43bd5de5a8731f8ffdfacbe1689f89

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

index 7d66209..83b304a 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.280
+Version:    0.6.281
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index c3fb4d0..60efc67 100644 (file)
@@ -933,6 +933,11 @@ __mmplayer_gst_check_useful_message(mmplayer_t *player, GstMessage *message)
        {
                if (MMPLAYER_USE_DECODEBIN(player))
                        break; /* drop msg */
+               if (message->src == (GstObject *)player->pipeline->mainbin[MMPLAYER_M_ADAPTIVE_DEMUX].gst) {
+                       LOGD("pipeline is still under construction for adaptive streaming");
+                       retval = TRUE;
+                       break;
+               }
 
                if ((MMPLAYER_IS_HTTP_STREAMING(player)) &&
                        (!player->pipeline->mainbin[MMPLAYER_M_DEMUXED_S_BUFFER].gst) &&
@@ -2950,6 +2955,12 @@ __mmplayer_gst_select_stream (GstElement * uridecodebin, GstStreamCollection * c
                                goto EXIT;
                        }
                }
+       } else {
+               if ((stype & GST_STREAM_TYPE_AUDIO) || (stype & GST_STREAM_TYPE_VIDEO)) {
+                       LOGD("No caps info, skip it");
+                       ret = 0;
+                       goto EXIT;
+               }
        }
 
        switch (stype) {
@@ -4315,7 +4326,6 @@ _mmplayer_gst_build_pipeline_with_src(mmplayer_t *player)
                goto ERROR;
        }
 
-       /* FIXME: required ?*/
        /* create fakesink element for keeping the pipeline state PAUSED. if needed */
        mainbin[MMPLAYER_M_SRC_FAKESINK].id = MMPLAYER_M_SRC_FAKESINK;
        mainbin[MMPLAYER_M_SRC_FAKESINK].gst = gst_element_factory_make("fakesink", "state-holder");