event: rename gst_event_{set,parse}_stream_config_codec_data() to _setup_data()
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 12 Feb 2012 20:51:39 +0000 (20:51 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 12 Feb 2012 20:51:39 +0000 (20:51 +0000)
More generic.

docs/gst/gstreamer-sections.txt
gst/gstevent.c
gst/gstevent.h
gst/gstquark.c
gst/gstquark.h
tests/check/gst/gstevent.c

index fe5a8a8..d4d2635 100644 (file)
@@ -974,8 +974,8 @@ GstStreamConfigFlags
 gst_event_new_stream_config
 gst_event_parse_stream_config
 
-gst_event_set_stream_config_codec_data
-gst_event_parse_stream_config_codec_data
+gst_event_set_stream_config_setup_data
+gst_event_parse_stream_config_setup_data
 
 gst_event_add_stream_config_header
 gst_event_get_n_stream_config_headers
index 8d624a1..a7abac3 100644 (file)
@@ -675,7 +675,7 @@ gst_event_parse_caps (GstEvent * event, GstCaps ** caps)
  * Create a new STREAM CONFIG event. The stream config event travels
  * downstream synchronized with the buffer flow and contains stream
  * configuration information for the stream, such as stream-headers
- * or codec-data. It is optional and should be sent after the CAPS
+ * or setup-data. It is optional and should be sent after the CAPS
  * event.
  *
  * Returns: (transfer full): the new STREAM CONFIG event.
@@ -718,18 +718,18 @@ gst_event_parse_stream_config (GstEvent * event, GstStreamConfigFlags * flags)
 }
 
 /**
- * gst_event_set_stream_config_codec_data:
+ * gst_event_set_stream_config_setup_data:
  * @event: a stream config event
- * @buf: a #GstBuffer with codec data
+ * @buf: a #GstBuffer with setup data
  *
- * Set codec data on the stream info event to signal out of bound setup data
- * to downstream elements. Unlike stream headers, codec data contains data
+ * Set setup data on the stream info event to signal out of bound setup data
+ * to downstream elements. Unlike stream headers, setup data contains data
  * that is required to interpret the data stream, but is not valid as-is
  * inside the data stream and thus can't just be prepended to or inserted
  * into the data stream.
  */
 void
-gst_event_set_stream_config_codec_data (GstEvent * event, GstBuffer * buf)
+gst_event_set_stream_config_setup_data (GstEvent * event, GstBuffer * buf)
 {
   GstStructure *s;
 
@@ -738,21 +738,21 @@ gst_event_set_stream_config_codec_data (GstEvent * event, GstBuffer * buf)
   g_return_if_fail (GST_IS_BUFFER (buf) && gst_buffer_get_size (buf) > 0);
 
   s = GST_EVENT_STRUCTURE (event);
-  gst_structure_id_set (s, GST_QUARK (CODEC_DATA), GST_TYPE_BUFFER, buf, NULL);
+  gst_structure_id_set (s, GST_QUARK (SETUP_DATA), GST_TYPE_BUFFER, buf, NULL);
 }
 
 /**
- * gst_event_set_stream_config_codec_data:
+ * gst_event_set_stream_config_setup_data:
  * @event: a stream config event
- * @buf: (out) (transfer none): location where to store the #GstBuffer with codec data
+ * @buf: (out) (transfer none): location where to store the #GstBuffer with setup data
  *
- * Extracts the codec data buffer from the stream info event. Will store
- * %NULL in @buf if the event contains no codec data. The buffer returned
+ * Extracts the setup data buffer from the stream info event. Will store
+ * %NULL in @buf if the event contains no setup data. The buffer returned
  * will remain valid as long as @event remains valid. The caller should
- * acquire a referenceto to @buf if needed.
+ * acquire a reference to to @buf if needed.
  */
 void
