queue2: resolve buffering issue 65/253165/3 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/hotfix/20210208.044046 submit/tizen_6.0_hotfix/20210205.065009
authorEunhye Choi <eunhae1.choi@samsung.com>
Thu, 4 Feb 2021 11:20:08 +0000 (20:20 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Fri, 5 Feb 2021 05:32:09 +0000 (14:32 +0900)
set seek threshold based on the in_rate value
to reduce the seek request which make slow the data receiving
by additional http server connection.

Change-Id: Ib6c24696afe6de2440a7c4bce63e7803eaeea9ad
(cherry picked from commit 01226cb2c8b15f74739d17b6120c02fb55b60721)

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

index 56f29a35b6d25444b2c37cc731f011da1d52e4d4..1cc4737a557acc04ee5f7b1511356f892883567e 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:           gstreamer
 Version:        1.16.2
-Release:        1
+Release:        2
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
@@ -74,6 +74,7 @@ export CFLAGS="%{optflags} \
        -DTIZEN_FEATURE_QUEUE_MODIFICATION\
        -DTIZEN_FEATURE_FAKESINK_MODIFICATION\
        -DTIZEN_FEATURE_INPUT_SELECTOR_MODIFICATION\
+       -DTIZEN_FEATURE_SEEK_THRESHOLD\
 %if "%{tizen_profile_name}" == "tv"
        -DTIZEN_PROFILE_TV\
        -DTIZEN_FEATURE_TRUSTZONE\
index b2c22c724969a58f2a1e61758e852c8db9ec69e1..950bef0a5bcee2b01594c29b36396f3edfb82a61 100644 (file)
@@ -1421,6 +1421,18 @@ get_seek_threshold (GstQueue2 * queue)
   /* FIXME, find a good threshold based on the incoming rate. */
   threshold = 1024 * 512;
 
+#ifdef TIZEN_FEATURE_SEEK_THRESHOLD
+  guint64 seek_thresholds[] =
+    {(1.5*1024*1024), (1*1024*1024), (512*1024), (256*1024)};
+
+  for (int i = 0 ; i < G_N_ELEMENTS(seek_thresholds) ; i++) {
+    if (seek_thresholds[i] < (guint64)queue->byte_in_rate) {
+      threshold = seek_thresholds[i];
+      break;
+    }
+  }
+#endif
+
   if (QUEUE_IS_USING_RING_BUFFER (queue)) {
     threshold = MIN (threshold,
         QUEUE_MAX_BYTES (queue) - queue->cur_level.bytes);