From 1ecddd21ea6c1c3c1c06059d7fd83f6297ae233f Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 5 Dec 2005 13:02:12 +0000 Subject: [PATCH] Update for alloc_buffer changes. Original commit message from CVS: 2005-12-05 Andy Wingo * 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. --- ChangeLog | 12 ++++++++++++ ext/libvisual/visual.c | 10 +++++++--- ext/ogg/gstoggdemux.c | 3 ++- ext/pango/gsttextrender.c | 2 +- ext/theora/theoradec.c | 5 +++-- ext/theora/theoraenc.c | 4 ++-- ext/vorbis/vorbisdec.c | 3 ++- gst/videotestsrc/gstvideotestsrc.c | 5 +++-- 8 files changed, 32 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 083ec85..3d230dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2005-12-05 Andy Wingo + * 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 + patch by: Kai Vehmanen * gst-libs/gst/rtp/gstbasertpdepayload.c diff --git a/ext/libvisual/visual.c b/ext/libvisual/visual.c index 7ec513b..b7e6360 100644 --- a/ext/libvisual/visual.c +++ b/ext/libvisual/visual.c @@ -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); } diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index d8b8bf0..65a0000 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -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, diff --git a/ext/pango/gsttextrender.c b/ext/pango/gsttextrender.c index 365436a..af3faef 100644 --- a/ext/pango/gsttextrender.c +++ b/ext/pango/gsttextrender.c @@ -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) diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c index f6e55ed..b13aa0c 100644 --- a/ext/theora/theoradec.c +++ b/ext/theora/theoradec.c @@ -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; diff --git a/ext/theora/theoraenc.c b/ext/theora/theoraenc.c index 4aabdbc..6303b40 100644 --- a/ext/theora/theoraenc.c +++ b/ext/theora/theoraenc.c @@ -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) diff --git a/ext/vorbis/vorbisdec.c b/ext/vorbis/vorbisdec.c index 61b2a21..ad33599 100644 --- a/ext/vorbis/vorbisdec.c +++ b/ext/vorbis/vorbisdec.c @@ -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; diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c index e7814f5..dca6d27 100644 --- a/gst/videotestsrc/gstvideotestsrc.c +++ b/gst/videotestsrc/gstvideotestsrc.c @@ -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 -- 2.7.4