Multiqueue: don't allow dropping SEGMENT_DONE events
[platform/upstream/gstreamer.git] / plugins / elements / gstmultiqueue.h
index ee20a71..524fcf9 100644 (file)
@@ -15,8 +15,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 
@@ -24,7 +24,7 @@
 #define __GST_MULTI_QUEUE_H__
 
 #include <gst/gst.h>
-#include "gstdataqueue.h"
+#include <gst/base/gstdataqueue.h>
 
 G_BEGIN_DECLS
 
@@ -42,6 +42,9 @@ G_BEGIN_DECLS
 typedef struct _GstMultiQueue GstMultiQueue;
 typedef struct _GstMultiQueueClass GstMultiQueueClass;
 
+typedef struct _GstMultiQueuePad GstMultiQueuePad;
+typedef struct _GstMultiQueuePadClass GstMultiQueuePadClass;
+
 /**
  * GstMultiQueue:
  *
@@ -51,6 +54,8 @@ struct _GstMultiQueue {
   GstElement element;
 
   gboolean sync_by_running_time;
+  gboolean use_interleave;
+  GstClockTime min_interleave_time;
 
   /* number of queues */
   guint        nbqueues;
@@ -61,19 +66,27 @@ struct _GstMultiQueue {
 
   GstDataQueueSize  max_size, extra_size;
   gboolean use_buffering;
-  gint low_percent, high_percent;
+  gint low_watermark, high_watermark;
   gboolean buffering;
-  gint percent;
+  gint buffering_percent;
 
-  guint32  counter;    /* incoming object counter, use atomic accesses */
+  guint    counter;    /* incoming object counter, use atomic accesses */
   guint32  highid;     /* contains highest id of last outputted object */
-  GstClockTime high_time; /* highest start running time */
+  GstClockTimeDiff high_time; /* highest start running time */
 
-  GMutex * qlock;      /* Global queue lock (vs object lock or individual */
+  GMutex   qlock;      /* Global queue lock (vs object lock or individual */
                        /* queues lock). Protects nbqueues, queues, global */
                        /* GstMultiQueueSize, counter and highid */
 
   gint numwaiting;     /* number of not-linked pads waiting */
+
+  gboolean buffering_percent_changed;
+  GMutex buffering_post_lock; /* assures only one posted at a time */
+
+  GstClockTime interleave;     /* Input interleave */
+  GstClockTimeDiff last_interleave_update;
+
+  GstClockTime unlinked_cache_time;
 };
 
 struct _GstMultiQueueClass {
@@ -84,7 +97,7 @@ struct _GstMultiQueueClass {
   void (*overrun)      (GstMultiQueue *queue);
 };
 
-GType gst_multi_queue_get_type (void);
+G_GNUC_INTERNAL GType gst_multi_queue_get_type (void);
 
 G_END_DECLS