|
Packit Service |
963350 |
/* GStreamer
|
|
Packit Service |
963350 |
* Copyright (C) 2006 Edward Hervey <edward@fluendo.com>
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* gstmultiqueue.h:
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
963350 |
* modify it under the terms of the GNU Library General Public
|
|
Packit Service |
963350 |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
963350 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
963350 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
963350 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
963350 |
* Library General Public License for more details.
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* You should have received a copy of the GNU Library General Public
|
|
Packit Service |
963350 |
* License along with this library; if not, write to the
|
|
Packit Service |
963350 |
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
Packit Service |
963350 |
* Boston, MA 02110-1301, USA.
|
|
Packit Service |
963350 |
*/
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#ifndef __GST_MULTI_QUEUE_H__
|
|
Packit Service |
963350 |
#define __GST_MULTI_QUEUE_H__
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#include <gst/gst.h>
|
|
Packit Service |
963350 |
#include <gst/base/gstdataqueue.h>
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
G_BEGIN_DECLS
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#define GST_TYPE_MULTI_QUEUE \
|
|
Packit Service |
963350 |
(gst_multi_queue_get_type())
|
|
Packit Service |
963350 |
#define GST_MULTI_QUEUE(obj) \
|
|
Packit Service |
963350 |
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MULTI_QUEUE,GstMultiQueue))
|
|
Packit Service |
963350 |
#define GST_MULTI_QUEUE_CLASS(klass) \
|
|
Packit Service |
963350 |
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MULTI_QUEUE,GstMultiQueueClass))
|
|
Packit Service |
963350 |
#define GST_IS_MULTI_QUEUE(obj) \
|
|
Packit Service |
963350 |
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTI_QUEUE))
|
|
Packit Service |
963350 |
#define GST_IS_MULTI_QUEUE_CLASS(obj) \
|
|
Packit Service |
963350 |
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTI_QUEUE))
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
typedef struct _GstMultiQueue GstMultiQueue;
|
|
Packit Service |
963350 |
typedef struct _GstMultiQueueClass GstMultiQueueClass;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
typedef struct _GstMultiQueuePad GstMultiQueuePad;
|
|
Packit Service |
963350 |
typedef struct _GstMultiQueuePadClass GstMultiQueuePadClass;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/**
|
|
Packit Service |
963350 |
* GstMultiQueue:
|
|
Packit Service |
963350 |
*
|
|
Packit Service |
963350 |
* Opaque #GstMultiQueue structure.
|
|
Packit Service |
963350 |
*/
|
|
Packit Service |
963350 |
struct _GstMultiQueue {
|
|
Packit Service |
963350 |
GstElement element;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
gboolean sync_by_running_time;
|
|
Packit Service |
963350 |
gboolean use_interleave;
|
|
Packit Service |
963350 |
GstClockTime min_interleave_time;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/* number of queues */
|
|
Packit Service |
963350 |
guint nbqueues;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/* The list of individual queues */
|
|
Packit Service |
963350 |
GList *queues;
|
|
Packit Service |
963350 |
guint32 queues_cookie;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GstDataQueueSize max_size, extra_size;
|
|
Packit Service |
963350 |
gboolean use_buffering;
|
|
Packit Service |
963350 |
gint low_watermark, high_watermark;
|
|
Packit Service |
963350 |
gboolean buffering;
|
|
Packit Service |
963350 |
gint buffering_percent;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
guint counter; /* incoming object counter, use atomic accesses */
|
|
Packit Service |
963350 |
guint32 highid; /* contains highest id of last outputted object */
|
|
Packit Service |
963350 |
GstClockTimeDiff high_time; /* highest start running time */
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GMutex qlock; /* Global queue lock (vs object lock or individual */
|
|
Packit Service |
963350 |
/* queues lock). Protects nbqueues, queues, global */
|
|
Packit Service |
963350 |
/* GstMultiQueueSize, counter and highid */
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
gint numwaiting; /* number of not-linked pads waiting */
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
gboolean buffering_percent_changed;
|
|
Packit Service |
963350 |
GMutex buffering_post_lock; /* assures only one posted at a time */
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GstClockTime interleave; /* Input interleave */
|
|
Packit Service |
963350 |
GstClockTimeDiff last_interleave_update;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
GstClockTime unlinked_cache_time;
|
|
Packit Service |
963350 |
};
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
struct _GstMultiQueueClass {
|
|
Packit Service |
963350 |
GstElementClass parent_class;
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
/* signals emitted when ALL queues are either full or empty */
|
|
Packit Service |
963350 |
void (*underrun) (GstMultiQueue *queue);
|
|
Packit Service |
963350 |
void (*overrun) (GstMultiQueue *queue);
|
|
Packit Service |
963350 |
};
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
G_GNUC_INTERNAL GType gst_multi_queue_get_type (void);
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
G_END_DECLS
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
|
|
Packit Service |
963350 |
#endif /* __GST_MULTI_QUEUE_H__ */
|