gst_value_array_append_value (&array, &value);
gst_buffer_unref (buffer);
- GST_BUFFER_FLAG_SET (ident, GST_BUFFER_FLAG_IN_CAPS);
- GST_BUFFER_FLAG_SET (preamble, GST_BUFFER_FLAG_IN_CAPS);
- GST_BUFFER_FLAG_SET (head, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (ident, GST_BUFFER_FLAG_HEADER);
+ GST_BUFFER_FLAG_SET (preamble, GST_BUFFER_FLAG_HEADER);
+ GST_BUFFER_FLAG_SET (head, GST_BUFFER_FLAG_HEADER);
gst_structure_set_value (structure, "streamheader", &array);
/* copy buffer to avoid problems with circular refcounts */
buf = gst_buffer_copy (buf);
/* again, for good measure */
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
gst_value_set_buffer (&value, buf);
gst_buffer_unref (buf);
gst_value_array_append_value (array_val, &value);
l->data = gst_buffer_make_writable (GST_BUFFER_CAST (l->data));
buf = GST_BUFFER_CAST (l->data);
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
gst_buffer_map (buf, &map, GST_MAP_READ);
data = map.data;
for (g = souphttpsink->queued_buffers; g; g = g_list_next (g)) {
GstBuffer *buffer = g->data;
- if (!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_IN_CAPS)) {
+ if (!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_HEADER)) {
GstMapInfo map;
/* FIXME, lifetime of the buffer? */
g_assert (gst_buffer_is_writable (buf));
/* mark buffer */
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
g_value_init (&value, GST_TYPE_BUFFER);
buf = gst_buffer_copy (buf);
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
gst_value_set_buffer (&value, buf);
gst_buffer_unref (buf);
gst_value_array_append_value (&array, &value);
/* copy buffer to avoid problems with circular refcounts */
buf = gst_buffer_copy (buf);
/* again, for good measure */
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
gst_value_set_buffer (&value, buf);
gst_buffer_unref (buf);
gst_value_array_append_value (array_val, &value);
gst_buffer_map (header, &map, GST_MAP_READ);
- GST_BUFFER_FLAG_SET (header, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (header, GST_BUFFER_FLAG_HEADER);
if (map.size == 4 && memcmp (map.data, "fLaC", 4) == 0) {
marker = header;
}
/* mark buffers that will go in the streamheader */
- GST_BUFFER_FLAG_SET (header, GST_BUFFER_FLAG_IN_CAPS);
- GST_BUFFER_FLAG_SET (metadata, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (header, GST_BUFFER_FLAG_HEADER);
+ GST_BUFFER_FLAG_SET (metadata, GST_BUFFER_FLAG_HEADER);
if (video_codec_data != NULL) {
- GST_BUFFER_FLAG_SET (video_codec_data, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (video_codec_data, GST_BUFFER_FLAG_HEADER);
/* mark as a delta unit, so downstream will not try to synchronize on that
* buffer - to actually start playback you need a real video keyframe */
GST_BUFFER_FLAG_SET (video_codec_data, GST_BUFFER_FLAG_DELTA_UNIT);
}
if (audio_codec_data != NULL) {
- GST_BUFFER_FLAG_SET (audio_codec_data, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (audio_codec_data, GST_BUFFER_FLAG_HEADER);
}
/* put buffers in streamheader */
g_value_init (&array, GST_TYPE_ARRAY);
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
g_value_init (&value, GST_TYPE_BUFFER);
gst_value_take_buffer (&value, gst_buffer_ref (buf));
gst_value_array_append_value (&array, &value);
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT);
}
if (ebml->writing_streamheader) {
- GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_HEADER);
}
if (!is_keyframe) {
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT);
GST_BUFFER_OFFSET (buf) = ebml->pos - data_size;
GST_BUFFER_OFFSET_END (buf) = ebml->pos;
if (ebml->writing_streamheader) {
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
}
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
s = gst_caps_get_structure (caps, 0);
g_value_init (&streamheader, GST_TYPE_ARRAY);
g_value_init (&bufval, GST_TYPE_BUFFER);
- GST_BUFFER_FLAG_SET (streamheader_buffer, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (streamheader_buffer, GST_BUFFER_FLAG_HEADER);
gst_value_set_buffer (&bufval, streamheader_buffer);
gst_value_array_append_value (&streamheader, &bufval);
g_value_unset (&bufval);
g_value_init (&streamheader, GST_TYPE_ARRAY);
g_value_init (&bufval, GST_TYPE_BUFFER);
buf = gst_buffer_copy (parse->streamheader);
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
gst_value_set_buffer (&bufval, buf);
gst_buffer_unref (buf);
gst_value_array_append_value (&streamheader, &bufval);
gst_caps_unref (caps);
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
- GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_IN_CAPS);
+ GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_HEADER);
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
ret = gst_pad_push (parse->srcpad, buf);
const gchar * data, gint refcount)
{
GstBuffer *buffer;
- gpointer buf_data;
- gsize size;
+ GstMapInfo map;
if (current_buf == NULL)
current_buf = buffers;
fail_unless (current_buf != NULL);
buffer = GST_BUFFER (current_buf->data);
- buf_data = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ);
+ gst_buffer_map (buffer, &map, GST_MAP_READ);
ASSERT_OBJECT_REFCOUNT (buffer, name, refcount);
- fail_unless (memcmp (buf_data, data, size) == 0,
- "'%s' (%s) is not equal to (%s)", name, buf_data, data);
+ fail_unless (memcmp (map.data, data, map.size) == 0,
+ "'%s' (%s) is not equal to (%s)", name, map.data, data);
- gst_buffer_unmap (buffer, buf_data, size);
+ gst_buffer_unmap (buffer, &map);
}
static GstFlowReturn
const gchar * data, gint refcount)
{
GstBuffer *buffer;
- gpointer buf_data;
- gsize size;
+ GstMapInfo map;
if (current_buf == NULL)
current_buf = buffers;
fail_unless (current_buf != NULL);
buffer = GST_BUFFER (current_buf->data);
- buf_data = gst_buffer_map (buffer, &size, NULL, GST_MAP_READ);
+ gst_buffer_map (buffer, &map, GST_MAP_READ);
ASSERT_OBJECT_REFCOUNT (buffer, name, refcount);
- fail_unless (memcmp (buf_data, data, size) == 0,
- "'%s' (%s) is not equal to (%s)", name, buf_data, data);
+ fail_unless (memcmp (map.data, data, map.size) == 0,
+ "'%s' (%s) is not equal to (%s)", name, map.data, data);
- gst_buffer_unmap (buffer, buf_data, size);
+ gst_buffer_unmap (buffer, &map);
}
static GstFlowReturn