Commit ec578684 authored by Wim Taymans's avatar Wim Taymans

-base: don't use buffer caps

Port to newest 0.11 core API, remove GST_PAD_CAPS and GST_BUFFER_CAPS.
parent df54ba57
......@@ -629,20 +629,17 @@ get_buffer (GstVisual * visual, GstBuffer ** outbuf)
GstFlowReturn ret;
/* we don't know an output format yet, pick one */
if (GST_PAD_CAPS (visual->srcpad) == NULL) {
if (!gst_pad_has_current_caps (visual->srcpad)) {
if (!gst_vis_src_negotiate (visual))
return GST_FLOW_NOT_NEGOTIATED;
}
GST_DEBUG_OBJECT (visual, "allocating output buffer with caps %"
GST_PTR_FORMAT, GST_PAD_CAPS (visual->srcpad));
GST_DEBUG_OBJECT (visual, "allocating output buffer");
ret = gst_buffer_pool_acquire_buffer (visual->pool, outbuf, NULL);
if (ret != GST_FLOW_OK)
return ret;
gst_buffer_set_caps (*outbuf, GST_PAD_CAPS (visual->srcpad));
return GST_FLOW_OK;
}
......@@ -659,7 +656,7 @@ gst_visual_chain (GstPad * pad, GstBuffer * buffer)
/* If we don't have an output format yet, preallocate a buffer to try and
* set one */
if (GST_PAD_CAPS (visual->srcpad) == NULL) {
if (!gst_pad_has_current_caps (visual->srcpad)) {
ret = get_buffer (visual, &outbuf);
if (ret != GST_FLOW_OK) {
gst_buffer_unref (buffer);
......
......@@ -261,7 +261,6 @@ gst_ogg_avi_parse_setcaps (GstPad * pad, GstCaps * caps)
/* now output the raw vorbis header packets */
out = gst_buffer_copy_region (buffer, GST_BUFFER_COPY_ALL, offs, sizes[i]);
gst_buffer_set_caps (out, outcaps);
gst_pad_push (ogg->srcpad, out);
offs += sizes[i];
......
......@@ -229,7 +229,7 @@ gst_ogg_pad_query_types (GstPad * pad)
static GstCaps *
gst_ogg_pad_getcaps (GstPad * pad)
{
return gst_caps_ref (GST_PAD_CAPS (pad));
return gst_pad_get_current_caps (pad);
}
static gboolean
......@@ -574,7 +574,6 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet,
goto not_added;
buf = gst_buffer_new_and_alloc (packet->bytes - offset - trim);
gst_buffer_set_caps (buf, GST_PAD_CAPS (pad));
/* set delta flag for OGM content */
if (delta_unit)
......@@ -1772,7 +1771,8 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain,
gst_ogg_pad_mark_discont (pad);
pad->last_ret = GST_FLOW_OK;
if (pad->map.is_skeleton || pad->added || GST_PAD_CAPS (pad) == NULL)
if (pad->map.is_skeleton || pad->added
|| !gst_pad_has_current_caps (GST_PAD_CAST (pad)))
continue;
GST_DEBUG_OBJECT (ogg, "adding pad %" GST_PTR_FORMAT, pad);
......
......@@ -499,8 +499,6 @@ static GstFlowReturn
gst_ogg_mux_push_buffer (GstOggMux * mux, GstBuffer * buffer,
GstOggPadData * oggpad)
{
GstCaps *caps;
/* fix up OFFSET and OFFSET_END again */
GST_BUFFER_OFFSET (buffer) = mux->offset;
mux->offset += gst_buffer_get_size (buffer);
......@@ -515,11 +513,6 @@ gst_ogg_mux_push_buffer (GstOggMux * mux, GstBuffer * buffer,
mux->last_ts = run_time;
}
caps = gst_pad_get_negotiated_caps (mux->srcpad);
gst_buffer_set_caps (buffer, caps);
if (caps)
gst_caps_unref (caps);
return gst_pad_push (mux->srcpad, buffer);
}
......@@ -806,13 +799,15 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux)
/* if we're not yet in data mode, ensure we're setup on the first packet */
if (!pad->have_type) {
GstCaps *caps;
/* Use headers in caps, if any; this will allow us to be resilient
* to starting streams on the fly, and some streams (like VP8
* at least) do not send headers packets, as other muxers don't
* expect/need them. */
caps = gst_pad_get_current_caps (GST_PAD_CAST (pad));
pad->have_type =
gst_ogg_stream_setup_map_from_caps_headers (&pad->map,
GST_BUFFER_CAPS (buf));
gst_ogg_stream_setup_map_from_caps_headers (&pad->map, caps);
if (!pad->have_type) {
/* fallback on the packet */
......@@ -820,11 +815,13 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux)
}
if (!pad->have_type) {
GST_ERROR_OBJECT (pad, "mapper didn't recognise input stream "
"(pad caps: %" GST_PTR_FORMAT ")", GST_PAD_CAPS (pad));
"(pad caps: %" GST_PTR_FORMAT ")", caps);
} else {
GST_DEBUG_OBJECT (pad, "caps detected: %" GST_PTR_FORMAT,
pad->map.caps);
}
if (caps)
gst_caps_unref (caps);
}
if (pad->have_type)
......
......@@ -604,9 +604,6 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
GstOggStream *stream = (GstOggStream *) l->data;
GstBuffer *buf = GST_BUFFER (stream->headers->data);
buf = gst_buffer_make_writable (buf);
gst_buffer_set_caps (buf, caps);
result = gst_pad_push (ogg->srcpad, buf);
if (result != GST_FLOW_OK)
return result;
......@@ -619,9 +616,6 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
for (j = stream->headers->next; j != NULL; j = j->next) {
GstBuffer *buf = GST_BUFFER (j->data);
buf = gst_buffer_make_writable (buf);
gst_buffer_set_caps (buf, caps);
result = gst_pad_push (ogg->srcpad, buf);
if (result != GST_FLOW_OK)
return result;
......@@ -648,10 +642,8 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
g_list_length (stream->unknown_pages) + 1);
for (k = stream->unknown_pages; k != NULL; k = k->next) {
GstBuffer *buf;
GstBuffer *buf = GST_BUFFER (k->data);
buf = gst_buffer_make_writable (GST_BUFFER (k->data));
gst_buffer_set_caps (buf, caps);
result = gst_pad_push (ogg->srcpad, buf);
if (result != GST_FLOW_OK)
return result;
......@@ -671,7 +663,7 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
GstBuffer *buf = stream->stored_buffers->data;
buf = gst_buffer_make_writable (buf);
gst_buffer_set_caps (buf, ogg->caps);
GST_BUFFER_TIMESTAMP (buf) = buffertimestamp;
if (!keyframe) {
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
......@@ -689,7 +681,6 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
}
pagebuffer = gst_buffer_make_writable (pagebuffer);
gst_buffer_set_caps (pagebuffer, ogg->caps);
if (!keyframe) {
GST_BUFFER_FLAG_SET (pagebuffer, GST_BUFFER_FLAG_DELTA_UNIT);
} else {
......
......@@ -622,16 +622,19 @@ gst_ogm_parse_stream_header (GstOgmParse * ogm, const guint8 * data, guint size)
goto cannot_decode;
if (ogm->srcpad) {
GstCaps *current_caps = GST_PAD_CAPS (ogm->srcpad);
if (current_caps && caps && !gst_caps_is_equal (current_caps, caps)) {
GST_WARNING_OBJECT (ogm, "Already an existing pad %s:%s",
GST_DEBUG_PAD_NAME (ogm->srcpad));
gst_pad_set_active (ogm->srcpad, FALSE);
gst_element_remove_pad (GST_ELEMENT (ogm), ogm->srcpad);
ogm->srcpad = NULL;
} else {
GST_DEBUG_OBJECT (ogm, "Existing pad has the same caps, do nothing");
GstCaps *current_caps = gst_pad_get_current_caps (ogm->srcpad);
if (current_caps) {
if (caps && !gst_caps_is_equal (current_caps, caps)) {
GST_WARNING_OBJECT (ogm, "Already an existing pad %s:%s",
GST_DEBUG_PAD_NAME (ogm->srcpad));
gst_pad_set_active (ogm->srcpad, FALSE);
gst_element_remove_pad (GST_ELEMENT (ogm), ogm->srcpad);
ogm->srcpad = NULL;
} else {
GST_DEBUG_OBJECT (ogm, "Existing pad has the same caps, do nothing");
}
gst_caps_unref (current_caps);
}
}
......@@ -640,8 +643,8 @@ gst_ogm_parse_stream_header (GstOgmParse * ogm, const guint8 * data, guint size)
ogm->srcpad = gst_pad_new_from_template (ogm->srcpadtempl, "src");
gst_pad_use_fixed_caps (ogm->srcpad);
gst_pad_set_caps (ogm->srcpad, caps);
gst_pad_set_active (ogm->srcpad, TRUE);
gst_pad_set_caps (ogm->srcpad, caps);
gst_element_add_pad (GST_ELEMENT (ogm), ogm->srcpad);
GST_INFO_OBJECT (ogm, "Added pad %s:%s with caps %" GST_PTR_FORMAT,
GST_DEBUG_PAD_NAME (ogm->srcpad), caps);
......@@ -714,8 +717,6 @@ gst_ogm_parse_comment_packet (GstOgmParse * ogm, GstBuffer * buf)
/* do not push packet downstream, just let parent unref it */
ret = GST_FLOW_OK;
} else {
buf = gst_buffer_copy (buf);
gst_buffer_set_caps (buf, GST_PAD_CAPS (ogm->srcpad));
ret = gst_pad_push (ogm->srcpad, buf);
}
......@@ -820,7 +821,6 @@ gst_ogm_parse_data_packet (GstOgmParse * ogm, GstBuffer * buf,
}
if (ogm->srcpad) {
gst_buffer_set_caps (sbuf, GST_PAD_CAPS (ogm->srcpad));
GST_LOG_OBJECT (ogm, "Pushing buffer with ts=%" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (sbuf)));
ret = gst_pad_push (ogm->srcpad, sbuf);
......
......@@ -2423,10 +2423,13 @@ gst_base_text_overlay_video_chain (GstPad * pad, GstBuffer * buffer)
* duration (we only use those estimated values internally though, we
* don't want to set bogus values on the buffer itself) */
if (stop == -1) {
GstCaps *caps;
GstStructure *s;
gint fps_num, fps_denom;
s = gst_caps_get_structure (GST_PAD_CAPS (pad), 0);
/* FIXME, store this in setcaps */
caps = gst_pad_get_current_caps (pad);
s = gst_caps_get_structure (caps, 0);
if (gst_structure_get_fraction (s, "framerate", &fps_num, &fps_denom) &&
fps_num && fps_denom) {
GST_DEBUG_OBJECT (overlay, "estimating duration based on framerate");
......@@ -2435,6 +2438,7 @@ gst_base_text_overlay_video_chain (GstPad * pad, GstBuffer * buffer)
GST_WARNING_OBJECT (overlay, "no duration, assuming minimal duration");
stop = start + 1; /* we need to assume some interval */
}
gst_caps_unref (caps);
}
gst_object_sync_values (G_OBJECT (overlay), GST_BUFFER_TIMESTAMP (buffer));
......
......@@ -506,7 +506,6 @@ gst_text_render_chain (GstPad * pad, GstBuffer * inbuf)
GST_DEBUG ("Allocating buffer WxH = %dx%d", render->width, render->height);
outbuf = gst_buffer_new_and_alloc (render->width * render->height * 4);
gst_buffer_set_caps (outbuf, caps);
gst_buffer_copy_into (outbuf, inbuf, GST_BUFFER_COPY_TIMESTAMPS, 0, -1);
data = gst_buffer_map (outbuf, &size, NULL, GST_MAP_WRITE);
......
......@@ -1122,8 +1122,6 @@ theora_handle_image (GstTheoraDec * dec, th_ycbcr_buffer buf, GstBuffer ** out)
if (G_UNLIKELY (result != GST_FLOW_OK))
goto no_buffer;
gst_buffer_set_caps (*out, GST_PAD_CAPS (dec->srcpad));
data = gst_buffer_map (*out, &size, NULL, GST_MAP_WRITE);
/* FIXME, we can do things slightly more efficient when we know that
......
......@@ -696,7 +696,6 @@ theora_buffer_from_packet (GstTheoraEnc * enc, ogg_packet * packet,
}
gst_buffer_fill (buf, 0, packet->packet, packet->bytes);
gst_buffer_set_caps (buf, GST_PAD_CAPS (enc->srcpad));
/* see ext/ogg/README; OFFSET_END takes "our" granulepos, OFFSET its
* time representation */
GST_BUFFER_OFFSET_END (buf) =
......@@ -1208,9 +1207,6 @@ theora_enc_chain (GstPad * pad, GstBuffer * buffer)
caps = theora_set_header_on_caps (caps, buffers);
GST_DEBUG ("here are the caps: %" GST_PTR_FORMAT, caps);
gst_pad_set_caps (enc->srcpad, caps);
g_slist_foreach (buffers, (GFunc) gst_buffer_set_caps, caps);
gst_caps_unref (caps);
/* push out the header buffers */
......
......@@ -364,8 +364,6 @@ theora_parse_push_headers (GstTheoraParse * parse)
GstBuffer *buf;
if ((buf = parse->streamheader[i])) {
buf = gst_buffer_make_writable (buf);
gst_buffer_set_caps (buf, GST_PAD_CAPS (parse->srcpad));
gst_pad_push (parse->srcpad, buf);
parse->streamheader[i] = NULL;
}
......@@ -498,8 +496,6 @@ theora_parse_push_buffer (GstTheoraParse * parse, GstBuffer * buf,
GST_BUFFER_TIMESTAMP (buf) = this_time;
GST_BUFFER_DURATION (buf) = next_time - this_time;
gst_buffer_set_caps (buf, GST_PAD_CAPS (parse->srcpad));
if (parse->times)
theora_parse_munge_granulepos (parse, buf, keyframe, frame);
......
......@@ -914,7 +914,6 @@ vorbis_handle_data_packet (GstVorbisDec * vd, ogg_packet * packet,
/* alloc buffer for it */
out = gst_buffer_new_and_alloc (size);
gst_buffer_set_caps (out, GST_PAD_CAPS (vd->srcpad));
/* get samples ready for reading now, should be sample_count */
#ifdef USE_TREMOLO
......
......@@ -840,8 +840,6 @@ gst_vorbis_enc_buffer_from_packet (GstVorbisEnc * vorbisenc,
vorbisenc->next_discont = FALSE;
}
gst_buffer_set_caps (outbuf, vorbisenc->srccaps);
GST_LOG_OBJECT (vorbisenc, "encoded buffer of %d bytes",
gst_buffer_get_size (outbuf));
return outbuf;
......@@ -862,8 +860,6 @@ gst_vorbis_enc_buffer_from_header_packet (GstVorbisEnc * vorbisenc,
GST_BUFFER_TIMESTAMP (outbuf) = GST_CLOCK_TIME_NONE;
GST_BUFFER_DURATION (outbuf) = GST_CLOCK_TIME_NONE;
gst_buffer_set_caps (outbuf, vorbisenc->srccaps);
GST_DEBUG ("created header packet buffer, %d bytes",
gst_buffer_get_size (outbuf));
return outbuf;
......@@ -1099,10 +1095,6 @@ gst_vorbis_enc_chain (GstPad * pad, GstBuffer * buffer)
GST_DEBUG ("here are the caps: %" GST_PTR_FORMAT, caps);
gst_pad_set_caps (vorbisenc->srcpad, caps);
gst_buffer_set_caps (buf1, caps);
gst_buffer_set_caps (buf2, caps);
gst_buffer_set_caps (buf3, caps);
/* push out buffers */
/* push_buffer takes the reference even for failure */
if ((ret = gst_vorbis_enc_push_buffer (vorbisenc, buf1)) != GST_FLOW_OK)
......
......@@ -232,14 +232,8 @@ vorbis_parse_push_headers (GstVorbisParse * parse)
vorbis_parse_drain_event_queue (parse);
/* push out buffers, ignoring return value... */
outbuf1 = gst_buffer_make_writable (outbuf1);
gst_buffer_set_caps (outbuf1, GST_PAD_CAPS (parse->srcpad));
gst_pad_push (parse->srcpad, outbuf1);
outbuf2 = gst_buffer_make_writable (outbuf2);
gst_buffer_set_caps (outbuf2, GST_PAD_CAPS (parse->srcpad));
gst_pad_push (parse->srcpad, outbuf2);
outbuf3 = gst_buffer_make_writable (outbuf3);
gst_buffer_set_caps (outbuf3, GST_PAD_CAPS (parse->srcpad));
gst_pad_push (parse->srcpad, outbuf3);
g_list_free (parse->streamheader);
......@@ -278,8 +272,6 @@ vorbis_parse_push_buffer (GstVorbisParse * parse, GstBuffer * buf,
GST_BUFFER_TIMESTAMP (buf) =
GST_BUFFER_OFFSET (buf) - GST_BUFFER_DURATION (buf);
gst_buffer_set_caps (buf, GST_PAD_CAPS (parse->srcpad));
return gst_pad_push (parse->srcpad, buf);
}
......
......@@ -981,10 +981,6 @@ gst_app_src_create (GstBaseSrc * bsrc, guint64 offset, guint size,
/* only update the offset when in random_access mode */
if (priv->stream_type == GST_APP_STREAM_TYPE_RANDOM_ACCESS)
priv->offset += buf_size;
if (caps) {
*buf = gst_buffer_make_writable (*buf);
gst_buffer_set_caps (*buf, caps);
}
/* signal that we removed an item */
g_cond_broadcast (priv->cond);
......
......@@ -49,24 +49,31 @@ gst_audio_frame_byte_size (GstPad * pad)
int width = 0;
int channels = 0;
const GstCaps *caps = NULL;
GstCaps *caps;
GstStructure *structure;
/* get caps of pad */
caps = GST_PAD_CAPS (pad);
caps = gst_pad_get_current_caps (pad);
if (caps == NULL) {
/* ERROR: could not get caps of pad */
g_warning ("gstaudio: could not get caps of pad %s:%s\n",
GST_DEBUG_PAD_NAME (pad));
return 0;
}
if (caps == NULL)
goto no_caps;
structure = gst_caps_get_structure (caps, 0);
gst_structure_get_int (structure, "width", &width);
gst_structure_get_int (structure, "channels", &channels);
gst_caps_unref (caps);
return (width / 8) * channels;
/* ERRORS */
no_caps:
{
/* ERROR: could not get caps of pad */
g_warning ("gstaudio: could not get caps of pad %s:%s\n",
GST_DEBUG_PAD_NAME (pad));
return 0;
}
}
/**
......@@ -113,34 +120,38 @@ gst_audio_duration_from_pad_buffer (GstPad * pad, GstBuffer * buf)
int width = 0;
int channels = 0;
int rate = 0;
GstClockTime length;
const GstCaps *caps = NULL;
GstCaps *caps;
GstStructure *structure;
g_assert (GST_IS_BUFFER (buf));
/* get caps of pad */
caps = GST_PAD_CAPS (pad);
if (caps == NULL) {
caps = gst_pad_get_current_caps (pad);
if (caps == NULL)
goto no_caps;
structure = gst_caps_get_structure (caps, 0);
bytes = gst_buffer_get_size (buf);
gst_structure_get_int (structure, "width", &width);
gst_structure_get_int (structure, "channels", &channels);
gst_structure_get_int (structure, "rate", &rate);
gst_caps_unref (caps);
g_assert (bytes != 0);
g_assert (width != 0);
g_assert (channels != 0);
g_assert (rate != 0);
return (bytes * 8 * GST_SECOND) / (rate * channels * width);
/* ERRORS */
no_caps:
{
/* ERROR: could not get caps of pad */
g_warning ("gstaudio: could not get caps of pad %s:%s\n",
GST_DEBUG_PAD_NAME (pad));
length = GST_CLOCK_TIME_NONE;
} else {
structure = gst_caps_get_structure (caps, 0);
bytes = gst_buffer_get_size (buf);
gst_structure_get_int (structure, "width", &width);
gst_structure_get_int (structure, "channels", &channels);
gst_structure_get_int (structure, "rate", &rate);
g_assert (bytes != 0);
g_assert (width != 0);
g_assert (channels != 0);
g_assert (rate != 0);
length = (bytes * 8 * GST_SECOND) / (rate * channels * width);
return GST_CLOCK_TIME_NONE;
}
return length;
}
/**
......
......@@ -1613,10 +1613,6 @@ gst_cdda_base_src_create (GstPushSrc * pushsrc, GstBuffer ** buffer)
return GST_FLOW_ERROR;
}
if (GST_BUFFER_CAPS (buf) == NULL) {
gst_buffer_set_caps (buf, GST_PAD_CAPS (GST_BASE_SRC_PAD (src)));
}
format = GST_FORMAT_TIME;
if (gst_pad_query_position (GST_BASE_SRC_PAD (src), &format, &qry_position)) {
gint64 next_ts = 0;
......
......@@ -392,22 +392,14 @@ gst_base_rtp_depayload_chain (GstPad * pad, GstBuffer * in)
not_negotiated:
{
/* this is not fatal but should be filtered earlier */
if (GST_BUFFER_CAPS (in) == NULL) {
GST_ELEMENT_ERROR (filter, CORE, NEGOTIATION,
("No RTP format was negotiated."),
("Input buffers need to have RTP caps set on them. This is usually "
"achieved by setting the 'caps' property of the upstream source "
"element (often udpsrc or appsrc), or by putting a capsfilter "
"element before the depayloader and setting the 'caps' property "
"on that. Also see http://cgit.freedesktop.org/gstreamer/"
"gst-plugins-good/tree/gst/rtp/README"));
} else {
GST_ELEMENT_ERROR (filter, CORE, NEGOTIATION,
("No RTP format was negotiated."),
("RTP caps on input buffer were rejected, most likely because they "
"were incomplete or contained wrong values. Check the debug log "
"for more information."));
}
GST_ELEMENT_ERROR (filter, CORE, NEGOTIATION,
("No RTP format was negotiated."),
("Input buffers need to have RTP caps set on them. This is usually "
"achieved by setting the 'caps' property of the upstream source "
"element (often udpsrc or appsrc), or by putting a capsfilter "
"element before the depayloader and setting the 'caps' property "
"on that. Also see http://cgit.freedesktop.org/gstreamer/"
"gst-plugins-good/tree/gst/rtp/README"));
gst_buffer_unref (in);
return GST_FLOW_NOT_NEGOTIATED;
}
......@@ -550,7 +542,6 @@ typedef struct
{
GstBaseRTPDepayload *depayload;
GstBaseRTPDepayloadClass *bclass;
GstCaps *caps;
gboolean do_ts;
gboolean rtptime;
} HeaderData;
......@@ -561,7 +552,6 @@ set_headers (GstBuffer ** buffer, guint idx, HeaderData * data)
GstBaseRTPDepayload *depayload = data->depayload;
*buffer = gst_buffer_make_writable (*buffer);
gst_buffer_set_caps (*buffer, data->caps);
/* set the timestamp if we must and can */
if (data->bclass->set_gst_timestamp && data->do_ts)
......@@ -583,7 +573,6 @@ gst_base_rtp_depayload_prepare_push (GstBaseRTPDepayload * filter,
HeaderData data;
data.depayload = filter;
data.caps = GST_PAD_CAPS (filter->srcpad);
data.rtptime = rtptime;
data.do_ts = do_ts;
data.bclass = GST_BASE_RTP_DEPAYLOAD_GET_CLASS (filter);
......
......@@ -708,7 +708,6 @@ typedef struct
guint32 ssrc;
guint16 seqnum;
guint8 pt;
GstCaps *caps;
GstClockTime timestamp;
guint64 offset;
guint32 rtptime;
......@@ -740,7 +739,6 @@ set_headers (GstBuffer ** buffer, guint group, guint idx, HeaderData * data)
gst_rtp_buffer_set_timestamp (&rtp, data->rtptime);
gst_rtp_buffer_unmap (&rtp);
gst_buffer_set_caps (*buffer, data->caps);
/* increment the seqnum for each buffer */
data->seqnum++;
......@@ -770,7 +768,6 @@ gst_basertppayload_prepare_push (GstBaseRTPPayload * payload,
data.seqnum = payload->seqnum;
data.ssrc = payload->current_ssrc;
data.pt = payload->pt;
data.caps = GST_PAD_CAPS (payload->srcpad);
/* find the first buffer with a timestamp */
if (is_list) {
......
......@@ -468,7 +468,6 @@ gst_tag_demux_trim_buffer (GstTagDemux * tagdemux, GstBuffer ** buf_ref,
GST_BUFFER_OFFSET (buf) = out_offset;
GST_BUFFER_OFFSET_END (buf) = out_offset + out_size;
gst_buffer_set_caps (buf, tagdemux->priv->src_caps);
}
return TRUE;
......@@ -709,10 +708,6 @@ gst_tag_demux_chain (GstPad * pad, GstBuffer * buf)
demux->priv->send_tag_event = FALSE;
}
/* Ensure the caps are set correctly */
outbuf = gst_buffer_make_writable (outbuf);
gst_buffer_set_caps (outbuf, GST_PAD_CAPS (demux->priv->srcpad));
GST_LOG_OBJECT (demux, "Pushing buffer %p", outbuf);
return gst_pad_push (demux->priv->srcpad, outbuf);
......@@ -1327,8 +1322,6 @@ gst_tag_demux_read_range (GstTagDemux * demux,
/* this should only happen in streaming mode */
g_assert (*buffer != NULL);
gst_buffer_set_caps (*buffer, demux->priv->src_caps);
}
return ret;
......
......@@ -551,12 +551,15 @@ static GList *
gst_tag_to_metadata_block_picture (const gchar * tag,
const GValue * image_value)
{
#if 0
gchar *comment_data, *data_result;
const gchar *mime_type;
guint mime_type_len;
GstStructure *mime_struct;