gstdataqueue.h   gstdataqueue.h 
skipping to change at line 56 skipping to change at line 56
* @size: the size in bytes of the miniobject. * @size: the size in bytes of the miniobject.
* @duration: the duration in #GstClockTime of the miniobject. Can not be * @duration: the duration in #GstClockTime of the miniobject. Can not be
* #GST_CLOCK_TIME_NONE. * #GST_CLOCK_TIME_NONE.
* @visible: #TRUE if @object should be considered as a visible object. * @visible: #TRUE if @object should be considered as a visible object.
* @destroy: The #GDestroyNotify function to use to free the #GstDataQueueI tem. * @destroy: The #GDestroyNotify function to use to free the #GstDataQueueI tem.
* This function should also drop the reference to @object the owner of the * This function should also drop the reference to @object the owner of the
* #GstDataQueueItem is assumed to hold. * #GstDataQueueItem is assumed to hold.
* *
* Structure used by #GstDataQueue. You can supply a different structure, a s * Structure used by #GstDataQueue. You can supply a different structure, a s
* long as the top of the structure is identical to this structure. * long as the top of the structure is identical to this structure.
*
* Since: 0.10.11
*/ */
struct _GstDataQueueItem struct _GstDataQueueItem
{ {
GstMiniObject *object; GstMiniObject *object;
guint size; guint size;
guint64 duration; guint64 duration;
gboolean visible; gboolean visible;
/* user supplied destroy function */ /* user supplied destroy function */
GDestroyNotify destroy; GDestroyNotify destroy;
}; };
/** /**
* GstDataQueueSize: * GstDataQueueSize:
* @visible: number of buffers * @visible: number of buffers
* @bytes: number of bytes * @bytes: number of bytes
* @time: amount of time * @time: amount of time
* *
* Structure describing the size of a queue. * Structure describing the size of a queue.
*
* Since: 0.10.11
*/ */
struct _GstDataQueueSize struct _GstDataQueueSize
{ {
guint visible; guint visible;
guint bytes; guint bytes;
guint64 time; guint64 time;
}; };
/** /**
* GstDataQueueCheckFullFunction: * GstDataQueueCheckFullFunction:
* @queue: a #GstDataQueue. * @queue: a #GstDataQueue.
* @visible: The number of visible items currently in the queue. * @visible: The number of visible items currently in the queue.
* @bytes: The amount of bytes currently in the queue. * @bytes: The amount of bytes currently in the queue.
* @time: The accumulated duration of the items currently in the queue. * @time: The accumulated duration of the items currently in the queue.
* @checkdata: The #gpointer registered when the #GstDataQueue was created. * @checkdata: The #gpointer registered when the #GstDataQueue was created.
* *
* The prototype of the function used to inform the queue that it should be * The prototype of the function used to inform the queue that it should be
* considered as full. * considered as full.
* *
* Returns: #TRUE if the queue should be considered full. * Returns: #TRUE if the queue should be considered full.
*
* Since: 0.10.11
*/ */
typedef gboolean (*GstDataQueueCheckFullFunction) (GstDataQueue * queue, typedef gboolean (*GstDataQueueCheckFullFunction) (GstDataQueue * queue,
guint visible, guint bytes, guint64 time, gpointer checkdata); guint visible, guint bytes, guint64 time, gpointer checkdata);
typedef void (*GstDataQueueFullCallback) (GstDataQueue * queue, gpointer ch
eckdata);
typedef void (*GstDataQueueEmptyCallback) (GstDataQueue * queue, gpointer c
heckdata);
/** /**
* GstDataQueue: * GstDataQueue:
* @object: the parent structure
* *
* Opaque #GstDataQueue structure. * Opaque #GstDataQueue structure.
*
* Since: 0.10.11
*/ */
struct _GstDataQueue struct _GstDataQueue
{ {
GObject object; GObject object;
/*< private > */ /*< private >*/
/* the queue of data we're keeping our grubby hands on */ /* the queue of data we're keeping our grubby hands on */
GQueue *queue; GQueue *queue;
GstDataQueueSize cur_level; /* size of the queue */ GstDataQueueSize cur_level; /* size of the queue */
GstDataQueueCheckFullFunction checkfull; /* Callback to check if the queue is full */ GstDataQueueCheckFullFunction checkfull; /* Callback to check if the queue is full */
gpointer *checkdata; gpointer *checkdata;
GMutex *qlock; /* lock for queue (vs object lock) */ GMutex *qlock; /* lock for queue (vs object lock) */
GCond *item_add; /* signals buffers now available for readin g */ GCond *item_add; /* signals buffers now available for readin g */
GCond *item_del; /* signals space now available for writing */ GCond *item_del; /* signals space now available for writing */
gboolean flushing; /* indicates whether conditions where signa lled because gboolean flushing; /* indicates whether conditions where signa lled because
* of external flushing */ * of external flushing */
GstDataQueueFullCallback fullcallback;
GstDataQueueEmptyCallback emptycallback;
gpointer _gst_reserved[GST_PADDING]; union {
struct {
gboolean waiting_add;
gboolean waiting_del;
} ABI;
gpointer _gst_reserved[GST_PADDING - 2];
} abidata;
}; };
struct _GstDataQueueClass struct _GstDataQueueClass
{ {
GObjectClass parent_class; GObjectClass parent_class;
/* signals */ /* signals */
void (*empty) (GstDataQueue * queue); void (*empty) (GstDataQueue * queue);
void (*full) (GstDataQueue * queue); void (*full) (GstDataQueue * queue);
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
GType gst_data_queue_get_type (void); GType gst_data_queue_get_type (void);
GstDataQueue * gst_data_queue_new (GstDataQueueCheckFullFunction checkfull, GstDataQueue * gst_data_queue_new (GstDataQueueCheckFullFunction checkfull,
gpointer checkdata); gpointer checkdata);
GstDataQueue * gst_data_queue_new_full (GstDataQueueCheckFullFunction
checkfull,
GstDataQueueFullCallback fullc
allback,
GstDataQueueEmptyCallback empt
ycallback,
gpointer checkdata);
gboolean gst_data_queue_push (GstDataQueue * queue, GstData QueueItem * item); gboolean gst_data_queue_push (GstDataQueue * queue, GstData QueueItem * item);
gboolean gst_data_queue_pop (GstDataQueue * queue, GstData QueueItem ** item); gboolean gst_data_queue_pop (GstDataQueue * queue, GstData QueueItem ** item);
void gst_data_queue_flush (GstDataQueue * queue); void gst_data_queue_flush (GstDataQueue * queue);
void gst_data_queue_set_flushing (GstDataQueue * queue, gboolea n flushing); void gst_data_queue_set_flushing (GstDataQueue * queue, gboolea n flushing);
gboolean gst_data_queue_drop_head (GstDataQueue * queue, GType t ype); gboolean gst_data_queue_drop_head (GstDataQueue * queue, GType t ype);
gboolean gst_data_queue_is_full (GstDataQueue * queue); gboolean gst_data_queue_is_full (GstDataQueue * queue);
gboolean gst_data_queue_is_empty (GstDataQueue * queue); gboolean gst_data_queue_is_empty (GstDataQueue * queue);
 End of changes. 10 change blocks. 
2 lines changed or deleted 32 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/