-gst_event_parse_stream_config_codec_data (GstEvent * event, GstBuffer ** buf)
+gst_event_parse_stream_config_setup_data (GstEvent * event, GstBuffer ** buf)
 {
   const GValue *val;
   GstStructure *s;
@@ -762,7 +762,7 @@ gst_event_parse_stream_config_codec_data (GstEvent * event, GstBuffer ** buf)
   g_return_if_fail (buf != NULL);
 
   s = GST_EVENT_STRUCTURE (event);
-  val = gst_structure_id_get_value (s, GST_QUARK (CODEC_DATA));
+  val = gst_structure_id_get_value (s, GST_QUARK (SETUP_DATA));
   if (val != NULL)
     *buf = g_value_get_boxed (val);
   else
index 8e6f475..a2d552b 100644 (file)
@@ -501,9 +501,9 @@ GstEvent *      gst_event_new_stream_config                (GstStreamConfigFlags
 void            gst_event_parse_stream_config              (GstEvent * event, GstStreamConfigFlags * flags);
 
 
-void            gst_event_set_stream_config_codec_data     (GstEvent * event, GstBuffer  * buf);
+void            gst_event_set_stream_config_setup_data     (GstEvent * event, GstBuffer  * buf);
 
-void            gst_event_parse_stream_config_codec_data   (GstEvent * event, GstBuffer ** buf);
+void            gst_event_parse_stream_config_setup_data   (GstEvent * event, GstBuffer ** buf);
 
 
 void            gst_event_add_stream_config_header         (GstEvent * event, GstBuffer  * buf);
index 3ba0e37..a416add 100644 (file)
@@ -56,7 +56,7 @@ static const gchar *_quark_strings[] = {
   "GstEventReconfigure", "segment", "GstQueryScheduling", "pull-mode",
   "allocator", "GstEventFlushStop", "options", "GstQueryAcceptCaps",
   "result", "GstQueryCaps", "filter", "modes", "GstEventStreamConfig",
-  "codec-data", "stream-headers", "GstEventGap"
+  "setup-data", "stream-headers", "GstEventGap"
 };
 
 GQuark _priv_gst_quark_table[GST_QUARK_MAX];
index a8fce01..5225b24 100644 (file)
@@ -159,7 +159,7 @@ typedef enum _GstQuarkId
   GST_QUARK_FILTER = 130,
   GST_QUARK_MODES = 131,
   GST_QUARK_EVENT_STREAM_CONFIG = 132,
-  GST_QUARK_CODEC_DATA = 133,
+  GST_QUARK_SETUP_DATA = 133,
   GST_QUARK_STREAM_HEADERS = 134,
   GST_QUARK_EVENT_GAP = 135,
   GST_QUARK_MAX = 136
index 42dbd0d..a641b06 100644 (file)
@@ -124,7 +124,7 @@ GST_START_TEST (create_events)
 
     /* set buf to something random but guaranteed to be non-NULL */
     buf = (GstBuffer *) & dummy;
-    gst_event_parse_stream_config_codec_data (event, &buf);
+    gst_event_parse_stream_config_setup_data (event, &buf);
     fail_unless (buf == NULL);
 
     buf = (GstBuffer *) & dummy;
@@ -135,17 +135,17 @@ GST_START_TEST (create_events)
     gst_event_parse_nth_stream_config_header (event, 98416, &buf);
     fail_unless (buf == NULL);
 
-    ASSERT_CRITICAL (gst_event_set_stream_config_codec_data (event, NULL));
+    ASSERT_CRITICAL (gst_event_set_stream_config_setup_data (event, NULL));
     ASSERT_CRITICAL (gst_event_add_stream_config_header (event, NULL));
 
     cd = gst_buffer_new_wrapped_full ((gpointer) "SetMeUpScottie", NULL, 0, 14);
-    gst_event_set_stream_config_codec_data (event, cd);
+    gst_event_set_stream_config_setup_data (event, cd);
     gst_buffer_unref (cd);
 
     buf = (GstBuffer *) & dummy;
     gst_event_parse_nth_stream_config_header (event, 0, &buf);
     fail_unless (buf == NULL);
-    gst_event_parse_stream_config_codec_data (event, &buf);
+    gst_event_parse_stream_config_setup_data (event, &buf);
     fail_unless (buf == cd);
     fail_unless (GST_IS_BUFFER (buf));