#include <gst/gst.h>
#include "gstqueue.h"
+#include "gstcoreelementselements.h"
#include "../../gst/gst-i18n-lib.h"
#include "../../gst/glib-compat-private.h"
"dataflow inside the queue element");
#define gst_queue_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstQueue, gst_queue, GST_TYPE_ELEMENT, _do_init);
+GST_ELEMENT_REGISTER_DEFINE (queue, "queue", GST_RANK_NONE, GST_TYPE_QUEUE);
static void gst_queue_finalize (GObject * object);
static void gst_queue_set_property (GObject * object,
gst_queue_signals[SIGNAL_UNDERRUN] =
g_signal_new ("underrun", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GstQueueClass, underrun), NULL, NULL,
- g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ NULL, G_TYPE_NONE, 0);
/**
* GstQueue::running:
* @queue: the queue instance
gst_queue_signals[SIGNAL_RUNNING] =
g_signal_new ("running", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GstQueueClass, running), NULL, NULL,
- g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ NULL, G_TYPE_NONE, 0);
/**
* GstQueue::overrun:
* @queue: the queue instance
gst_queue_signals[SIGNAL_OVERRUN] =
g_signal_new ("overrun", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GstQueueClass, overrun), NULL, NULL,
- g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ NULL, G_TYPE_NONE, 0);
/**
* GstQueue::pushing:
* @queue: the queue instance
gst_queue_signals[SIGNAL_PUSHING] =
g_signal_new ("pushing", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GstQueueClass, pushing), NULL, NULL,
- g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
+ NULL, G_TYPE_NONE, 0);
/* properties */
g_object_class_install_property (gobject_class, PROP_CUR_LEVEL_BYTES,
#endif /* TIZEN_FEATURE_QUEUE_MODIFICATION */
/**
- * GstQueue:flush-on-eos
+ * queue:flush-on-eos:
*
* Discard all data in the queue when an EOS event is received, and pass
* on the EOS event as soon as possible (instead of waiting until all
GST_DEBUG_REGISTER_FUNCPTR (gst_queue_handle_src_query);
GST_DEBUG_REGISTER_FUNCPTR (gst_queue_chain);
GST_DEBUG_REGISTER_FUNCPTR (gst_queue_chain_list);
+
+ gst_type_mark_as_plugin_api (GST_TYPE_QUEUE_LEAKY, 0);
}
static void
"queue is full, waiting for free space");
/* don't leak. Instead, wait for space to be available */
- do {
- /* for as long as the queue is filled, wait till an item was deleted. */
+ /* for as long as the queue is filled, wait till an item was deleted. */
+ while (gst_queue_is_filled (queue)) {
GST_QUEUE_WAIT_DEL_CHECK (queue, out_flushing);
- } while (gst_queue_is_filled (queue));
+ };
GST_CAT_DEBUG_OBJECT (queue_dataflow, queue, "queue is not full");
&& queue->leaky == GST_QUEUE_NO_LEAK)
max += queue->max_size.time;
else if (queue->max_size.time > 0 && queue->leaky != GST_QUEUE_NO_LEAK)
- max = MIN (queue->max_size.time, max);
+ max = MAX (queue->max_size.time, max);
else
max = -1;