mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
queue2: Integrate into coreplugins
This commit is contained in:
parent
08e3cb531c
commit
40732dd308
4 changed files with 252 additions and 268 deletions
|
@ -21,6 +21,7 @@ libgstcoreelements_la_SOURCES = \
|
|||
gstfilesrc.c \
|
||||
gstidentity.c \
|
||||
gstqueue.c \
|
||||
gstqueue2.c \
|
||||
gsttee.c \
|
||||
gsttypefindelement.c \
|
||||
gstmultiqueue.c
|
||||
|
@ -42,6 +43,7 @@ noinst_HEADERS = \
|
|||
gstfilesrc.h \
|
||||
gstidentity.h \
|
||||
gstqueue.h \
|
||||
gstqueue2.h \
|
||||
gsttee.h \
|
||||
gsttypefindelement.h \
|
||||
gstmultiqueue.h
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "gstfilesrc.h"
|
||||
#include "gstidentity.h"
|
||||
#include "gstqueue.h"
|
||||
#include "gstqueue2.h"
|
||||
#include "gsttee.h"
|
||||
#include "gsttypefindelement.h"
|
||||
#include "gstmultiqueue.h"
|
||||
|
@ -59,6 +60,7 @@ static struct _elements_entry _elements[] = {
|
|||
{"filesrc", GST_RANK_PRIMARY, gst_file_src_get_type},
|
||||
{"identity", GST_RANK_NONE, gst_identity_get_type},
|
||||
{"queue", GST_RANK_NONE, gst_queue_get_type},
|
||||
{"queue2", GST_RANK_NONE, gst_queue2_get_type},
|
||||
{"filesink", GST_RANK_PRIMARY, gst_file_sink_get_type},
|
||||
{"tee", GST_RANK_NONE, gst_tee_get_type},
|
||||
{"typefind", GST_RANK_NONE, gst_type_find_element_get_type},
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -28,24 +28,33 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_QUEUE \
|
||||
(gst_queue_get_type())
|
||||
#define GST_QUEUE(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QUEUE,GstQueue))
|
||||
#define GST_QUEUE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QUEUE,GstQueueClass))
|
||||
#define GST_IS_QUEUE(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QUEUE))
|
||||
#define GST_IS_QUEUE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QUEUE))
|
||||
#define GST_QUEUE_CAST(obj) \
|
||||
((GstQueue *)(obj))
|
||||
#define GST_TYPE_QUEUE2 \
|
||||
(gst_queue2_get_type())
|
||||
#define GST_QUEUE2(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QUEUE2,GstQueue2))
|
||||
#define GST_QUEUE2_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QUEUE2,GstQueue2Class))
|
||||
#define GST_IS_QUEUE2(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QUEUE2))
|
||||
#define GST_IS_QUEUE2_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QUEUE2))
|
||||
#define GST_QUEUE2_CAST(obj) \
|
||||
((GstQueue2 *)(obj))
|
||||
|
||||
typedef struct _GstQueue GstQueue;
|
||||
typedef struct _GstQueueSize GstQueueSize;
|
||||
typedef struct _GstQueueClass GstQueueClass;
|
||||
typedef struct _GstQueue2 GstQueue2;
|
||||
typedef struct _GstQueue2Size GstQueue2Size;
|
||||
typedef struct _GstQueue2Class GstQueue2Class;
|
||||
|
||||
struct _GstQueue
|
||||
/* used to keep track of sizes (current and max) */
|
||||
struct _GstQueue2Size
|
||||
{
|
||||
guint buffers;
|
||||
guint bytes;
|
||||
guint64 time;
|
||||
guint64 rate_time;
|
||||
};
|
||||
|
||||
struct _GstQueue2
|
||||
{
|
||||
GstElement element;
|
||||
|
||||
|
@ -65,8 +74,8 @@ struct _GstQueue
|
|||
/* the queue of data we're keeping our hands on */
|
||||
GQueue *queue;
|
||||
|
||||
GstQueueSize cur_level; /* currently in the queue */
|
||||
GstQueueSize max_level; /* max. amount of data allowed in the queue */
|
||||
GstQueue2Size cur_level; /* currently in the queue */
|
||||
GstQueue2Size max_level; /* max. amount of data allowed in the queue */
|
||||
gboolean use_buffering;
|
||||
gboolean use_rate_estimate;
|
||||
GstClockTime buffering_interval;
|
||||
|
@ -111,11 +120,13 @@ struct _GstQueue
|
|||
|
||||
};
|
||||
|
||||
struct _GstQueueClass
|
||||
struct _GstQueue2Class
|
||||
{
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_queue2_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_QUEUE2_H__ */
|
||||
|
|
Loading…
Reference in a new issue