+2007-03-19 Wim Taymans <wim@fluendo.com>
+
+ * docs/gst/gstreamer-sections.txt:
+ * gst/gstmessage.c: (gst_message_new_async_start),
+ (gst_message_new_async_done), (gst_message_parse_info),
+ (gst_message_parse_async_start):
+ * gst/gstmessage.h:
+ Add ASYNC_START and ASYNC_DONE messages to prepare for latency
+ support.
+
2007-03-15 Tim-Philipp Müller <tim at centricular dot net>
* tools/gst-inspect.c:
gst_message_new_warning
gst_message_new_duration
gst_message_new_state_dirty
+gst_message_new_async_start
+gst_message_new_async_done
gst_message_new_latency
gst_message_parse_clock_lost
gst_message_parse_clock_provide
gst_message_parse_buffering
gst_message_parse_warning
gst_message_parse_duration
+gst_message_parse_async_start
gst_message_ref
gst_message_unref
+
<SUBSECTION Standard>
GstMessageClass
GST_MESSAGE
{GST_MESSAGE_SEGMENT_DONE, "segment-done", 0},
{GST_MESSAGE_DURATION, "duration", 0},
{GST_MESSAGE_LATENCY, "latency", 0},
+ {GST_MESSAGE_ASYNC_START, "async-start", 0},
+ {GST_MESSAGE_ASYNC_DONE, "async-done", 0},
{0, NULL, 0}
};
}
/**
+ * gst_message_new_async_start:
+ * @src: The object originating the message.
+ * @new_base_time: if a new base_time should be set on the element
+ *
+ * This message is posted by elements when they start an ASYNC state change.
+ * @new_base_time is set to TRUE when the element lost its state when it was
+ * PLAYING.
+ *
+ * Returns: The new async_start message.
+ *
+ * MT safe.
+ *
+ * Since: 0.10.13
+ */
+GstMessage *
+gst_message_new_async_start (GstObject * src, gboolean new_base_time)
+{
+ GstMessage *message;
+
+ message = gst_message_new_custom (GST_MESSAGE_ASYNC_START, src,
+ gst_structure_new ("GstMessageAsyncStart",
+ "new-base-time", G_TYPE_BOOLEAN, new_base_time, NULL));
+
+ return message;
+}
+
+/**
+ * gst_message_new_async_done:
+ * @src: The object originating the message.
+ *
+ * Returns: The new async_done message.
+ *
+ * MT safe.
+ *
+ * Since: 0.10.13
+ */
+GstMessage *
+gst_message_new_async_done (GstObject * src)
+{
+ GstMessage *message;
+
+ message = gst_message_new_custom (GST_MESSAGE_ASYNC_DONE, src, NULL);
+
+ return message;
+}
+
+/**
* gst_message_new_latency:
* @src: The object originating the message.
*
*duration =
g_value_get_int64 (gst_structure_get_value (structure, "duration"));
}
+
+/**
+ * gst_message_parse_async_start:
+ * @message: A valid #GstMessage of type GST_MESSAGE_ASYNC_DONE.
+ * @new_base_time: Result location for the new_base_time or NULL
+ *
+ * Extract the new_base_time from the async_start message.
+ *
+ * MT safe.
+ *
+ * Since: 0.10.13
+ */
+void
+gst_message_parse_async_start (GstMessage * message, gboolean * new_base_time)
+{
+ const GstStructure *structure;
+
+ g_return_if_fail (GST_IS_MESSAGE (message));
+ g_return_if_fail (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ASYNC_START);
+
+ structure = gst_message_get_structure (message);
+ if (new_base_time)
+ *new_base_time =
+ g_value_get_boolean (gst_structure_get_value (structure,
+ "new-base-time"));
+}
* @GST_MESSAGE_SEGMENT_START: pipeline started playback of a segment.
* @GST_MESSAGE_SEGMENT_DONE: pipeline completed playback of a segment.
* @GST_MESSAGE_DURATION: The duration of a pipeline changed.
+ * @GST_MESSAGE_ASYNC_START: Posted by elements when they start an ASYNC state
+ * change. Since: 0.10.13
+ * @GST_MESSAGE_ASYNC_DONE: Posted by elements when they complete an ASYNC state
+ * change. Since: 0.10.13
* @GST_MESSAGE_LATENCY: Posted by elements when their latency changes. The
* pipeline will calculate and distribute a new latency. Since: 0.10.12
* @GST_MESSAGE_ANY: mask for all of the above messages.
GST_MESSAGE_SEGMENT_DONE = (1 << 17),
GST_MESSAGE_DURATION = (1 << 18),
GST_MESSAGE_LATENCY = (1 << 19),
+ GST_MESSAGE_ASYNC_START = (1 << 20),
+ GST_MESSAGE_ASYNC_DONE = (1 << 21),
GST_MESSAGE_ANY = ~0
} GstMessageType;
GstMessage * gst_message_new_segment_start (GstObject * src, GstFormat format, gint64 position);
GstMessage * gst_message_new_segment_done (GstObject * src, GstFormat format, gint64 position);
GstMessage * gst_message_new_duration (GstObject * src, GstFormat format, gint64 duration);
+GstMessage * gst_message_new_async_start (GstObject * src, gboolean new_base_time);
+GstMessage * gst_message_new_async_done (GstObject * src);
GstMessage * gst_message_new_latency (GstObject * src);
GstMessage * gst_message_new_custom (GstMessageType type,
GstObject * src,
void gst_message_parse_segment_start (GstMessage *message, GstFormat *format, gint64 *position);
void gst_message_parse_segment_done (GstMessage *message, GstFormat *format, gint64 *position);
void gst_message_parse_duration (GstMessage *message, GstFormat *format, gint64 *duration);
+void gst_message_parse_async_start (GstMessage *message, gboolean *new_base_time);
const GstStructure * gst_message_get_structure (GstMessage *message);