use GST_MESSAGE_DURATION_CHANGED in docs and code
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 26 Feb 2013 14:32:25 +0000 (15:32 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 26 Feb 2013 14:32:25 +0000 (15:32 +0100)
docs/design/part-gstbin.txt
docs/design/part-messages.txt
gst/gstbin.c

index bf486f8..a262a9b 100644 (file)
@@ -95,11 +95,12 @@ returned durations and will then cache the result so that any further query can
 use the cached version. The reason for caching the result is because the
 duration of a stream typically does not change that often.
 
-A GST_MESSAGE_DURATION posted by an element will clear the cached duration value
-so that the bin will query the sinks again. This message is typically posted by
-elements that calculate the duration of the stream based on some average
-bitrate, which might change while playing the stream. The DURATION message is
-posted to the application, which can then fetch the updated DURATION.
+A GST_MESSAGE_DURATION_CHANGED posted by an element will clear the cached
+duration value so that the bin will query the sinks again. This message is
+typically posted by elements that calculate the duration of the stream based
+on some average bitrate, which might change while playing the stream. The
+DURATION_CHANGED message is posted to the application, which can then fetch
+the updated DURATION.
 
 
 Subclassing
index 6e23d5b..171cdab 100644 (file)
@@ -110,7 +110,7 @@ GST_MESSAGE_SEGMENT_DONE:
   An element or bin completed playback of a segment. This message is only posted
   on the bus if a SEGMENT seek is performed on a pipeline.
 
-GST_MESSAGE_DURATION:
+GST_MESSAGE_DURATION_CHANGED:
 
   An element posts this message when it has detected or updated the stream duration.
 
index b5b47de..c28f2d7 100644 (file)
@@ -3262,8 +3262,8 @@ bin_do_message_forward (GstBin * bin, GstMessage * message)
  *     result so we can answer it quicker the next time. Any element that
  *     changes its duration marks our cached values invalid.
  *     This message is also posted upwards. This is currently disabled
- *     because too many elements don't post DURATION messages when the
- *     duration changes.
+ *     because too many elements don't post DURATION_CHANGED messages when
+ *     the duration changes.
  *
  * GST_MESSAGE_CLOCK_LOST: This message is posted by an element when it
  *     can no longer provide a clock. The default bin behaviour is to
@@ -3426,7 +3426,7 @@ gst_bin_handle_message_func (GstBin * bin, GstMessage * message)
        * for duration, we will recalculate. */
 #if 0
       GST_OBJECT_LOCK (bin);
-      bin_remove_messages (bin, NULL, GST_MESSAGE_DURATION);
+      bin_remove_messages (bin, NULL, GST_MESSAGE_DURATION_CHANGED);
       GST_OBJECT_UNLOCK (bin);
 #endif
       goto forward;
@@ -3857,7 +3857,7 @@ gst_bin_query (GstElement * element, GstQuery * query)
       for (cached = bin->messages; cached; cached = g_list_next (cached)) {
         GstMessage *message = (GstMessage *) cached->data;
 
-        if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_DURATION &&
+        if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_DURATION_CHANGED &&
             GST_MESSAGE_SRC (message) == GST_OBJECT_CAST (bin)) {
           GstFormat format;
           gint64 duration;