mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
update for HEADER flag
This commit is contained in:
parent
a7c27e1aaa
commit
bb2bd604e0
12 changed files with 30 additions and 32 deletions
|
@ -338,9 +338,9 @@ gst_cmml_enc_set_header_on_caps (GstCmmlEnc * enc, GstCaps * caps,
|
|||
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);
|
||||
|
||||
|
|
|
@ -885,7 +885,7 @@ notgst_value_array_append_buffer (GValue * array_val, GstBuffer * buf)
|
|||
/* 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);
|
||||
|
@ -923,7 +923,7 @@ gst_flac_enc_process_stream_headers (GstFlacEnc * enc)
|
|||
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;
|
||||
|
|
|
@ -636,7 +636,7 @@ send_message_locked (GstSoupHttpClientSink * souphttpsink)
|
|||
|
||||
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? */
|
||||
|
|
|
@ -661,11 +661,11 @@ _gst_caps_set_buffer_array (GstCaps * caps, const gchar * field,
|
|||
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);
|
||||
|
|
|
@ -1042,7 +1042,7 @@ _value_array_append_buffer (GValue * array_val, GstBuffer * buf)
|
|||
/* 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);
|
||||
|
@ -1074,7 +1074,7 @@ gst_flac_parse_handle_headers (GstFlacParse * flacparse)
|
|||
|
||||
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;
|
||||
|
|
|
@ -1177,16 +1177,16 @@ gst_flv_mux_write_header (GstFlvMux * mux)
|
|||
}
|
||||
|
||||
/* 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 */
|
||||
|
|
|
@ -1503,7 +1503,7 @@ gst_qt_mux_set_header_on_caps (GstQTMux * mux, GstBuffer * buf)
|
|||
|
||||
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);
|
||||
|
|
|
@ -257,7 +257,7 @@ gst_ebml_write_flush_cache (GstEbmlWrite * ebml, gboolean is_keyframe,
|
|||
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);
|
||||
|
@ -449,7 +449,7 @@ gst_ebml_write_element_push (GstEbmlWrite * ebml, GstBuffer * buf,
|
|||
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);
|
||||
|
||||
|
|
|
@ -2859,7 +2859,7 @@ gst_matroska_mux_stop_streamheader (GstMatroskaMux * mux)
|
|||
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);
|
||||
|
|
|
@ -2532,7 +2532,7 @@ gst_matroska_parse_output (GstMatroskaParse * parse, GstBuffer * buffer,
|
|||
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);
|
||||
|
@ -2546,7 +2546,7 @@ gst_matroska_parse_output (GstMatroskaParse * parse, GstBuffer * buffer,
|
|||
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);
|
||||
|
|
|
@ -179,8 +179,7 @@ check_output_buffer_is_equal (const gchar * name,
|
|||
const gchar * data, gint refcount)
|
||||
{
|
||||
GstBuffer *buffer;
|
||||
gpointer buf_data;
|
||||
gsize size;
|
||||
GstMapInfo map;
|
||||
|
||||
if (current_buf == NULL)
|
||||
current_buf = buffers;
|
||||
|
@ -190,13 +189,13 @@ check_output_buffer_is_equal (const gchar * name,
|
|||
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
|
||||
|
|
|
@ -201,8 +201,7 @@ check_output_buffer_is_equal (const gchar * name,
|
|||
const gchar * data, gint refcount)
|
||||
{
|
||||
GstBuffer *buffer;
|
||||
gpointer buf_data;
|
||||
gsize size;
|
||||
GstMapInfo map;
|
||||
|
||||
if (current_buf == NULL)
|
||||
current_buf = buffers;
|
||||
|
@ -211,13 +210,13 @@ check_output_buffer_is_equal (const gchar * name,
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue