gst/gstpipeline.c: Some more comments.
authorWim Taymans <wim.taymans@gmail.com>
Wed, 29 Oct 2008 17:04:50 +0000 (17:04 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Wed, 29 Oct 2008 17:04:50 +0000 (17:04 +0000)
Original commit message from CVS:
* gst/gstpipeline.c: (gst_pipeline_provide_clock_func):
Some more comments.

ChangeLog
gst/gstpipeline.c

index a4c3997..7bb3ba9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-29  Wim Taymans  <wim.taymans@collabora.co.uk>
+
+       * gst/gstpipeline.c: (gst_pipeline_provide_clock_func):
+       Some more comments.
+
 2008-10-27  Wim Taymans  <wim.taymans@collabora.co.uk>
 
        * libs/gst/base/gstbasetransform.c:
index 4a91650..ed8b87a 100644 (file)
@@ -68,7 +68,9 @@
  * performed on it, the stream time is reset to 0. When the pipeline is
  * set from PLAYING to PAUSED, the current clock time is sampled and used to
  * configure the base time for the elements when the pipeline is set
- * to PLAYING again. This default behaviour can be changed with the
+ * to PLAYING again. The effect is that the stream time (as the difference
+ * between the clock time and the base time) will count how much time was spent
+ * in the PLAYING state. This default behaviour can be changed with the
  * gst_pipeline_set_new_stream_time() method.
  *
  * When sending a flushing seek event to a GstPipeline (see
@@ -545,6 +547,12 @@ invalid_clock:
   }
 }
 
+/* intercept the bus messages from our children. We watch for the ASYNC_START
+ * message with is posted by the elements (sinks) that require a reset of the
+ * running_time after a flush. ASYNC_START also brings the pipeline back into
+ * the PAUSED, pending PAUSED state. When the ASYNC_DONE message is received the
+ * pipeline will redistribute the new base_time and will bring the elements back
+ * to the desired state of the pipeline. */
 static void
 gst_pipeline_handle_message (GstBin * bin, GstMessage * message)
 {
@@ -671,8 +679,8 @@ gst_pipeline_provide_clock_func (GstElement * element)
     GST_OBJECT_UNLOCK (pipeline);
     /* let the parent bin select a clock */
     clock =
-        GST_ELEMENT_CLASS (parent_class)->
-        provide_clock (GST_ELEMENT (pipeline));
+        GST_ELEMENT_CLASS (parent_class)->provide_clock (GST_ELEMENT
+        (pipeline));
     /* no clock, use a system clock */
     if (!clock) {
       clock = gst_system_clock_obtain ();