multiqueue: skip buffering except audio and video 92/259092/1 accepted/tizen_6.5_unified tizen_6.5 accepted/tizen/6.5/unified/20211029.013458 accepted/tizen/unified/20210624.131907 submit/tizen/20210616.025147 submit/tizen/20210621.051655 submit/tizen_6.5/20211028.163401 tizen_6.5.m2_release
authorEunhye Choi <eunhae1.choi@samsung.com>
Mon, 31 May 2021 11:41:40 +0000 (20:41 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Tue, 1 Jun 2021 05:06:59 +0000 (14:06 +0900)
- invalid buffering msg is posted by text track which data is too small.
  so consider the audio and video track only for buffering.

Change-Id: Ib4d579dbbba7c3c105ed67e8f287c972ba9386fa

packaging/gstreamer.spec
plugins/elements/gstmultiqueue.c

index 2aa3181..5a126f9 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:           gstreamer
 Version:        1.16.2
-Release:        4
+Release:        5
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
@@ -70,6 +70,7 @@ export CFLAGS="%{optflags} \
        -DTIZEN_FEATURE_FILESINK_MODIFICATION\
        -DTIZEN_FEATURE_MQ_MODIFICATION\
        -DTIZEN_FEATURE_MQ_MODIFICATION_EXTRA_SIZE_TIME\
+       -DTIZEN_FEATURE_MQ_SKIP_BUFFERING\
        -DTIZEN_FEATURE_BASEPARSE_MODIFICATION\
        -DTIZEN_FEATURE_QUEUE_MODIFICATION\
        -DTIZEN_FEATURE_FAKESINK_MODIFICATION\
index becbd8d..2b01a33 100644 (file)
@@ -1234,6 +1234,22 @@ update_buffering (GstMultiQueue * mq, GstSingleQueue * sq)
   if (!mq->use_buffering)
     return;
 
+#ifdef TIZEN_FEATURE_MQ_SKIP_BUFFERING
+  GstCaps *caps = gst_pad_get_current_caps(sq->sinkpad);
+  GstStructure *s;
+
+  if (caps) {
+    /* skip buffering except audio and video */
+    if ((s = gst_caps_get_structure (caps, 0)) &&
+        (!g_strrstr (gst_structure_get_name (s), "video")) &&
+        (!g_strrstr (gst_structure_get_name (s), "audio"))) {
+        gst_caps_unref(caps);
+        return;
+    }
+    gst_caps_unref(caps);
+  }
+#endif
+
   buffering_level = get_buffering_level (sq);
 
   /* scale so that if buffering_level equals the high watermark,