Port gtk-doc comments to their equivalent markdown syntax
[platform/upstream/gstreamer.git] / gst / gstevent.c
index 9059fe5..815898f 100644 (file)
@@ -23,6 +23,7 @@
 
 /**
  * SECTION:gstevent
+ * @title: GstEvent
  * @short_description: Structure describing events that are passed up and down
  *                     a pipeline
  * @see_also: #GstPad, #GstElement
@@ -57,8 +58,8 @@
  *   ...
  *   // construct a seek event to play the media from second 2 to 5, flush
  *   // the pipeline to decrease latency.
- *   event = gst_event_new_seek (1.0, 
- *      GST_FORMAT_TIME, 
+ *   event = gst_event_new_seek (1.0,
+ *      GST_FORMAT_TIME,
  *      GST_SEEK_FLAG_FLUSH,
  *      GST_SEEK_TYPE_SET, 2 * GST_SECOND,
  *      GST_SEEK_TYPE_SET, 5 * GST_SECOND);
@@ -130,6 +131,7 @@ static GstEventQuarks event_quarks[] = {
   {GST_EVENT_CUSTOM_DOWNSTREAM_STICKY, "custom-downstream-sticky", 0},
   {GST_EVENT_CUSTOM_BOTH, "custom-both", 0},
   {GST_EVENT_CUSTOM_BOTH_OOB, "custom-both-oob", 0},
+  {GST_EVENT_STREAM_GROUP_DONE, "stream-group-done", 0},
 
   {0, NULL, 0}
 };
@@ -579,7 +581,7 @@ gst_event_parse_flush_stop (GstEvent * event, gboolean * reset_time)
 
 /**
  * gst_event_new_select_streams:
- * @streams: (element-type gchar) (transfer none): the list of streams to
+ * @streams: (element-type utf8) (transfer none): the list of streams to
  * activate
  *
  * Allocate a new select-streams event.
@@ -588,10 +590,12 @@ gst_event_parse_flush_stop (GstEvent * event, gboolean * reset_time)
  *
  * The list of @streams corresponds to the "Stream ID" of each stream to be
  * activated. Those ID can be obtained via the #GstStream objects present
- * in #GST_EVENT_STREAM_START, #GST_EVENT_STREAM_COLLECTION or 
+ * in #GST_EVENT_STREAM_START, #GST_EVENT_STREAM_COLLECTION or
  * #GST_MESSSAGE_STREAM_COLLECTION.
  *
  * Returns: (transfer full): a new select-streams event.
+ *
+ * Since: 1.10
  */
 GstEvent *
 gst_event_new_select_streams (GList * streams)
@@ -621,9 +625,11 @@ gst_event_new_select_streams (GList * streams)
 /**
  * gst_event_parse_select_streams:
  * @event: The event to parse
- * @streams: (out) (element-type gchar) (transfer full): the streams
+ * @streams: (out) (element-type utf8) (transfer full): the streams
  *
  * Parse the SELECT_STREAMS event and retrieve the contained streams.
+ *
+ * Since: 1.10
  */
 void
 gst_event_parse_select_streams (GstEvent * event, GList ** streams)
