mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 18:35:35 +00:00
Small docs updates.
Original commit message from CVS: * docs/design/part-clocks.txt: * docs/design/part-events.txt: * gst/base/gstbasesrc.c: (gst_base_src_do_seek): Small docs updates. Only update the seeking values when we are not busy streaming.
This commit is contained in:
parent
690e87b1fd
commit
99a3a0a6c0
5 changed files with 43 additions and 28 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-07-19 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* docs/design/part-clocks.txt:
|
||||
* docs/design/part-events.txt:
|
||||
* gst/base/gstbasesrc.c: (gst_base_src_do_seek):
|
||||
Small docs updates.
|
||||
Only update the seeking values when we are not
|
||||
busy streaming.
|
||||
|
||||
2005-07-19 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* gst/base/gstbasesrc.c: (gst_base_src_loop):
|
||||
|
|
|
@ -73,7 +73,7 @@ The pipeline base time is propagated to all the element during the PAUSED
|
|||
to PLAYING state change. All elements are therefore able to convert the
|
||||
stream time to the absolute time. It is possible to specify an aditional
|
||||
delay to the base time to compensate for the delay it takes to perform
|
||||
the state change.
|
||||
the state change using the GstPipeline "delay" property.
|
||||
|
||||
|
||||
Clock features
|
||||
|
|
|
@ -98,6 +98,9 @@ Since the stream time is always set to 0 at start and after a seek, a 0
|
|||
point for all next buffer's timestamps has to be propagated through the
|
||||
pipeline using the DISCONT event.
|
||||
|
||||
Before sending buffers, an element must send a DISCONT event. An element is
|
||||
free to refuse buffers if they were not preceeded by a DISCONT event.
|
||||
|
||||
Elements that sync to the clock should store the DISCONT start and end values
|
||||
and substract the start value from the buffer timestamp before comparing
|
||||
it against the stream time (see part-clocks.txt).
|
||||
|
@ -107,14 +110,13 @@ substracted from the timestamp. If it does so, it needs to send a corrected
|
|||
DISCONT downstream, ie, one with start time 0.
|
||||
|
||||
A DISCONT event should be generated as soon as possible in the pipeline and
|
||||
is usually generated by a demuxer. The event is generated before pushing the
|
||||
first buffer and after a seek, right before pushing the new buffer.
|
||||
is usually generated by a demuxer or source. The event is generated before
|
||||
pushing the first buffer and after a seek, right before pushing the new buffer.
|
||||
|
||||
The DISCONT event can be send from both the application and the streaming
|
||||
thread and should be serialized with the buffers.
|
||||
|
||||
|
||||
|
||||
SEEK
|
||||
----
|
||||
|
||||
|
|
|
@ -387,6 +387,19 @@ gst_base_src_do_seek (GstBaseSrc * src, GstEvent * event)
|
|||
offset = GST_EVENT_SEEK_OFFSET (event);
|
||||
src->segment_loop = GST_EVENT_SEEK_FLAGS (event) & GST_SEEK_FLAG_SEGMENT_LOOP;
|
||||
|
||||
/* send flush start */
|
||||
gst_pad_push_event (src->srcpad, gst_event_new_flush (FALSE));
|
||||
|
||||
/* unblock streaming thread */
|
||||
gst_base_src_unlock (src);
|
||||
|
||||
/* grab streaming lock */
|
||||
GST_STREAM_LOCK (src->srcpad);
|
||||
|
||||
/* send flush end */
|
||||
gst_pad_push_event (src->srcpad, gst_event_new_flush (TRUE));
|
||||
|
||||
/* perform the seek */
|
||||
switch (GST_EVENT_SEEK_METHOD (event)) {
|
||||
case GST_SEEK_METHOD_SET:
|
||||
if (offset < 0)
|
||||
|
@ -419,18 +432,6 @@ gst_base_src_do_seek (GstBaseSrc * src, GstEvent * event)
|
|||
goto error;
|
||||
}
|
||||
|
||||
/* send flush start */
|
||||
gst_pad_push_event (src->srcpad, gst_event_new_flush (FALSE));
|
||||
|
||||
/* unblock streaming thread */
|
||||
gst_base_src_unlock (src);
|
||||
|
||||
/* grab streaming lock */
|
||||
GST_STREAM_LOCK (src->srcpad);
|
||||
|
||||
/* send flush end */
|
||||
gst_pad_push_event (src->srcpad, gst_event_new_flush (TRUE));
|
||||
|
||||
/* now send discont */
|
||||
gst_base_src_send_discont (src);
|
||||
|
||||
|
@ -447,6 +448,7 @@ gst_base_src_do_seek (GstBaseSrc * src, GstEvent * event)
|
|||
error:
|
||||
{
|
||||
GST_DEBUG_OBJECT (src, "seek error");
|
||||
GST_STREAM_UNLOCK (src->srcpad);
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -387,6 +387,19 @@ gst_base_src_do_seek (GstBaseSrc * src, GstEvent * event)
|
|||
offset = GST_EVENT_SEEK_OFFSET (event);
|
||||
src->segment_loop = GST_EVENT_SEEK_FLAGS (event) & GST_SEEK_FLAG_SEGMENT_LOOP;
|
||||
|
||||
/* send flush start */
|
||||
gst_pad_push_event (src->srcpad, gst_event_new_flush (FALSE));
|
||||
|
||||
/* unblock streaming thread */
|
||||
gst_base_src_unlock (src);
|
||||
|
||||
/* grab streaming lock */
|
||||
GST_STREAM_LOCK (src->srcpad);
|
||||
|
||||
/* send flush end */
|
||||
gst_pad_push_event (src->srcpad, gst_event_new_flush (TRUE));
|
||||
|
||||
/* perform the seek */
|
||||
switch (GST_EVENT_SEEK_METHOD (event)) {
|
||||
case GST_SEEK_METHOD_SET:
|
||||
if (offset < 0)
|
||||
|
@ -419,18 +432,6 @@ gst_base_src_do_seek (GstBaseSrc * src, GstEvent * event)
|
|||
goto error;
|
||||
}
|
||||
|
||||
/* send flush start */
|
||||
gst_pad_push_event (src->srcpad, gst_event_new_flush (FALSE));
|
||||
|
||||
/* unblock streaming thread */
|
||||
gst_base_src_unlock (src);
|
||||
|
||||
/* grab streaming lock */
|
||||
GST_STREAM_LOCK (src->srcpad);
|
||||
|
||||
/* send flush end */
|
||||
gst_pad_push_event (src->srcpad, gst_event_new_flush (TRUE));
|
||||
|
||||
/* now send discont */
|
||||
gst_base_src_send_discont (src);
|
||||
|
||||
|
@ -447,6 +448,7 @@ gst_base_src_do_seek (GstBaseSrc * src, GstEvent * event)
|
|||
error:
|
||||
{
|
||||
GST_DEBUG_OBJECT (src, "seek error");
|
||||
GST_STREAM_UNLOCK (src->srcpad);
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue