event: Add constructor and docs for the new STREAM_START event

This commit is contained in:
Sebastian Dröge 2012-01-27 10:30:43 +01:00
parent 2a8c98fe23
commit 9318934cf0
4 changed files with 29 additions and 2 deletions

View file

@ -941,6 +941,8 @@ gst_event_parse_flush_stop
gst_event_new_eos
gst_event_new_stream_start
gst_event_new_segment
gst_event_parse_segment
gst_event_copy_segment

View file

@ -1317,3 +1317,23 @@ gst_event_parse_sink_message (GstEvent * event, GstMessage ** msg)
GST_MESSAGE (g_value_dup_boxed (gst_structure_id_get_value
(structure, GST_QUARK (MESSAGE))));
}
/**
* gst_event_new_stream_start
*
* Create a new STREAM_START event. The stream start event can only
* travel downstream synchronized with the buffer flow. It is expected
* to be the first event that is sent for a new stream.
*
* Source elements, demuxers and other elements that create new streams
* are supposed to send this event as the first event of a new stream. It
* should not be send after a flushing seek or in similar situations
* and is used to mark the beginning of a new logical stream.
*
* Returns: (transfer full): the new STREAM_START event.
*/
GstEvent *
gst_event_new_stream_start (void)
{
return gst_event_new (GST_EVENT_STREAM_START);
}

View file

@ -80,8 +80,9 @@ typedef enum {
* from the pipeline and unblock all streaming threads.
* @GST_EVENT_FLUSH_STOP: Stop a flush operation. This event resets the
* running-time of the pipeline.
* @GST_EVENT_STREAM_START: (unimplemented) event to mark the start of a new
* stream.
* @GST_EVENT_STREAM_START: Event to mark the start of a new stream. Sent before any
* other serialized event and only sent at the start of a new stream,
* not after flushing seeks.
* @GST_EVENT_CAPS: #GstCaps event. Notify the pad of a new media type.
* @GST_EVENT_STREAM_CONFIG: (unimplemented) contains configuration information
* for the stream, for example stream-headers and codec-data.
@ -466,6 +467,9 @@ gboolean gst_event_has_name (GstEvent *event, const gchar *n
guint32 gst_event_get_seqnum (GstEvent *event);
void gst_event_set_seqnum (GstEvent *event, guint32 seqnum);
/* Stream start event */
GstEvent * gst_event_new_stream_start (void) G_GNUC_MALLOC;
/* flush events */
GstEvent * gst_event_new_flush_start (void) G_GNUC_MALLOC;

View file

@ -417,6 +417,7 @@ EXPORTS
gst_event_new_segment
gst_event_new_sink_message
gst_event_new_step
gst_event_new_stream_start
gst_event_new_tag
gst_event_parse_buffer_size
gst_event_parse_caps