From: Eunhae Choi Date: Fri, 16 Dec 2016 07:29:43 +0000 (+0900) Subject: multiqueue: consider the extra time if there is spare buffer bytes X-Git-Tag: accepted/tizen/3.0/common/20161221.181255^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F105810%2F1;p=platform%2Fupstream%2Fgstreamer.git multiqueue: consider the extra time if there is spare buffer bytes Change-Id: I36817ba8b11cc08327c50cf0c9a14982e22be94f --- diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index 425654c..8c9b024 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -268,7 +268,11 @@ enum * aditional extra size. */ #define DEFAULT_EXTRA_SIZE_BYTES 10 * 1024 * 1024 /* 10 MB */ #define DEFAULT_EXTRA_SIZE_BUFFERS 5 +#ifdef TIZEN_FEATURE_MQ_MODIFICATION +#define DEFAULT_EXTRA_SIZE_TIME 10 * GST_SECOND +#else #define DEFAULT_EXTRA_SIZE_TIME 3 * GST_SECOND +#endif #define DEFAULT_USE_BUFFERING FALSE #define DEFAULT_LOW_PERCENT 10 @@ -1354,7 +1358,7 @@ NEXT_STEP: GST_DEBUG_OBJECT (mq, "r_framerate is %d ", r_framerate); - remaining_frame = (mq->stream_duration - cur_position) * r_framerate / GST_SECOND - size.visible; // packets num in video queue; + remaining_frame = (mq->stream_duration - cur_position) * r_framerate / GST_SECOND - size.visible; // packets num in video queue; instant_throughput = size.visible * GST_SECOND / elapsed_time; // packets num / per seconds GST_DEBUG_OBJECT (mq, "remaining_fram is %d, instant_throughput is %d", remaining_frame, instant_throughput); @@ -2654,6 +2658,10 @@ compute_high_time (GstMultiQueue * mq) #define IS_FILLED(q, format, value) (((q)->max_size.format) != 0 && \ ((q)->max_size.format) <= (value)) +#ifdef TIZEN_FEATURE_MQ_MODIFICATION +#define IS_FILLED_EXTRA(q, format, value) (((((q)->extra_size.format) != 0) || (((q)->max_size.format) != 0)) && \ + (((q)->extra_size.format)+((q)->max_size.format)) <= (value)) +#endif /* * GstSingleQueue functions */ @@ -2787,8 +2795,11 @@ single_queue_check_full (GstDataQueue * dataq, guint visible, guint bytes, return TRUE; /* check time or bytes */ +#ifdef TIZEN_FEATURE_MQ_MODIFICATION + res = IS_FILLED_EXTRA (sq, time, sq->cur_time) || IS_FILLED (sq, bytes, bytes); +#else res = IS_FILLED (sq, time, sq->cur_time) || IS_FILLED (sq, bytes, bytes); - +#endif return res; }