G_BEGIN_DECLS
-extern GstElementDetails gst_queue_details;
-
-
#define GST_TYPE_QUEUE \
(gst_queue_get_type())
#define GST_QUEUE(obj) \
GstPad *sinkpad;
GstPad *srcpad;
- /* the queue of buffers we're keeping our grubby hands on */
+ /* the queue of data we're keeping our grubby hands on */
GQueue *queue;
- guint level_buffers; /* number of buffers queued here */
- guint level_bytes; /* number of bytes queued here */
- guint64 level_time; /* amount of time queued here */
+ struct {
+ guint buffers; /* no. of buffers */
+ guint bytes; /* no. of bytes */
+ guint64 time; /* amount of time */
+ } cur_level, /* currently in the queue */
+ max_size, /* max. amount of data allowed in the queue */
+ min_threshold; /* min. amount of data required to wake reader */
+
+ /* whether we leak data, and at which end */
+ gint leaky;
- guint size_buffers; /* size of queue in buffers */
- guint size_bytes; /* size of queue in bytes */
- guint64 size_time; /* size of queue in time */
+ /* number of nanoseconds until a blocked queue 'times out'
+ * to receive data and returns a filler event. -1 = disable */
+ guint64 block_timeout;
+
+ /* it the queue should fail on possible deadlocks */
+ gboolean may_deadlock;
- gint leaky; /* whether the queue is leaky, and if so at which end */
- gint block_timeout; /* microseconds until a blocked queue times out and returns GST_EVENT_FILLER.
- * A value of -1 will block forever. */
- guint min_threshold_bytes; /* the minimum number of bytes required before
- * waking up the reader thread */
- gboolean may_deadlock; /* it the queue should fail on possible deadlocks */
gboolean interrupt;
gboolean flush;
GMutex *qlock; /* lock for queue (vs object lock) */
- GCond *not_empty; /* signals buffers now available for reading */
- GCond *not_full; /* signals space now available for writing */
+ GCond *item_add; /* signals buffers now available for reading */
+ GCond *item_del; /* signals space now available for writing */
+ GCond *event_done; /* upstream event signaller */
GTimeVal *timeval; /* the timeout for the queue locking */
- GAsyncQueue *events; /* upstream events get decoupled here */
+ GQueue *events; /* upstream events get decoupled here */
+
+ GstCaps *negotiated_caps;
- GST_OBJECT_PADDING
+ gpointer _gst_reserved[GST_PADDING - 1];
};
struct _GstQueueClass {
GstElementClass parent_class;
- /* signal callbacks */
- void (*full) (GstQueue *queue);
+ /* signals - 'running' is called from both sides
+ * which might make it sort of non-useful... */
+ void (*underrun) (GstQueue *queue);
+ void (*running) (GstQueue *queue);
+ void (*overrun) (GstQueue *queue);
- GST_CLASS_PADDING
+ gpointer _gst_reserved[GST_PADDING];
};
GType gst_queue_get_type (void);