multiqueue: skip buffering except audio and video 62/259062/2 accepted/tizen_6.0_unified tizen_6.0 accepted/tizen/6.0/unified/20210616.132647 submit/tizen_6.0/20210607.081357
authorEunhye Choi <eunhae1.choi@samsung.com>
Mon, 31 May 2021 11:41:40 +0000 (20:41 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Mon, 31 May 2021 11:42:40 +0000 (20:42 +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 2aa3181bd1f7106d108dfcf8640734ec489b2b42..5a126f9cdedf65449eedfa114fc0c817060d3a3a 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 becbd8d9b801664580a2d427cf1772811095d826..2b01a338d1832a38a8f1eef32fab019e26439ed3 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,