mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
gst/base/gstbasesink.c: Better log message.
Original commit message from CVS: * gst/base/gstbasesink.c: (gst_base_sink_handle_object), (gst_base_sink_handle_buffer): Better log message. * gst/gstbus.h: * gst/gstelement.h: More docs. * gst/gstqueue.c: (gst_queue_class_init), (gst_queue_init), (gst_queue_set_property), (gst_queue_get_property): * gst/gstqueue.h: Remove old unused properties.
This commit is contained in:
parent
8167fcdd78
commit
06bc343e3f
9 changed files with 39 additions and 71 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
||||||
|
2005-10-08 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
|
||||||
|
(gst_base_sink_handle_buffer):
|
||||||
|
Better log message.
|
||||||
|
|
||||||
|
* gst/gstbus.h:
|
||||||
|
* gst/gstelement.h:
|
||||||
|
More docs.
|
||||||
|
|
||||||
|
* gst/gstqueue.c: (gst_queue_class_init), (gst_queue_init),
|
||||||
|
(gst_queue_set_property), (gst_queue_get_property):
|
||||||
|
* gst/gstqueue.h:
|
||||||
|
Remove old unused properties.
|
||||||
|
|
||||||
2005-10-08 Stefan Kost <ensonic@users.sf.net>
|
2005-10-08 Stefan Kost <ensonic@users.sf.net>
|
||||||
* docs/gst/gstreamer-sections.txt:
|
* docs/gst/gstreamer-sections.txt:
|
||||||
* gst/gstmessage.c:
|
* gst/gstmessage.c:
|
||||||
|
|
|
@ -1104,7 +1104,7 @@ gst_base_sink_handle_buffer (GstBaseSink * basesink, GstBuffer * buf)
|
||||||
status = gst_base_sink_do_sync (basesink, buf);
|
status = gst_base_sink_do_sync (basesink, buf);
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case GST_CLOCK_EARLY:
|
case GST_CLOCK_EARLY:
|
||||||
GST_DEBUG_OBJECT (basesink, "late frame !");
|
GST_DEBUG_OBJECT (basesink, "buffer too late!");
|
||||||
/* fallthrough for now */
|
/* fallthrough for now */
|
||||||
case GST_CLOCK_OK:
|
case GST_CLOCK_OK:
|
||||||
{
|
{
|
||||||
|
|
21
gst/gstbus.h
21
gst/gstbus.h
|
@ -39,17 +39,32 @@ G_BEGIN_DECLS
|
||||||
#define GST_BUS_GET_CLASS(bus) (G_TYPE_INSTANCE_GET_CLASS ((bus), GST_TYPE_BUS, GstBusClass))
|
#define GST_BUS_GET_CLASS(bus) (G_TYPE_INSTANCE_GET_CLASS ((bus), GST_TYPE_BUS, GstBusClass))
|
||||||
#define GST_BUS_CAST(bus) ((GstBus*)(bus))
|
#define GST_BUS_CAST(bus) ((GstBus*)(bus))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GstBusFlags:
|
||||||
|
* @GST_BUS_FLUSHING: The bus is currently dropping all messages
|
||||||
|
* @GST_BUS_FLAG_LAST: offset to define more flags
|
||||||
|
*
|
||||||
|
* The standard flags that a bus may have.
|
||||||
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_BUS_FLUSHING = GST_OBJECT_FLAG_LAST,
|
GST_BUS_FLUSHING = GST_OBJECT_FLAG_LAST,
|
||||||
|
|
||||||
GST_BUS_FLAG_LAST = GST_OBJECT_FLAG_LAST + 1
|
GST_BUS_FLAG_LAST = GST_OBJECT_FLAG_LAST + 1
|
||||||
} GstBusFlags;
|
} GstBusFlags;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GstBusSyncReply:
|
||||||
|
* @GST_BUS_DROP: drop the message
|
||||||
|
* @GST_BUS_PASS: pass the message to the async queue
|
||||||
|
* @GST_BUS_ASYNC: pass message to async queue, continue if message is handled
|
||||||
|
*
|
||||||
|
* The result values for a GstBusSyncHandler.
|
||||||
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GST_BUS_DROP = 0, /* drop message */
|
GST_BUS_DROP = 0,
|
||||||
GST_BUS_PASS = 1, /* pass message to async queue */
|
GST_BUS_PASS = 1,
|
||||||
GST_BUS_ASYNC = 2, /* pass message to async queue, continue if message is handled */
|
GST_BUS_ASYNC = 2,
|
||||||
} GstBusSyncReply;
|
} GstBusSyncReply;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -71,6 +71,8 @@ GST_EXPORT GType _gst_element_type;
|
||||||
* @GST_STATE_CHANGE_SUCCESS : the state change succeeded
|
* @GST_STATE_CHANGE_SUCCESS : the state change succeeded
|
||||||
* @GST_STATE_CHANGE_ASYNC : the state change will happen asynchronously
|
* @GST_STATE_CHANGE_ASYNC : the state change will happen asynchronously
|
||||||
* @GST_STATE_CHANGE_NO_PREROLL: the state change cannot be prerolled
|
* @GST_STATE_CHANGE_NO_PREROLL: the state change cannot be prerolled
|
||||||
|
*
|
||||||
|
* the possible return values from a state change function.
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_STATE_CHANGE_FAILURE = 0,
|
GST_STATE_CHANGE_FAILURE = 0,
|
||||||
|
|
|
@ -105,9 +105,7 @@ enum
|
||||||
ARG_MIN_THRESHOLD_BYTES,
|
ARG_MIN_THRESHOLD_BYTES,
|
||||||
ARG_MIN_THRESHOLD_TIME,
|
ARG_MIN_THRESHOLD_TIME,
|
||||||
ARG_LEAKY,
|
ARG_LEAKY,
|
||||||
ARG_MAY_DEADLOCK,
|
/* FILL ME */
|
||||||
ARG_BLOCK_TIMEOUT
|
|
||||||
/* FILL ME */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GST_QUEUE_MUTEX_LOCK(q) G_STMT_START { \
|
#define GST_QUEUE_MUTEX_LOCK(q) G_STMT_START { \
|
||||||
|
@ -322,15 +320,6 @@ gst_queue_class_init (GstQueueClass * klass)
|
||||||
g_param_spec_enum ("leaky", "Leaky",
|
g_param_spec_enum ("leaky", "Leaky",
|
||||||
"Where the queue leaks, if at all",
|
"Where the queue leaks, if at all",
|
||||||
GST_TYPE_QUEUE_LEAKY, GST_QUEUE_NO_LEAK, G_PARAM_READWRITE));
|
GST_TYPE_QUEUE_LEAKY, GST_QUEUE_NO_LEAK, G_PARAM_READWRITE));
|
||||||
g_object_class_install_property (gobject_class, ARG_MAY_DEADLOCK,
|
|
||||||
g_param_spec_boolean ("may_deadlock", "May Deadlock",
|
|
||||||
"The queue may deadlock if it's full and not PLAYING",
|
|
||||||
TRUE, G_PARAM_READWRITE));
|
|
||||||
g_object_class_install_property (gobject_class, ARG_BLOCK_TIMEOUT,
|
|
||||||
g_param_spec_uint64 ("block_timeout", "Timeout for Block",
|
|
||||||
"Nanoseconds until blocked queue times out and returns filler event. "
|
|
||||||
"Value of -1 disables timeout",
|
|
||||||
0, G_MAXUINT64, -1, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
/* set several parent class virtual functions */
|
/* set several parent class virtual functions */
|
||||||
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_queue_finalize);
|
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_queue_finalize);
|
||||||
|
@ -384,8 +373,6 @@ gst_queue_init (GstQueue * queue)
|
||||||
queue->min_threshold.time = 0; /* no threshold */
|
queue->min_threshold.time = 0; /* no threshold */
|
||||||
|
|
||||||
queue->leaky = GST_QUEUE_NO_LEAK;
|
queue->leaky = GST_QUEUE_NO_LEAK;
|
||||||
queue->may_deadlock = TRUE;
|
|
||||||
queue->block_timeout = GST_CLOCK_TIME_NONE;
|
|
||||||
queue->srcresult = GST_FLOW_WRONG_STATE;
|
queue->srcresult = GST_FLOW_WRONG_STATE;
|
||||||
|
|
||||||
queue->qlock = g_mutex_new ();
|
queue->qlock = g_mutex_new ();
|
||||||
|
@ -1073,12 +1060,6 @@ gst_queue_set_property (GObject * object,
|
||||||
case ARG_LEAKY:
|
case ARG_LEAKY:
|
||||||
queue->leaky = g_value_get_enum (value);
|
queue->leaky = g_value_get_enum (value);
|
||||||
break;
|
break;
|
||||||
case ARG_MAY_DEADLOCK:
|
|
||||||
queue->may_deadlock = g_value_get_boolean (value);
|
|
||||||
break;
|
|
||||||
case ARG_BLOCK_TIMEOUT:
|
|
||||||
queue->block_timeout = g_value_get_uint64 (value);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -1126,12 +1107,6 @@ gst_queue_get_property (GObject * object,
|
||||||
case ARG_LEAKY:
|
case ARG_LEAKY:
|
||||||
g_value_set_enum (value, queue->leaky);
|
g_value_set_enum (value, queue->leaky);
|
||||||
break;
|
break;
|
||||||
case ARG_MAY_DEADLOCK:
|
|
||||||
g_value_set_boolean (value, queue->may_deadlock);
|
|
||||||
break;
|
|
||||||
case ARG_BLOCK_TIMEOUT:
|
|
||||||
g_value_set_uint64 (value, queue->block_timeout);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -76,13 +76,6 @@ struct _GstQueue {
|
||||||
/* whether we leak data, and at which end */
|
/* whether we leak data, and at which end */
|
||||||
gint leaky;
|
gint leaky;
|
||||||
|
|
||||||
/* 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;
|
|
||||||
|
|
||||||
GMutex *qlock; /* lock for queue (vs object lock) */
|
GMutex *qlock; /* lock for queue (vs object lock) */
|
||||||
GCond *item_add; /* signals buffers now available for reading */
|
GCond *item_add; /* signals buffers now available for reading */
|
||||||
GCond *item_del; /* signals space now available for writing */
|
GCond *item_del; /* signals space now available for writing */
|
||||||
|
|
|
@ -1104,7 +1104,7 @@ gst_base_sink_handle_buffer (GstBaseSink * basesink, GstBuffer * buf)
|
||||||
status = gst_base_sink_do_sync (basesink, buf);
|
status = gst_base_sink_do_sync (basesink, buf);
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case GST_CLOCK_EARLY:
|
case GST_CLOCK_EARLY:
|
||||||
GST_DEBUG_OBJECT (basesink, "late frame !");
|
GST_DEBUG_OBJECT (basesink, "buffer too late!");
|
||||||
/* fallthrough for now */
|
/* fallthrough for now */
|
||||||
case GST_CLOCK_OK:
|
case GST_CLOCK_OK:
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,9 +105,7 @@ enum
|
||||||
ARG_MIN_THRESHOLD_BYTES,
|
ARG_MIN_THRESHOLD_BYTES,
|
||||||
ARG_MIN_THRESHOLD_TIME,
|
ARG_MIN_THRESHOLD_TIME,
|
||||||
ARG_LEAKY,
|
ARG_LEAKY,
|
||||||
ARG_MAY_DEADLOCK,
|
/* FILL ME */
|
||||||
ARG_BLOCK_TIMEOUT
|
|
||||||
/* FILL ME */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GST_QUEUE_MUTEX_LOCK(q) G_STMT_START { \
|
#define GST_QUEUE_MUTEX_LOCK(q) G_STMT_START { \
|
||||||
|
@ -322,15 +320,6 @@ gst_queue_class_init (GstQueueClass * klass)
|
||||||
g_param_spec_enum ("leaky", "Leaky",
|
g_param_spec_enum ("leaky", "Leaky",
|
||||||
"Where the queue leaks, if at all",
|
"Where the queue leaks, if at all",
|
||||||
GST_TYPE_QUEUE_LEAKY, GST_QUEUE_NO_LEAK, G_PARAM_READWRITE));
|
GST_TYPE_QUEUE_LEAKY, GST_QUEUE_NO_LEAK, G_PARAM_READWRITE));
|
||||||
g_object_class_install_property (gobject_class, ARG_MAY_DEADLOCK,
|
|
||||||
g_param_spec_boolean ("may_deadlock", "May Deadlock",
|
|
||||||
"The queue may deadlock if it's full and not PLAYING",
|
|
||||||
TRUE, G_PARAM_READWRITE));
|
|
||||||
g_object_class_install_property (gobject_class, ARG_BLOCK_TIMEOUT,
|
|
||||||
g_param_spec_uint64 ("block_timeout", "Timeout for Block",
|
|
||||||
"Nanoseconds until blocked queue times out and returns filler event. "
|
|
||||||
"Value of -1 disables timeout",
|
|
||||||
0, G_MAXUINT64, -1, G_PARAM_READWRITE));
|
|
||||||
|
|
||||||
/* set several parent class virtual functions */
|
/* set several parent class virtual functions */
|
||||||
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_queue_finalize);
|
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_queue_finalize);
|
||||||
|
@ -384,8 +373,6 @@ gst_queue_init (GstQueue * queue)
|
||||||
queue->min_threshold.time = 0; /* no threshold */
|
queue->min_threshold.time = 0; /* no threshold */
|
||||||
|
|
||||||
queue->leaky = GST_QUEUE_NO_LEAK;
|
queue->leaky = GST_QUEUE_NO_LEAK;
|
||||||
queue->may_deadlock = TRUE;
|
|
||||||
queue->block_timeout = GST_CLOCK_TIME_NONE;
|
|
||||||
queue->srcresult = GST_FLOW_WRONG_STATE;
|
queue->srcresult = GST_FLOW_WRONG_STATE;
|
||||||
|
|
||||||
queue->qlock = g_mutex_new ();
|
queue->qlock = g_mutex_new ();
|
||||||
|
@ -1073,12 +1060,6 @@ gst_queue_set_property (GObject * object,
|
||||||
case ARG_LEAKY:
|
case ARG_LEAKY:
|
||||||
queue->leaky = g_value_get_enum (value);
|
queue->leaky = g_value_get_enum (value);
|
||||||
break;
|
break;
|
||||||
case ARG_MAY_DEADLOCK:
|
|
||||||
queue->may_deadlock = g_value_get_boolean (value);
|
|
||||||
break;
|
|
||||||
case ARG_BLOCK_TIMEOUT:
|
|
||||||
queue->block_timeout = g_value_get_uint64 (value);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -1126,12 +1107,6 @@ gst_queue_get_property (GObject * object,
|
||||||
case ARG_LEAKY:
|
case ARG_LEAKY:
|
||||||
g_value_set_enum (value, queue->leaky);
|
g_value_set_enum (value, queue->leaky);
|
||||||
break;
|
break;
|
||||||
case ARG_MAY_DEADLOCK:
|
|
||||||
g_value_set_boolean (value, queue->may_deadlock);
|
|
||||||
break;
|
|
||||||
case ARG_BLOCK_TIMEOUT:
|
|
||||||
g_value_set_uint64 (value, queue->block_timeout);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -76,13 +76,6 @@ struct _GstQueue {
|
||||||
/* whether we leak data, and at which end */
|
/* whether we leak data, and at which end */
|
||||||
gint leaky;
|
gint leaky;
|
||||||
|
|
||||||
/* 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;
|
|
||||||
|
|
||||||
GMutex *qlock; /* lock for queue (vs object lock) */
|
GMutex *qlock; /* lock for queue (vs object lock) */
|
||||||
GCond *item_add; /* signals buffers now available for reading */
|
GCond *item_add; /* signals buffers now available for reading */
|
||||||
GCond *item_del; /* signals space now available for writing */
|
GCond *item_del; /* signals space now available for writing */
|
||||||
|
|
Loading…
Reference in a new issue