Small docs updates.
authorWim Taymans <wim.taymans@gmail.com>
Tue, 19 Jul 2005 09:19:06 +0000 (09:19 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 19 Jul 2005 09:19:06 +0000 (09:19 +0000)
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.

ChangeLog
docs/design/part-clocks.txt
docs/design/part-events.txt
gst/base/gstbasesrc.c
libs/gst/base/gstbasesrc.c

index 09fd40b..1727565 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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):
index ddafa76..f8cfc94 100644 (file)
@@ -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
index 03f83b3..e471ede 100644 (file)
@@ -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
 ----
 
index d7b2b2f..4bc70da 100644 (file)
@@ -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;
   }
index d7b2b2f..4bc70da 100644 (file)
@@ -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;
   }