mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
gst/gstevent.*: Some more debugging output and doc cleanups.
Original commit message from CVS: * gst/gstevent.c: (_gst_event_copy), (gst_event_new_custom), (gst_event_new_newsegment), (gst_event_parse_newsegment), (gst_event_new_tag), (gst_event_parse_tag), (gst_event_new_qos), (gst_event_parse_qos), (gst_event_new_seek), (gst_event_parse_seek): * gst/gstevent.h: Some more debugging output and doc cleanups. * gst/gstqueue.c: (gst_queue_handle_sink_event): Fix possible deadlock.
This commit is contained in:
parent
eef38df668
commit
bc3dfd5d55
5 changed files with 54 additions and 5 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2005-08-23 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/gstevent.c: (_gst_event_copy), (gst_event_new_custom),
|
||||||
|
(gst_event_new_newsegment), (gst_event_parse_newsegment),
|
||||||
|
(gst_event_new_tag), (gst_event_parse_tag), (gst_event_new_qos),
|
||||||
|
(gst_event_parse_qos), (gst_event_new_seek),
|
||||||
|
(gst_event_parse_seek):
|
||||||
|
* gst/gstevent.h:
|
||||||
|
Some more debugging output and doc cleanups.
|
||||||
|
|
||||||
|
* gst/gstqueue.c: (gst_queue_handle_sink_event):
|
||||||
|
Fix possible deadlock.
|
||||||
|
|
||||||
2005-08-23 Stefan Kost <ensonic@users.sf.net>
|
2005-08-23 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* docs/gst/gstreamer-docs.sgml:
|
* docs/gst/gstreamer-docs.sgml:
|
||||||
|
|
|
@ -301,6 +301,23 @@ GstEvent *
|
||||||
gst_event_new_newsegment (gdouble rate, GstFormat format,
|
gst_event_new_newsegment (gdouble rate, GstFormat format,
|
||||||
gint64 start_val, gint64 stop_val, gint64 base)
|
gint64 start_val, gint64 stop_val, gint64 base)
|
||||||
{
|
{
|
||||||
|
if (format == GST_FORMAT_TIME) {
|
||||||
|
GST_CAT_INFO (GST_CAT_EVENT,
|
||||||
|
"creating newsegment rate %lf, format GST_FORMAT_TIME, "
|
||||||
|
"start %" GST_TIME_FORMAT ", stop %" GST_TIME_FORMAT
|
||||||
|
", base %" GST_TIME_FORMAT,
|
||||||
|
rate, GST_TIME_ARGS (start_val),
|
||||||
|
GST_TIME_ARGS (stop_val), GST_TIME_ARGS (base));
|
||||||
|
} else {
|
||||||
|
GST_CAT_INFO (GST_CAT_EVENT,
|
||||||
|
"creating newsegment rate %lf, format %d, "
|
||||||
|
"start %lld, stop %lld, base %lld",
|
||||||
|
rate, format, start_val, stop_val, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (start_val != -1 && stop_val != -1)
|
||||||
|
g_return_val_if_fail (start_val < stop_val, NULL);
|
||||||
|
|
||||||
return gst_event_new_custom (GST_EVENT_NEWSEGMENT,
|
return gst_event_new_custom (GST_EVENT_NEWSEGMENT,
|
||||||
gst_structure_new ("GstEventNewsegment", "rate", G_TYPE_DOUBLE, rate,
|
gst_structure_new ("GstEventNewsegment", "rate", G_TYPE_DOUBLE, rate,
|
||||||
"format", GST_TYPE_FORMAT, format,
|
"format", GST_TYPE_FORMAT, format,
|
||||||
|
@ -345,7 +362,6 @@ gst_event_parse_newsegment (GstEvent * event, gdouble * rate,
|
||||||
*base = g_value_get_int64 (gst_structure_get_value (structure, "base"));
|
*base = g_value_get_int64 (gst_structure_get_value (structure, "base"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tag event */
|
|
||||||
/**
|
/**
|
||||||
* gst_event_new_tag:
|
* gst_event_new_tag:
|
||||||
* @taglist: metadata list
|
* @taglist: metadata list
|
||||||
|
@ -420,6 +436,11 @@ GstEvent *
|
||||||
gst_event_new_qos (gdouble proportion, GstClockTimeDiff diff,
|
gst_event_new_qos (gdouble proportion, GstClockTimeDiff diff,
|
||||||
GstClockTime timestamp)
|
GstClockTime timestamp)
|
||||||
{
|
{
|
||||||
|
GST_CAT_INFO (GST_CAT_EVENT,
|
||||||
|
"creating qos proportion %lf, diff %" GST_TIME_FORMAT
|
||||||
|
", timestamp %" GST_TIME_FORMAT, proportion,
|
||||||
|
GST_TIME_ARGS (diff), GST_TIME_ARGS (timestamp));
|
||||||
|
|
||||||
return gst_event_new_custom (GST_EVENT_QOS,
|
return gst_event_new_custom (GST_EVENT_QOS,
|
||||||
gst_structure_new ("GstEventQOS",
|
gst_structure_new ("GstEventQOS",
|
||||||
"proportion", G_TYPE_DOUBLE, proportion,
|
"proportion", G_TYPE_DOUBLE, proportion,
|
||||||
|
@ -486,6 +507,21 @@ GstEvent *
|
||||||
gst_event_new_seek (gdouble rate, GstFormat format, GstSeekFlags flags,
|
gst_event_new_seek (gdouble rate, GstFormat format, GstSeekFlags flags,
|
||||||
GstSeekType cur_type, gint64 cur, GstSeekType stop_type, gint64 stop)
|
GstSeekType cur_type, gint64 cur, GstSeekType stop_type, gint64 stop)
|
||||||
{
|
{
|
||||||
|
if (format == GST_FORMAT_TIME) {
|
||||||
|
GST_CAT_INFO (GST_CAT_EVENT,
|
||||||
|
"creating seek rate %lf, format TIME, flags %d, "
|
||||||
|
"cur_type %d, cur %" GST_TIME_FORMAT ", "
|
||||||
|
"stop_type %d, stop %" GST_TIME_FORMAT,
|
||||||
|
rate, flags, cur_type, GST_TIME_ARGS (cur),
|
||||||
|
stop_type, GST_TIME_ARGS (stop));
|
||||||
|
} else {
|
||||||
|
GST_CAT_INFO (GST_CAT_EVENT,
|
||||||
|
"creating seek rate %lf, format %d, flags %d, "
|
||||||
|
"cur_type %d, cur %" G_GINT64_FORMAT ", "
|
||||||
|
"stop_type %d, stop %" G_GINT64_FORMAT,
|
||||||
|
rate, format, flags, cur_type, cur, stop_type, stop);
|
||||||
|
}
|
||||||
|
|
||||||
return gst_event_new_custom (GST_EVENT_SEEK,
|
return gst_event_new_custom (GST_EVENT_SEEK,
|
||||||
gst_structure_new ("GstEventSeek", "rate", G_TYPE_DOUBLE, rate,
|
gst_structure_new ("GstEventSeek", "rate", G_TYPE_DOUBLE, rate,
|
||||||
"format", GST_TYPE_FORMAT, format,
|
"format", GST_TYPE_FORMAT, format,
|
||||||
|
@ -539,7 +575,6 @@ gst_event_parse_seek (GstEvent * event, gdouble * rate, GstFormat * format,
|
||||||
*stop = g_value_get_int64 (gst_structure_get_value (structure, "stop"));
|
*stop = g_value_get_int64 (gst_structure_get_value (structure, "stop"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* navigation event */
|
|
||||||
/**
|
/**
|
||||||
* gst_event_new_navigation:
|
* gst_event_new_navigation:
|
||||||
* @structure: description of the event
|
* @structure: description of the event
|
||||||
|
|
|
@ -197,7 +197,6 @@ typedef enum {
|
||||||
* @GST_SEEK_FLAG_SEGMENT: perform a segment seek. After the playback
|
* @GST_SEEK_FLAG_SEGMENT: perform a segment seek. After the playback
|
||||||
* of the segment completes, no EOS will be emmited but a
|
* of the segment completes, no EOS will be emmited but a
|
||||||
* SEGMENT_DONE message will be posted on the bus.
|
* SEGMENT_DONE message will be posted on the bus.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_SEEK_FLAG_NONE = 0,
|
GST_SEEK_FLAG_NONE = 0,
|
||||||
|
|
|
@ -526,8 +526,9 @@ gst_queue_handle_sink_event (GstPad * pad, GstEvent * event)
|
||||||
/* now unblock the chain function */
|
/* now unblock the chain function */
|
||||||
GST_QUEUE_MUTEX_LOCK (queue);
|
GST_QUEUE_MUTEX_LOCK (queue);
|
||||||
queue->srcresult = GST_FLOW_WRONG_STATE;
|
queue->srcresult = GST_FLOW_WRONG_STATE;
|
||||||
/* unblock the loop function */
|
/* unblock the loop and chain functions */
|
||||||
g_cond_signal (queue->item_add);
|
g_cond_signal (queue->item_add);
|
||||||
|
g_cond_signal (queue->item_del);
|
||||||
GST_QUEUE_MUTEX_UNLOCK (queue);
|
GST_QUEUE_MUTEX_UNLOCK (queue);
|
||||||
|
|
||||||
/* make sure it pauses */
|
/* make sure it pauses */
|
||||||
|
|
|
@ -526,8 +526,9 @@ gst_queue_handle_sink_event (GstPad * pad, GstEvent * event)
|
||||||
/* now unblock the chain function */
|
/* now unblock the chain function */
|
||||||
GST_QUEUE_MUTEX_LOCK (queue);
|
GST_QUEUE_MUTEX_LOCK (queue);
|
||||||
queue->srcresult = GST_FLOW_WRONG_STATE;
|
queue->srcresult = GST_FLOW_WRONG_STATE;
|
||||||
/* unblock the loop function */
|
/* unblock the loop and chain functions */
|
||||||
g_cond_signal (queue->item_add);
|
g_cond_signal (queue->item_add);
|
||||||
|
g_cond_signal (queue->item_del);
|
||||||
GST_QUEUE_MUTEX_UNLOCK (queue);
|
GST_QUEUE_MUTEX_UNLOCK (queue);
|
||||||
|
|
||||||
/* make sure it pauses */
|
/* make sure it pauses */
|
||||||
|
|
Loading…
Reference in a new issue