From 4d937fafbb88f2de5145e3e9ea048d3b857d5978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 12 Feb 2012 20:51:39 +0000 Subject: [PATCH] event: rename gst_event_{set,parse}_stream_config_codec_data() to _setup_data() More generic. --- docs/gst/gstreamer-sections.txt | 4 ++-- gst/gstevent.c | 28 ++++++++++++++-------------- gst/gstevent.h | 4 ++-- gst/gstquark.c | 2 +- gst/gstquark.h | 2 +- tests/check/gst/gstevent.c | 8 ++++---- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index fe5a8a8956..d4d26350a3 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -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 diff --git a/gst/gstevent.c b/gst/gstevent.c index 8d624a1b97..a7abac3b3f 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -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 diff --git a/gst/gstevent.h b/gst/gstevent.h index 8e6f4750b3..a2d552b638 100644 --- a/gst/gstevent.h +++ b/gst/gstevent.h @@ -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); diff --git a/gst/gstquark.c b/gst/gstquark.c index 3ba0e37bf5..a416add28f 100644 --- a/gst/gstquark.c +++ b/gst/gstquark.c @@ -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]; diff --git a/gst/gstquark.h b/gst/gstquark.h index a8fce0156b..5225b24026 100644 --- a/gst/gstquark.h +++ b/gst/gstquark.h @@ -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 diff --git a/tests/check/gst/gstevent.c b/tests/check/gst/gstevent.c index 42dbd0d348..a641b06991 100644 --- a/tests/check/gst/gstevent.c +++ b/tests/check/gst/gstevent.c @@ -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));