@@ -649,6 +655,57 @@ gst_event_parse_select_streams (GstEvent * event, GList ** streams)
 
 
 /**
+ * gst_event_new_stream_group_done:
+ * @group_id: the group id of the stream group which is ending
+ *
+ * Create a new Stream Group Done event. The stream-group-done event can
+ * only travel downstream synchronized with the buffer flow. Elements
+ * that receive the event on a pad should handle it mostly like EOS,
+ * and emit any data or pending buffers that would depend on more data
+ * arriving and unblock, since there won't be any more data.
+ *
+ * This event is followed by EOS at some point in the future, and is
+ * generally used when switching pads - to unblock downstream so that
+ * new pads can be exposed before sending EOS on the existing pads.
+ *
+ * Returns: (transfer full): the new stream-group-done event.
+ *
+ * Since: 1.10
+ */
+GstEvent *
+gst_event_new_stream_group_done (guint group_id)
+{
+  GstStructure *s;
+
+  s = gst_structure_new_id (GST_QUARK (EVENT_STREAM_GROUP_DONE),
+      GST_QUARK (GROUP_ID), G_TYPE_UINT, group_id, NULL);
+
+  return gst_event_new_custom (GST_EVENT_STREAM_GROUP_DONE, s);
+}
+
+/**
+ * gst_event_parse_stream_group_done:
+ * @event: a stream-group-done event.
+ * @group_id: (out): address of variable to store the group id into
+ *
+ * Parse a stream-group-done @event and store the result in the given
+ * @group_id location.
+ *
+ * Since: 1.10
+ */
+void
+gst_event_parse_stream_group_done (GstEvent * event, guint * group_id)
+{
+  g_return_if_fail (event != NULL);
+  g_return_if_fail (GST_EVENT_TYPE (event) == GST_EVENT_STREAM_GROUP_DONE);
+
+  if (group_id) {
+    gst_structure_id_get (GST_EVENT_STRUCTURE (event),
+        GST_QUARK (GROUP_ID), G_TYPE_UINT, group_id, NULL);
+  }
+}
+
+/**
  * gst_event_new_eos:
  *
  * Create a new EOS event. The eos event can only travel downstream
@@ -1033,7 +1090,7 @@ gst_event_parse_buffer_size (GstEvent * event, GstFormat * format,
  * @type indicates the reason for the QoS event. #GST_QOS_TYPE_OVERFLOW is
  * used when a buffer arrived in time or when the sink cannot keep up with
  * the upstream datarate. #GST_QOS_TYPE_UNDERFLOW is when the sink is not
- * receiving buffers fast enough and thus has to drop late buffers. 
+ * receiving buffers fast enough and thus has to drop late buffers.
  * #GST_QOS_TYPE_THROTTLE is used when the datarate is artificially limited
  * by the application, for example to reduce power consumption.
  *
@@ -1173,15 +1230,15 @@ gst_event_parse_qos (GstEvent * event, GstQOSType * type,
  *
  * A pipeline has a default playback segment configured with a start
  * position of 0, a stop position of -1 and a rate of 1.0. The currently
- * configured playback segment can be queried with #GST_QUERY_SEGMENT. 
+ * configured playback segment can be queried with #GST_QUERY_SEGMENT.
  *
- * @start_type and @stop_type specify how to adjust the currently configured 
+ * @start_type and @stop_type specify how to adjust the currently configured
  * start and stop fields in playback segment. Adjustments can be made relative
  * or absolute to the last configured values. A type of #GST_SEEK_TYPE_NONE
  * means that the position should not be updated.
  *
  * When the rate is positive and @start has been updated, playback will start
- * from the newly configured start position. 
+ * from the newly configured start position.
  *
  * For negative rates, playback will start from the newly configured stop
  * position (if any). If the stop position is updated, it must be different from
@@ -1585,8 +1642,10 @@ gst_event_parse_stream_start (GstEvent * event, const gchar ** stream_id)
  * @event: a stream-start event
  * @stream: (transfer none): the stream object to set
  *
- * Set the @stream on the stream-start @event 
- **/
+ * Set the @stream on the stream-start @event
+ *
+ * Since: 1.10
+ */
 void
 gst_event_set_stream (GstEvent * event, GstStream * stream)
 {
@@ -1604,7 +1663,9 @@ gst_event_set_stream (GstEvent * event, GstStream * stream)
  * @stream: (out) (transfer full): adress of variable to store the stream
  *
  * Parse a stream-start @event and extract the #GstStream from it.
- **/
+ *
+ * Since: 1.10
+ */
 void
 gst_event_parse_stream (GstEvent * event, GstStream ** stream)
 {
@@ -1720,6 +1781,8 @@ gst_event_parse_group_id (GstEvent * event, guint * group_id)
  * data flow.
  *
  * Returns: (transfer full): the new STREAM_COLLECTION event.
+ *
+ * Since: 1.10
  */
 GstEvent *
 gst_event_new_stream_collection (GstStreamCollection * collection)
@@ -1735,6 +1798,15 @@ gst_event_new_stream_collection (GstStreamCollection * collection)
   return gst_event_new_custom (GST_EVENT_STREAM_COLLECTION, s);
 }
 
+/**
+ * gst_event_parse_stream_collection:
+ * @event: a stream-collection event
+ * @collection: (out): pointer to store the collection
+ *
+ * Retrieve new #GstStreamCollection from STREAM_COLLECTION event @event.
+ *
+ * Since: 1.10
+ */
 void
 gst_event_parse_stream_collection (GstEvent * event,
     GstStreamCollection ** collection)