multiqueue: disable buffering mode when the state is changed to playing 10/181510/2 accepted/tizen/unified/20180626.140820 submit/tizen/20180626.014416
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 14 Jun 2018 09:52:51 +0000 (18:52 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Fri, 15 Jun 2018 01:37:18 +0000 (10:37 +0900)
if application set the state to playing during buffering
the mq can not detect the data underflow after,
because it keeps the previous buffering level information.

Change-Id: I1cfd47bd7a5862b820d4244550a59395e1b2c89e

plugins/elements/gstmultiqueue.c

index b8cc9fd..b9ec4b5 100644 (file)
@@ -1239,6 +1239,16 @@ gst_multi_queue_change_state (GstElement * element, GstStateChange transition)
 
       break;
     }
+#ifdef TIZEN_FEATURE_MQ_MODIFICATION
+    /* to stop buffering during playing state */
+    case GST_STATE_CHANGE_PAUSED_TO_PLAYING:{
+      GST_MULTI_QUEUE_MUTEX_LOCK (mqueue);
+      mqueue->buffering = FALSE;
+      GST_MULTI_QUEUE_MUTEX_UNLOCK (mqueue);
+      gst_multi_queue_post_buffering (mqueue);
+      break;
+    }
+#endif
     case GST_STATE_CHANGE_PAUSED_TO_READY:{
       GList *tmp;