Commit 1ecddd21 authored by Andy Wingo Wingo's avatar Andy Wingo Wingo
Browse files

Update for alloc_buffer changes.

Original commit message from CVS:
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.
parent b515b87d
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>
......
......@@ -346,15 +346,19 @@ get_buffer (GstVisual * visual, GstBuffer ** outbuf)
!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);
}
......
......@@ -756,7 +756,8 @@ gst_ogg_demux_chain_peer (GstOggPad * pad, ogg_packet * packet)
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,
......
......@@ -281,7 +281,7 @@ gst_text_render_chain (GstPad * pad, GstBuffer * inbuf)
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)
......
......@@ -888,8 +888,9 @@ theora_handle_data_packet (GstTheoraDec * dec, ogg_packet * packet,
/* 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;
......
......@@ -311,7 +311,7 @@ theora_buffer_from_packet (GstTheoraEnc * enc, ogg_packet * packet,
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;
......@@ -556,7 +556,7 @@ theora_enc_chain (GstPad * pad, GstBuffer * 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)
......
......@@ -771,7 +771,8 @@ vorbis_handle_data_packet (GstVorbisDec * vd, ogg_packet * packet)
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;
......
......@@ -438,8 +438,9 @@ gst_video_test_src_create (GstPushSrc * psrc, GstBuffer ** buffer)
#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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment