summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2012-01-30 17:16:17 +0100
committerTim-Philipp Müller <tim@centricular.net>2012-09-11 01:54:44 +0100
commitf6cab316ccad4dab9cc2b0dc5baab8323d060f91 (patch)
treec3347c85b0ccf9f6e820ea7a9e3ffc2528f0a302
parent33344dc2b9724408a7440602bd3b6a06a5e951b2 (diff)
update for HEADER flag changes
-rw-r--r--gst/gdp/dataprotocol.c3
-rw-r--r--gst/gdp/gstgdppay.c29
-rw-r--r--tests/check/elements/gdpdepay.c4
-rw-r--r--tests/check/elements/gdppay.c2
-rw-r--r--tests/check/pipelines/streamheader.c4
5 files changed, 20 insertions, 22 deletions
diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c
index e17583db8..c19fd9aa4 100644
--- a/gst/gdp/dataprotocol.c
+++ b/gst/gdp/dataprotocol.c
@@ -155,8 +155,7 @@ gst_dp_header_from_buffer_any (const GstBuffer * buffer, GstDPHeaderFlag flags,
/* data flags; eats two bytes from the ABI area */
/* we copy everything but the read-only flags */
flags_mask = GST_BUFFER_FLAG_LIVE | GST_BUFFER_FLAG_DISCONT |
- GST_BUFFER_FLAG_IN_CAPS | GST_BUFFER_FLAG_GAP |
- GST_BUFFER_FLAG_DELTA_UNIT;
+ GST_BUFFER_FLAG_HEADER | GST_BUFFER_FLAG_GAP | GST_BUFFER_FLAG_DELTA_UNIT;
GST_WRITE_UINT16_BE (h + 42, GST_BUFFER_FLAGS (buffer) & flags_mask);
diff --git a/gst/gdp/gstgdppay.c b/gst/gdp/gstgdppay.c
index 5cc59d620..e587759a0 100644
--- a/gst/gdp/gstgdppay.c
+++ b/gst/gdp/gstgdppay.c
@@ -410,9 +410,9 @@ gst_gdp_pay_reset_streamheader (GstGDPPay * this)
bufval = &g_array_index (buffers, GValue, i);
buffer = g_value_peek_pointer (bufval);
/* this buffer is deserialized by gdpdepay as a regular buffer,
- it needs IN_CAPS, because it's a streamheader - otherwise it
+ it needs HEADER, because it's a streamheader - otherwise it
is mixed with regular data buffers */
- GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_HEADER);
GST_BUFFER_OFFSET (buffer) = GST_BUFFER_OFFSET_NONE;
GST_BUFFER_OFFSET_END (buffer) = GST_BUFFER_OFFSET_NONE;
GST_BUFFER_TIMESTAMP (buffer) = GST_CLOCK_TIME_NONE;
@@ -423,11 +423,10 @@ gst_gdp_pay_reset_streamheader (GstGDPPay * this)
goto no_buffer;
}
- /* Setting IN_CAPS as other GDP event buffers */
+ /* Setting HEADER as other GDP event buffers */
GST_DEBUG_OBJECT (this,
- "Setting IN_CAPS flag on outgoing buffer %" GST_PTR_FORMAT,
- outbuffer);
- GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_IN_CAPS);
+ "Setting HEADER flag on outgoing buffer %" GST_PTR_FORMAT, outbuffer);
+ GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
GST_BUFFER_OFFSET (outbuffer) = GST_BUFFER_OFFSET_NONE;
GST_BUFFER_OFFSET_END (outbuffer) = GST_BUFFER_OFFSET_NONE;
GST_BUFFER_TIMESTAMP (outbuffer) = GST_CLOCK_TIME_NONE;
@@ -582,7 +581,7 @@ gst_gdp_pay_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
} else {
GST_BUFFER_TIMESTAMP (outbuffer) = GST_BUFFER_TIMESTAMP (buffer);
GST_BUFFER_DURATION (outbuffer) = 0;
- GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
GST_DEBUG_OBJECT (this, "Storing buffer %p as new_segment_buf",
outbuffer);
this->new_segment_buf = outbuffer;
@@ -604,7 +603,7 @@ gst_gdp_pay_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
GST_BUFFER_TIMESTAMP (outbuffer) = GST_BUFFER_TIMESTAMP (buffer);
GST_BUFFER_DURATION (outbuffer) = 0;
- GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
if (this->caps_buf)
gst_buffer_unref (this->caps_buf);
@@ -622,13 +621,13 @@ gst_gdp_pay_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
if (!outbuffer)
goto no_buffer;
- /* If the incoming buffer is IN_CAPS, that means we have it on the caps
+ /* If the incoming buffer is HEADER, that means we have it on the caps
* as streamheader, and we have serialized a GDP version of it and put it
* on our caps */
- if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_IN_CAPS)) {
- GST_DEBUG_OBJECT (this, "Setting IN_CAPS flag on outgoing buffer %p",
+ if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_HEADER)) {
+ GST_DEBUG_OBJECT (this, "Setting HEADER flag on outgoing buffer %p",
outbuffer);
- GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
}
gst_gdp_stamp_buffer (this, outbuffer);
@@ -704,7 +703,7 @@ gst_gdp_pay_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
gst_buffer_unref (this->new_segment_buf);
this->new_segment_buf = outbuffer;
- GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
gst_gdp_pay_reset_streamheader (this);
break;
case GST_EVENT_CAPS:{
@@ -717,7 +716,7 @@ gst_gdp_pay_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
goto no_buffer_from_caps;
GST_BUFFER_DURATION (outbuffer) = 0;
- GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
if (this->caps_buf)
gst_buffer_unref (this->caps_buf);
this->caps_buf = outbuffer;
@@ -733,7 +732,7 @@ gst_gdp_pay_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
gst_buffer_unref (this->tag_buf);
this->tag_buf = outbuffer;
- GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (outbuffer, GST_BUFFER_FLAG_HEADER);
gst_gdp_pay_reset_streamheader (this);
break;
default:
diff --git a/tests/check/elements/gdpdepay.c b/tests/check/elements/gdpdepay.c
index a736d013e..31d142efd 100644
--- a/tests/check/elements/gdpdepay.c
+++ b/tests/check/elements/gdpdepay.c
@@ -314,7 +314,7 @@ GST_START_TEST (test_streamheader)
structure = gst_caps_get_structure (caps, 0);
buffer = gst_buffer_new_and_alloc (4);
gst_buffer_fill (buffer, 0, "f00d", 4);
- GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_HEADER);
g_value_init (&array, GST_TYPE_ARRAY);
g_value_init (&value, GST_TYPE_BUFFER);
shbuffer = gst_buffer_copy (buffer);
@@ -362,7 +362,7 @@ GST_START_TEST (test_streamheader)
fail_if ((outbuffer = (GstBuffer *) buffers->data) == NULL);
buffers = g_list_remove (buffers, outbuffer);
ASSERT_BUFFER_REFCOUNT (outbuffer, "outbuffer", 1);
- fail_unless (GST_BUFFER_FLAG_IS_SET (outbuffer, GST_BUFFER_FLAG_IN_CAPS));
+ fail_unless (GST_BUFFER_FLAG_IS_SET (outbuffer, GST_BUFFER_FLAG_HEADER));
/* FIXME: get streamheader, compare data with buffer */
gst_buffer_unref (outbuffer);
diff --git a/tests/check/elements/gdppay.c b/tests/check/elements/gdppay.c
index 84384eaec..69cdc71db 100644
--- a/tests/check/elements/gdppay.c
+++ b/tests/check/elements/gdppay.c
@@ -268,7 +268,7 @@ GST_START_TEST (test_streamheader)
gst_buffer_fill (inbuffer, 0, "head", 4);
caps = gst_caps_from_string ("application/x-gst-test-streamheader");
structure = gst_caps_get_structure (caps, 0);
- GST_BUFFER_FLAG_SET (inbuffer, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (inbuffer, GST_BUFFER_FLAG_HEADER);
g_value_init (&array, GST_TYPE_ARRAY);
g_value_init (&value, GST_TYPE_BUFFER);
shbuffer = gst_buffer_copy (inbuffer);
diff --git a/tests/check/pipelines/streamheader.c b/tests/check/pipelines/streamheader.c
index 69dc29ae2..77e998c1c 100644
--- a/tests/check/pipelines/streamheader.c
+++ b/tests/check/pipelines/streamheader.c
@@ -134,7 +134,7 @@ buffer_probe_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
gst_buffer_map (buffer, &map, GST_MAP_READ);
- if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_IN_CAPS)) {
+ if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_HEADER)) {
GstCaps *caps;
GstStructure *s;
const GValue *sh;
@@ -168,7 +168,7 @@ buffer_probe_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
}
gst_buffer_unmap (buf, &map2);
}
- fail_unless (found, "Did not find incoming IN_CAPS buffer %p on caps",
+ fail_unless (found, "Did not find incoming HEADER buffer %p on caps",
buffer);
gst_caps_unref (caps);