summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2005-12-05 13:03:00 +0000
committerAndy Wingo <wingo@pobox.com>2005-12-05 13:03:00 +0000
commit7fbfd29bbe207f93ce17bf52ba1bc46c78cf25d2 (patch)
tree2ae397d84724ef6c0646fa4b5def509ba17252fa /gst
parentc28031af5a9306abf320f5b6cf57d4233e137e3c (diff)
Update for alloc_buffer changes.
Original commit message from CVS: 2005-12-05 Andy Wingo <wingo@pobox.com> * ext/dv/gstdvdec.c: (gst_dvdec_chain): * ext/flac/gstflacdec.c: (gst_flacdec_write): * ext/flac/gstflacenc.c: (gst_flacenc_write_callback): * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_chain): * ext/gdk_pixbuf/pixbufscale.c: (gst_pixbufscale_chain): * ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_chain): * ext/jpeg/gstjpegenc.c: (gst_jpegenc_chain): * ext/ladspa/gstsignalprocessor.c: (gst_signal_processor_process): * ext/libpng/gstpngdec.c: (user_info_callback), (gst_pngdec_task): * ext/speex/gstspeexdec.c: (speex_dec_chain): * ext/speex/gstspeexenc.c: (gst_speexenc_chain): * gst/auparse/gstauparse.c: (gst_auparse_chain): * gst/flx/gstflxdec.c: (gst_flxdec_chain): * gst/goom/gstgoom.c: (gst_goom_chain): * gst/matroska/matroska-demux.c: (gst_matroska_demux_push_vorbis_codec_priv_data), (gst_matroska_demux_add_wvpk_header): * gst/multipart/multipartdemux.c: (gst_multipart_demux_chain): * gst/multipart/multipartmux.c: (gst_multipart_mux_collected): * gst/videomixer/videomixer.c: (gst_videomixer_collected): * gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Update for alloc_buffer changes.
Diffstat (limited to 'gst')
-rw-r--r--gst/auparse/gstauparse.c5
-rw-r--r--gst/flx/gstflxdec.c2
-rw-r--r--gst/goom/gstgoom.c3
-rw-r--r--gst/matroska/matroska-demux.c10
-rw-r--r--gst/multipart/multipartdemux.c6
-rw-r--r--gst/multipart/multipartmux.c5
-rw-r--r--gst/videomixer/videomixer.c12
-rw-r--r--gst/wavenc/gstwavenc.c6
8 files changed, 29 insertions, 20 deletions
diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c
index 1b5cf540..d39c239b 100644
--- a/gst/auparse/gstauparse.c
+++ b/gst/auparse/gstauparse.c
@@ -388,8 +388,9 @@ Samples :
const guint8 *data = gst_adapter_peek (auparse->adapter, avail);
GstBuffer *newbuf;
- if ((ret = gst_pad_alloc_buffer (auparse->srcpad, auparse->buffer_offset,
- avail, GST_PAD_CAPS (auparse->srcpad),
+ if ((ret =
+ gst_pad_alloc_buffer_and_set_caps (auparse->srcpad,
+ auparse->buffer_offset, avail, GST_PAD_CAPS (auparse->srcpad),
&newbuf)) == GST_FLOW_OK) {
memcpy (GST_BUFFER_DATA (newbuf), data, avail);
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index 93c10fd0..3c0cc069 100644
--- a/gst/flx/gstflxdec.c
+++ b/gst/flx/gstflxdec.c
@@ -554,7 +554,7 @@ gst_flxdec_chain (GstPad * pad, GstBuffer * buf)
break;
/* create 32 bits output frame */
- res = gst_pad_alloc_buffer (flxdec->srcpad,
+ res = gst_pad_alloc_buffer_and_set_caps (flxdec->srcpad,
GST_BUFFER_OFFSET_NONE,
flxdec->size * 4, GST_PAD_CAPS (flxdec->srcpad), &out);
diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c
index e5a6618d..5e7bd8c5 100644
--- a/gst/goom/gstgoom.c
+++ b/gst/goom/gstgoom.c
@@ -370,7 +370,8 @@ gst_goom_chain (GstPad * pad, GstBuffer * bufin)
}
}
- ret = gst_pad_alloc_buffer (goom->srcpad, GST_BUFFER_OFFSET_NONE,
+ ret =
+ gst_pad_alloc_buffer_and_set_caps (goom->srcpad, GST_BUFFER_OFFSET_NONE,
goom->width * goom->height * 4, GST_PAD_CAPS (goom->srcpad), &bufout);
if (ret != GST_FLOW_OK)
break;
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index d7f46d47..188bab19 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -2005,7 +2005,7 @@ gst_matroska_demux_push_vorbis_codec_priv_data (GstMatroskaDemux * demux,
for (i = 0; i < 2; i++) {
length = p[i + 1];
- if (gst_pad_alloc_buffer (stream->pad, GST_BUFFER_OFFSET_NONE,
+ if (gst_pad_alloc_buffer_and_set_caps (stream->pad, GST_BUFFER_OFFSET_NONE,
length, stream->caps, &priv) == GST_FLOW_OK) {
memcpy (GST_BUFFER_DATA (priv), &p[offset], length);
@@ -2016,8 +2016,8 @@ gst_matroska_demux_push_vorbis_codec_priv_data (GstMatroskaDemux * demux,
offset += length;
}
length = stream->codec_priv_size - offset;
- if (gst_pad_alloc_buffer (stream->pad, GST_BUFFER_OFFSET_NONE, length,
- stream->caps, &priv) == GST_FLOW_OK) {
+ if (gst_pad_alloc_buffer_and_set_caps (stream->pad, GST_BUFFER_OFFSET_NONE,
+ length, stream->caps, &priv) == GST_FLOW_OK) {
memcpy (GST_BUFFER_DATA (priv), &p[offset], length);
ret = gst_pad_push (stream->pad, priv);
if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED)
@@ -2063,8 +2063,8 @@ gst_matroska_demux_add_wvpk_header (GstMatroskaTrackContext * stream,
/* block_samples, flags and crc are already in the buffer */
newlen = block_length + sizeof (Wavpack4Header) - 12;
- if (gst_pad_alloc_buffer (stream->pad, GST_BUFFER_OFFSET_NONE, newlen,
- stream->caps, &newbuf) != GST_FLOW_OK) {
+ if (gst_pad_alloc_buffer_and_set_caps (stream->pad, GST_BUFFER_OFFSET_NONE,
+ newlen, stream->caps, &newbuf) != GST_FLOW_OK) {
return TRUE; /* not an error, pad might not be linked */
}
diff --git a/gst/multipart/multipartdemux.c b/gst/multipart/multipartdemux.c
index 0138f263..89e7954f 100644
--- a/gst/multipart/multipartdemux.c
+++ b/gst/multipart/multipartdemux.c
@@ -285,8 +285,10 @@ gst_multipart_demux_chain (GstPad * pad, GstBuffer * buf)
gst_multipart_find_pad_by_mime (multipart,
multipart->parsing_mime, &created);
if (srcpad != NULL) {
- ret = gst_pad_alloc_buffer (srcpad->pad, GST_BUFFER_OFFSET_NONE,
- datalen, GST_PAD_CAPS (srcpad->pad), &outbuf);
+ ret =
+ gst_pad_alloc_buffer_and_set_caps (srcpad->pad,
+ GST_BUFFER_OFFSET_NONE, datalen, GST_PAD_CAPS (srcpad->pad),
+ &outbuf);
if (ret != GST_FLOW_OK) {
GST_WARNING_OBJECT (multipart, "failed allocating a %d bytes "
"buffer", datalen);
diff --git a/gst/multipart/multipartmux.c b/gst/multipart/multipartmux.c
index 1c588b69..44e5d0bd 100644
--- a/gst/multipart/multipartmux.c
+++ b/gst/multipart/multipartmux.c
@@ -461,8 +461,9 @@ gst_multipart_mux_collected (GstCollectPads * pads, GstMultipartMux * mux)
headerlen = strlen (header);
newlen = headerlen + GST_BUFFER_SIZE (best->buffer);
- ret = gst_pad_alloc_buffer (mux->srcpad, GST_BUFFER_OFFSET_NONE, newlen,
- GST_PAD_CAPS (mux->srcpad), &newbuf);
+ ret =
+ gst_pad_alloc_buffer_and_set_caps (mux->srcpad, GST_BUFFER_OFFSET_NONE,
+ newlen, GST_PAD_CAPS (mux->srcpad), &newbuf);
if (ret != GST_FLOW_OK) {
GST_WARNING_OBJECT (mux, "failed allocating a %d bytes buffer", newlen);
g_free (header);
diff --git a/gst/videomixer/videomixer.c b/gst/videomixer/videomixer.c
index a71ddcde..f0f2377c 100644
--- a/gst/videomixer/videomixer.c
+++ b/gst/videomixer/videomixer.c
@@ -1044,7 +1044,7 @@ gst_videomixer_loop (GstElement * element)
outsize = ROUND_UP_2 (mix->out_width) * ROUND_UP_2 (mix->out_height) * 4;
- outbuf = gst_pad_alloc_buffer (mix->srcpad, GST_BUFFER_OFFSET_NONE, outsize);
+ outbuf = gst_pad_alloc_buffer_and_set_caps (mix->srcpad, GST_BUFFER_OFFSET_NONE, outsize);
switch (mix->background) {
case VIDEO_MIXER_BACKGROUND_CHECKER:
gst_videomixer_fill_checker (GST_BUFFER_DATA (outbuf),
@@ -1106,12 +1106,14 @@ gst_videomixer_collected (GstCollectPads * pads, GstVideoMixer * mix)
mix->out_width = mix->in_width;
mix->out_height = mix->in_height;
- ret = gst_pad_alloc_buffer (mix->srcpad, GST_BUFFER_OFFSET_NONE, outsize,
- newcaps, &outbuf);
+ ret =
+ gst_pad_alloc_buffer_and_set_caps (mix->srcpad, GST_BUFFER_OFFSET_NONE,
+ outsize, newcaps, &outbuf);
gst_caps_unref (newcaps);
} else { /* Otherwise we just allocate a buffer from current caps */
- ret = gst_pad_alloc_buffer (mix->srcpad, GST_BUFFER_OFFSET_NONE, outsize,
- GST_PAD_CAPS (mix->srcpad), &outbuf);
+ ret =
+ gst_pad_alloc_buffer_and_set_caps (mix->srcpad, GST_BUFFER_OFFSET_NONE,
+ outsize, GST_PAD_CAPS (mix->srcpad), &outbuf);
}
if (ret != GST_FLOW_OK) {
diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c
index 29cc1f02..da6b8b7d 100644
--- a/gst/wavenc/gstwavenc.c
+++ b/gst/wavenc/gstwavenc.c
@@ -665,8 +665,10 @@ gst_wavenc_chain (GstPad * pad, GstBuffer * buf)
if (wavenc->flush_header) {
GstBuffer *outbuf;
- result = gst_pad_alloc_buffer (wavenc->srcpad, GST_BUFFER_OFFSET_NONE,
- WAV_HEADER_LEN, GST_PAD_CAPS (wavenc->srcpad), &outbuf);
+ result =
+ gst_pad_alloc_buffer_and_set_caps (wavenc->srcpad,
+ GST_BUFFER_OFFSET_NONE, WAV_HEADER_LEN, GST_PAD_CAPS (wavenc->srcpad),
+ &outbuf);
if (result != GST_FLOW_OK) {
GST_WARNING_OBJECT (wavenc, "failed when allocating a %d bytes buffer "
"for headers", WAV_HEADER_LEN);