From 75b997ad55d3c1ec9bb0e3004afd23e90f3a9e54 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 21 May 2007 12:05:14 +0000 Subject: [PATCH] docs/design/part-synchronisation.txt: Small addition. Original commit message from CVS: * docs/design/part-synchronisation.txt: Small addition. * gst/gstbin.c: (gst_bin_query): * plugins/elements/gstqueue.c: (apply_segment): Improve debugging. * gst/gstmessage.h: Improve docs. --- ChangeLog | 12 ++++++++++++ docs/design/part-synchronisation.txt | 3 ++- gst/gstbin.c | 4 ++-- gst/gstmessage.h | 24 ++++++++++++++++++------ plugins/elements/gstqueue.c | 3 +++ 5 files changed, 37 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0f004a852..a0497b326a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-05-21 Wim Taymans + + * docs/design/part-synchronisation.txt: + Small addition. + + * gst/gstbin.c: (gst_bin_query): + * plugins/elements/gstqueue.c: (apply_segment): + Improve debugging. + + * gst/gstmessage.h: + Improve docs. + 2007-05-21 Wim Taymans * gst/gstpad.c: (gst_pad_get_caps_unlocked), diff --git a/docs/design/part-synchronisation.txt b/docs/design/part-synchronisation.txt index 2d96695521..5f61942c7c 100644 --- a/docs/design/part-synchronisation.txt +++ b/docs/design/part-synchronisation.txt @@ -79,7 +79,8 @@ The following notation is used: - NS.rate: rate field of NEWSEGMENT event - NS.abs_rate: absolute value of rate field of NEWSEGMENT event - NS.time: time field in the NEWSEGMENT event - - NS.accum: total accumulated time of all previous segments + - NS.accum: total accumulated time of all previous NEWSEGMENT events. This + field is kept in the GstSegment structure. Valid buffers for synchronisation are those with B.timestamp between NS.start and NS.stop. All other buffers outside this range should be dropped or clipped diff --git a/gst/gstbin.c b/gst/gstbin.c index 17adc961ce..cf7034e280 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -3018,8 +3018,8 @@ gst_bin_query (GstElement * element, GstQuery * query) g_value_set_boolean (&ret, FALSE); iter = gst_bin_iterate_sinks (bin); - GST_DEBUG_OBJECT (bin, "Sending query %p (type %d) to sink children", - query, GST_QUERY_TYPE (query)); + GST_DEBUG_OBJECT (bin, "Sending query %p (type %s) to sink children", + query, GST_QUERY_TYPE_NAME (query)); if (fold_init) fold_init (bin, &fold_data); diff --git a/gst/gstmessage.h b/gst/gstmessage.h index 434d6759a6..744652ce5f 100644 --- a/gst/gstmessage.h +++ b/gst/gstmessage.h @@ -30,21 +30,33 @@ typedef struct _GstMessageClass GstMessageClass; /** * GstMessageType: * @GST_MESSAGE_UNKNOWN: an undefined message - * @GST_MESSAGE_EOS: end-of-stream reached in a pipeline - * @GST_MESSAGE_ERROR: an error occured + * @GST_MESSAGE_EOS: end-of-stream reached in a pipeline. The application will + * only receive this message in the PLAYING state and every time it sets a + * pipeline to PLAYING that is in the EOS state. The application can perform a + * seek in the pipeline to a new position. + * @GST_MESSAGE_ERROR: an error occured. Whe the application receives an error + * message it should stop playback of the pipeline and not assume that more + * data will be played. * @GST_MESSAGE_WARNING: a warning occured. * @GST_MESSAGE_INFO: an info message occured * @GST_MESSAGE_TAG: a tag was found. - * @GST_MESSAGE_BUFFERING: the pipeline is buffering + * @GST_MESSAGE_BUFFERING: the pipeline is buffering. When the application + * receives a buffering message in the PLAYING state for a non-live pipeline it + * must PAUSE the pipeline until the buffering completes, when the percentage + * field in the message is 100%. For live pipelines, no action must be + * performed and the buffering percentage can be used to infor the user about + * the progress. * @GST_MESSAGE_STATE_CHANGED: a state change happened - * @GST_MESSAGE_STATE_DIRTY: an element changed state in a streaming thread - * @GST_MESSAGE_STEP_DONE: a framestep finished. + * @GST_MESSAGE_STATE_DIRTY: an element changed state in a streaming thread. + * This message is deprecated. + * @GST_MESSAGE_STEP_DONE: a framestep finished. This message is not yet + * implemented. * @GST_MESSAGE_CLOCK_PROVIDE: an element notifies its capability of providing * a clock. * @GST_MESSAGE_CLOCK_LOST: The current clock as selected by the pipeline became * unusable. The pipeline will select a new clock on * the next PLAYING state change. - * @GST_MESSAGE_NEW_CLOCK: a new clock was selected in the pipeline + * @GST_MESSAGE_NEW_CLOCK: a new clock was selected in the pipeline. * @GST_MESSAGE_STRUCTURE_CHANGE: the structure of the pipeline changed. * @GST_MESSAGE_STREAM_STATUS: status about a stream, emitted when it starts, * stops, errors, etc.. diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index a3c5c62310..e2416cba2b 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -564,6 +564,9 @@ apply_segment (GstQueue * queue, GstEvent * event, GstSegment * segment) gst_segment_set_newsegment_full (segment, update, rate, arate, format, start, stop, time); + GST_DEBUG_OBJECT (queue, + "configured NEWSEGMENT %" GST_SEGMENT_FORMAT, segment); + /* segment can update the time level of the queue */ update_time_level (queue); }