2005-12-05 Andy Wingo <wingo@pobox.com>
+ * ext/libvisual/visual.c: (get_buffer):
+ * ext/ogg/gstoggdemux.c: (gst_ogg_demux_chain_peer):
+ * ext/pango/gsttextrender.c: (gst_text_render_chain):
+ * ext/theora/theoradec.c: (theora_handle_data_packet):
+ * ext/theora/theoraenc.c: (theora_buffer_from_packet),
+ (theora_enc_chain):
+ * ext/vorbis/vorbisdec.c: (vorbis_handle_data_packet):
+ * gst/videotestsrc/gstvideotestsrc.c: (gst_video_test_src_create):
+ Update for alloc_buffer changes.
+
+2005-12-05 Andy Wingo <wingo@pobox.com>
+
patch by: Kai Vehmanen <kv2004 eca cx>
* gst-libs/gst/rtp/gstbasertpdepayload.c
!gst_structure_get_int (s, "bpp", &bpp)) {
ret = FALSE;
} else {
- ret = gst_pad_alloc_buffer (visual->srcpad, GST_BUFFER_OFFSET_NONE,
- height * GST_ROUND_UP_4 (width) * bpp, caps, outbuf);
+ ret =
+ gst_pad_alloc_buffer_and_set_caps (visual->srcpad,
+ GST_BUFFER_OFFSET_NONE, height * GST_ROUND_UP_4 (width) * bpp, caps,
+ outbuf);
}
if (GST_PAD_CAPS (visual->srcpad) == NULL)
gst_pad_set_caps (visual->srcpad, caps);
gst_caps_unref (caps);
} else {
- ret = gst_pad_alloc_buffer (visual->srcpad, GST_BUFFER_OFFSET_NONE,
+ ret =
+ gst_pad_alloc_buffer_and_set_caps (visual->srcpad,
+ GST_BUFFER_OFFSET_NONE,
visual->video->height * GST_ROUND_UP_4 (visual->video->width) *
visual->video->bpp, GST_PAD_CAPS (visual->srcpad), outbuf);
}
GstFlowReturn ret;
GstOggDemux *ogg = pad->ogg;
- ret = gst_pad_alloc_buffer (GST_PAD (pad), GST_BUFFER_OFFSET_NONE,
+ ret =
+ gst_pad_alloc_buffer_and_set_caps (GST_PAD (pad), GST_BUFFER_OFFSET_NONE,
packet->bytes, GST_PAD_CAPS (pad), &buf);
GST_DEBUG_OBJECT (ogg,
GST_DEBUG ("Allocating AYUV buffer WxH = %dx%d", render->width,
render->height);
ret =
- gst_pad_alloc_buffer (render->srcpad, GST_BUFFER_OFFSET_NONE,
+ gst_pad_alloc_buffer_and_set_caps (render->srcpad, GST_BUFFER_OFFSET_NONE,
render->width * render->height * 4, caps, &outbuf);
if (ret != GST_FLOW_OK)
/* now copy over the area contained in offset_x,offset_y,
* frame_width, frame_height */
- result = gst_pad_alloc_buffer (dec->srcpad, GST_BUFFER_OFFSET_NONE, out_size,
- GST_PAD_CAPS (dec->srcpad), &out);
+ result =
+ gst_pad_alloc_buffer_and_set_caps (dec->srcpad, GST_BUFFER_OFFSET_NONE,
+ out_size, GST_PAD_CAPS (dec->srcpad), &out);
if (result != GST_FLOW_OK)
goto no_buffer;
GstBuffer *buf;
GstFlowReturn ret;
- ret = gst_pad_alloc_buffer (enc->srcpad,
+ ret = gst_pad_alloc_buffer_and_set_caps (enc->srcpad,
GST_BUFFER_OFFSET_NONE, packet->bytes, GST_PAD_CAPS (enc->srcpad), &buf);
if (ret != GST_FLOW_OK)
goto no_buffer;
dst_y_stride = enc->info_width;
dst_uv_stride = enc->info_width / 2;
- ret = gst_pad_alloc_buffer (enc->srcpad,
+ ret = gst_pad_alloc_buffer_and_set_caps (enc->srcpad,
GST_BUFFER_OFFSET_NONE, y_size * 3 / 2, GST_PAD_CAPS (enc->srcpad),
&newbuf);
if (ret != GST_FLOW_OK)
size = sample_count * vd->vi.channels * sizeof (float);
/* alloc buffer for it */
- result = gst_pad_alloc_buffer (vd->srcpad, GST_BUFFER_OFFSET_NONE,
+ result =
+ gst_pad_alloc_buffer_and_set_caps (vd->srcpad, GST_BUFFER_OFFSET_NONE,
size, GST_PAD_CAPS (vd->srcpad), &out);
if (result != GST_FLOW_OK)
goto done;
#ifdef USE_PEER_BUFFERALLOC
res =
- gst_pad_alloc_buffer (GST_BASE_SRC_PAD (psrc), GST_BUFFER_OFFSET_NONE,
- newsize, GST_PAD_CAPS (GST_BASE_SRC_PAD (psrc)), &outbuf);
+ gst_pad_alloc_buffer_and_set_caps (GST_BASE_SRC_PAD (psrc),
+ GST_BUFFER_OFFSET_NONE, newsize, GST_PAD_CAPS (GST_BASE_SRC_PAD (psrc)),
+ &outbuf);
if (res != GST_FLOW_OK)
goto no_buffer;
#else