From ecaea36c3d8d1b5efb831fca11a3dc140e343595 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 15 Mar 2012 13:36:17 +0100 Subject: [PATCH] update for memory api changes --- ext/annodex/gstcmmldec.c | 2 +- ext/annodex/gstcmmlenc.c | 2 +- ext/flac/gstflacdec.c | 3 ++- ext/jpeg/gstjpegenc.c | 7 ++++--- ext/speex/gstspeexdec.c | 2 +- ext/speex/gstspeexenc.c | 2 +- gst/interleave/deinterleave.c | 2 +- gst/interleave/interleave.c | 2 +- gst/isomp4/qtdemux.c | 2 +- gst/law/alaw-decode.c | 2 +- gst/law/alaw-encode.c | 2 +- gst/law/mulaw-decode.c | 2 +- gst/law/mulaw-encode.c | 2 +- gst/matroska/matroska-demux.c | 9 +++++---- gst/multifile/gstsplitfilesrc.c | 2 +- gst/multipart/multipartmux.c | 5 +++-- gst/shapewipe/gstshapewipe.c | 2 +- gst/videomixer/videomixer2.c | 3 ++- sys/v4l2/gstv4l2bufferpool.c | 9 +++++---- sys/v4l2/gstv4l2bufferpool.h | 4 +--- tests/check/elements/audiochebband.c | 24 ++++++++++++------------ tests/check/elements/audiocheblimit.c | 24 ++++++++++++------------ 22 files changed, 59 insertions(+), 55 deletions(-) diff --git a/ext/annodex/gstcmmldec.c b/ext/annodex/gstcmmldec.c index 4a04be0..52e2212 100644 --- a/ext/annodex/gstcmmldec.c +++ b/ext/annodex/gstcmmldec.c @@ -438,7 +438,7 @@ gst_cmml_dec_new_buffer (GstCmmlDec * dec, { GstFlowReturn res; - *buffer = gst_buffer_new_allocate (NULL, size, 0); + *buffer = gst_buffer_new_allocate (NULL, size, NULL); if (*buffer != NULL) { if (data) gst_buffer_fill (*buffer, 0, data, size); diff --git a/ext/annodex/gstcmmlenc.c b/ext/annodex/gstcmmlenc.c index d4b0ad1..c5d968d 100644 --- a/ext/annodex/gstcmmlenc.c +++ b/ext/annodex/gstcmmlenc.c @@ -294,7 +294,7 @@ gst_cmml_enc_new_buffer (GstCmmlEnc * enc, { GstFlowReturn res; - *buffer = gst_buffer_new_allocate (NULL, size, 0); + *buffer = gst_buffer_new_allocate (NULL, size, NULL); if (*buffer != NULL) { if (data) gst_buffer_fill (*buffer, 0, data, size); diff --git a/ext/flac/gstflacdec.c b/ext/flac/gstflacdec.c index 182da75..f553f64 100644 --- a/ext/flac/gstflacdec.c +++ b/ext/flac/gstflacdec.c @@ -611,7 +611,8 @@ gst_flac_dec_write (GstFlacDec * flacdec, const FLAC__Frame * frame, } GST_LOG_OBJECT (flacdec, "alloc_buffer_and_set_caps"); - outbuf = gst_buffer_new_allocate (NULL, samples * channels * (width / 8), 0); + outbuf = + gst_buffer_new_allocate (NULL, samples * channels * (width / 8), NULL); gst_buffer_map (outbuf, &map, GST_MAP_WRITE); if (width == 8) { diff --git a/ext/jpeg/gstjpegenc.c b/ext/jpeg/gstjpegenc.c index e59993b..24eaca8 100644 --- a/ext/jpeg/gstjpegenc.c +++ b/ext/jpeg/gstjpegenc.c @@ -162,6 +162,7 @@ ensure_memory (GstJpegEnc * jpegenc) GstMapInfo map; gsize old_size, desired_size, new_size; guint8 *new_data; + static GstAllocationParams params = { 0, 0, 0, 3, }; old_size = jpegenc->output_map.size; if (old_size == 0) @@ -171,7 +172,7 @@ ensure_memory (GstJpegEnc * jpegenc) /* Our output memory wasn't big enough. * Make a new memory that's twice the size, */ - new_memory = gst_allocator_alloc (NULL, 0, desired_size, 0, desired_size, 3); + new_memory = gst_allocator_alloc (NULL, desired_size, ¶ms); gst_memory_map (new_memory, &map, GST_MAP_READWRITE); new_data = map.data; new_size = map.size; @@ -546,6 +547,7 @@ gst_jpegenc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) gint i, j, k; GstBuffer *outbuf; GstVideoFrame frame; + static GstAllocationParams params = { 0, 0, 0, 3, }; jpegenc = GST_JPEGENC (parent); @@ -567,8 +569,7 @@ gst_jpegenc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) end[i] = base[i] + GST_VIDEO_FRAME_COMP_HEIGHT (&frame, i) * stride[i]; } - jpegenc->output_mem = - gst_allocator_alloc (NULL, 0, jpegenc->bufsize, 0, jpegenc->bufsize, 3); + jpegenc->output_mem = gst_allocator_alloc (NULL, jpegenc->bufsize, ¶ms); gst_memory_map (jpegenc->output_mem, &jpegenc->output_map, GST_MAP_READWRITE); jpegenc->jdest.next_output_byte = jpegenc->output_map.data; diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c index b0dfa8b..6032341 100644 --- a/ext/speex/gstspeexdec.c +++ b/ext/speex/gstspeexdec.c @@ -410,7 +410,7 @@ gst_speex_dec_parse_data (GstSpeexDec * dec, GstBuffer * buf) * could also use an allocator */ outbuf = gst_buffer_new_allocate (NULL, - dec->frame_size * dec->header->nb_channels * 2, 0); + dec->frame_size * dec->header->nb_channels * 2, NULL); gst_buffer_map (outbuf, &map, GST_MAP_WRITE); ret = speex_decode_int (dec->state, bits, (spx_int16_t *) map.data); diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c index 32e39fb..8a881d5 100644 --- a/ext/speex/gstspeexenc.c +++ b/ext/speex/gstspeexenc.c @@ -598,7 +598,7 @@ gst_speex_enc_encode (GstSpeexEnc * enc, GstBuffer * buf) if ((GST_FLOW_OK != ret)) goto done; #endif - outbuf = gst_buffer_new_allocate (NULL, outsize, 0); + outbuf = gst_buffer_new_allocate (NULL, outsize, NULL); gst_buffer_map (outbuf, &map, GST_MAP_WRITE); written = speex_bits_write (&enc->bits, (gchar *) map.data, outsize); diff --git a/gst/interleave/deinterleave.c b/gst/interleave/deinterleave.c index 95cae53..5e02e8c 100644 --- a/gst/interleave/deinterleave.c +++ b/gst/interleave/deinterleave.c @@ -702,7 +702,7 @@ gst_deinterleave_process (GstDeinterleave * self, GstBuffer * buf) /* Allocate buffers */ for (srcs = self->srcpads, i = 0; srcs; srcs = srcs->next, i++) { - buffers_out[i] = gst_buffer_new_allocate (NULL, bufsize, 0); + buffers_out[i] = gst_buffer_new_allocate (NULL, bufsize, NULL); /* Make sure we got a correct buffer. The only other case we allow * here is an unliked pad */ diff --git a/gst/interleave/interleave.c b/gst/interleave/interleave.c index e09b37f..6a0d2d8 100644 --- a/gst/interleave/interleave.c +++ b/gst/interleave/interleave.c @@ -1199,7 +1199,7 @@ gst_interleave_collected (GstCollectPads2 * pads, GstInterleave * self) nsamples = size / width; - outbuf = gst_buffer_new_allocate (NULL, size * self->channels, 0); + outbuf = gst_buffer_new_allocate (NULL, size * self->channels, NULL); if (outbuf == NULL || gst_buffer_get_size (outbuf) < size * self->channels) { gst_buffer_unref (outbuf); diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 62bb043..bfb32e7 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -8411,7 +8411,7 @@ qtdemux_tag_add_id32 (GstQTDemux * demux, const char *tag, if (len < 12 + 2) return; - buf = gst_buffer_new_allocate (NULL, len - 14, 0); + buf = gst_buffer_new_allocate (NULL, len - 14, NULL); gst_buffer_fill (buf, 0, data + 14, len - 14); taglist = gst_tag_list_from_id3v2_tag (buf); diff --git a/gst/law/alaw-decode.c b/gst/law/alaw-decode.c index c9a8de4..8de4cd2 100644 --- a/gst/law/alaw-decode.c +++ b/gst/law/alaw-decode.c @@ -328,7 +328,7 @@ gst_alaw_dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) linear_size = alaw_size * 2; - outbuf = gst_buffer_new_allocate (NULL, linear_size, 0); + outbuf = gst_buffer_new_allocate (NULL, linear_size, NULL); gst_buffer_map (outbuf, &outmap, GST_MAP_WRITE); linear_data = (gint16 *) outmap.data; diff --git a/gst/law/alaw-encode.c b/gst/law/alaw-encode.c index 266f24b..0e08c73 100644 --- a/gst/law/alaw-encode.c +++ b/gst/law/alaw-encode.c @@ -520,7 +520,7 @@ gst_alaw_enc_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) GST_LOG_OBJECT (alawenc, "buffer with ts=%" GST_TIME_FORMAT, GST_TIME_ARGS (timestamp)); - outbuf = gst_buffer_new_allocate (NULL, alaw_size, 0); + outbuf = gst_buffer_new_allocate (NULL, alaw_size, NULL); if (duration == GST_CLOCK_TIME_NONE) { duration = gst_util_uint64_scale_int (alaw_size, diff --git a/gst/law/mulaw-decode.c b/gst/law/mulaw-decode.c index 82e5b56..a1bef85 100644 --- a/gst/law/mulaw-decode.c +++ b/gst/law/mulaw-decode.c @@ -259,7 +259,7 @@ gst_mulawdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) linear_size = mulaw_size * 2; - outbuf = gst_buffer_new_allocate (NULL, linear_size, 0); + outbuf = gst_buffer_new_allocate (NULL, linear_size, NULL); gst_buffer_map (outbuf, &outmap, GST_MAP_WRITE); linear_data = (gint16 *) outmap.data; diff --git a/gst/law/mulaw-encode.c b/gst/law/mulaw-encode.c index fc228d9..165a346 100644 --- a/gst/law/mulaw-encode.c +++ b/gst/law/mulaw-encode.c @@ -263,7 +263,7 @@ gst_mulawenc_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) timestamp = GST_BUFFER_TIMESTAMP (buffer); duration = GST_BUFFER_DURATION (buffer); - outbuf = gst_buffer_new_allocate (NULL, mulaw_size, 0); + outbuf = gst_buffer_new_allocate (NULL, mulaw_size, NULL); if (duration == -1) { duration = gst_util_uint64_scale_int (mulaw_size, diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index fbe4d5a..a8937d8 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -2744,7 +2744,7 @@ gst_matroska_demux_add_wvpk_header (GstElement * element, wvh.ck_size = size + sizeof (Wavpack4Header) - 20; /* block_samples, flags and crc are already in the buffer */ - newbuf = gst_buffer_new_allocate (NULL, sizeof (Wavpack4Header) - 12, 0); + newbuf = gst_buffer_new_allocate (NULL, sizeof (Wavpack4Header) - 12, NULL); gst_buffer_map (newbuf, &outmap, GST_MAP_WRITE); data = outmap.data; @@ -2807,7 +2807,7 @@ gst_matroska_demux_add_wvpk_header (GstElement * element, if (newbuf == NULL) { out_size = sizeof (Wavpack4Header) + blocksize; - newbuf = gst_buffer_new_allocate (NULL, out_size, 0); + newbuf = gst_buffer_new_allocate (NULL, out_size, NULL); gst_buffer_copy_into (newbuf, *buf, GST_BUFFER_COPY_TIMESTAMPS | GST_BUFFER_COPY_FLAGS, 0, -1); @@ -3031,9 +3031,10 @@ gst_matroska_demux_align_buffer (GstMatroskaDemux * demux, if (((guintptr) map.data) & (alignment - 1)) { GstBuffer *new_buffer; + GstAllocationParams params = { 0, 0, 0, alignment - 1, }; new_buffer = gst_buffer_new_allocate (NULL, - gst_buffer_get_size (buffer), alignment - 1); + gst_buffer_get_size (buffer), ¶ms); /* Copy data "by hand", so ensure alignment is kept: */ gst_buffer_fill (new_buffer, 0, map.data, map.size); @@ -5309,7 +5310,7 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * if (priv == NULL) { GstMapInfo map; - priv = gst_buffer_new_allocate (NULL, 5, 0); + priv = gst_buffer_new_allocate (NULL, 5, NULL); gst_buffer_map (priv, &map, GST_MAP_WRITE); data = map.data; rate_idx = aac_rate_idx (audiocontext->samplerate); diff --git a/gst/multifile/gstsplitfilesrc.c b/gst/multifile/gstsplitfilesrc.c index f9fee82..20937a7 100644 --- a/gst/multifile/gstsplitfilesrc.c +++ b/gst/multifile/gstsplitfilesrc.c @@ -487,7 +487,7 @@ gst_split_file_src_create (GstBaseSrc * basesrc, guint64 offset, guint size, "%" G_GUINT64_FORMAT ", %s)", src->cur_part, cur_part.start, cur_part.stop, cur_part.path); - buf = gst_buffer_new_allocate (NULL, size, 0); + buf = gst_buffer_new_allocate (NULL, size, NULL); GST_BUFFER_OFFSET (buf) = offset; diff --git a/gst/multipart/multipartmux.c b/gst/multipart/multipartmux.c index 4756304..fb9c884 100644 --- a/gst/multipart/multipartmux.c +++ b/gst/multipart/multipartmux.c @@ -395,6 +395,7 @@ gst_multipart_mux_collected (GstCollectPads2 * pads, GstMultipartMux * mux) GstStructure *structure = NULL; GstCaps *caps; const gchar *mime; + static GstAllocationParams params = { 0, 0, 0, 1, }; GST_DEBUG_OBJECT (mux, "all pads are collected"); @@ -461,7 +462,7 @@ gst_multipart_mux_collected (GstCollectPads2 * pads, GstMultipartMux * mux) mux->boundary, mime, gst_buffer_get_size (best->buffer)); headerlen = strlen (header); - headerbuf = gst_buffer_new_allocate (NULL, headerlen, 1); + headerbuf = gst_buffer_new_allocate (NULL, headerlen, ¶ms); gst_buffer_fill (headerbuf, 0, header, headerlen); g_free (header); @@ -501,7 +502,7 @@ gst_multipart_mux_collected (GstCollectPads2 * pads, GstMultipartMux * mux) * don't need to unref headerbuf here. */ goto beach; - footerbuf = gst_buffer_new_allocate (NULL, 2, 1); + footerbuf = gst_buffer_new_allocate (NULL, 2, ¶ms); gst_buffer_fill (footerbuf, 0, "\r\n", 2); /* the footer has the same timestamp as the data buffer and has a diff --git a/gst/shapewipe/gstshapewipe.c b/gst/shapewipe/gstshapewipe.c index 6b06909..4af27a7 100644 --- a/gst/shapewipe/gstshapewipe.c +++ b/gst/shapewipe/gstshapewipe.c @@ -872,7 +872,7 @@ gst_shape_wipe_video_sink_chain (GstPad * pad, GstObject * parent, /* Try to blend inplace, if it's not possible * get a new buffer from downstream. */ if (!gst_buffer_is_writable (buffer)) { - outbuf = gst_buffer_new_allocate (NULL, gst_buffer_get_size (buffer), 0); + outbuf = gst_buffer_new_allocate (NULL, gst_buffer_get_size (buffer), NULL); gst_buffer_copy_into (outbuf, buffer, GST_BUFFER_COPY_METADATA, 0, -1); new_outbuf = TRUE; } else { diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c index e4bcc12..718e27a 100644 --- a/gst/videomixer/videomixer2.c +++ b/gst/videomixer/videomixer2.c @@ -818,10 +818,11 @@ gst_videomixer2_blend_buffers (GstVideoMixer2 * mix, guint outsize; BlendFunction composite; GstVideoFrame outframe; + static GstAllocationParams params = { 0, 0, 0, 15, }; outsize = GST_VIDEO_INFO_SIZE (&mix->info); - *outbuf = gst_buffer_new_allocate (NULL, outsize, 15); + *outbuf = gst_buffer_new_allocate (NULL, outsize, ¶ms); GST_BUFFER_TIMESTAMP (*outbuf) = output_start_time; GST_BUFFER_DURATION (*outbuf) = output_end_time - output_start_time; diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c index b58648c..136eb78 100644 --- a/sys/v4l2/gstv4l2bufferpool.c +++ b/sys/v4l2/gstv4l2bufferpool.c @@ -147,7 +147,7 @@ gst_v4l2_buffer_pool_alloc_buffer (GstBufferPool * bpool, GstBuffer ** buffer, case GST_V4L2_IO_RW: { newbuf = - gst_buffer_new_allocate (pool->allocator, pool->size, pool->align); + gst_buffer_new_allocate (pool->allocator, pool->size, &pool->params); break; } case GST_V4L2_IO_MMAP: @@ -275,9 +275,10 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config) pool->size = size; pool->max_buffers = MAX (min_buffers, max_buffers); pool->min_buffers = MIN (pool->max_buffers, min_buffers); - pool->prefix = prefix; - pool->padding = padding; - pool->align = align; + gst_allocation_params_init (&pool->params); + pool->params.prefix = prefix; + pool->params.padding = padding; + pool->params.align = align; gst_buffer_pool_config_set (config, caps, size, min_buffers, max_buffers, prefix, padding, align); diff --git a/sys/v4l2/gstv4l2bufferpool.h b/sys/v4l2/gstv4l2bufferpool.h index 09745fd..532a39b 100644 --- a/sys/v4l2/gstv4l2bufferpool.h +++ b/sys/v4l2/gstv4l2bufferpool.h @@ -52,12 +52,10 @@ struct _GstV4l2BufferPool gint video_fd; /* a dup(2) of the v4l2object's video_fd */ GstAllocator *allocator; + GstAllocationParams params; guint size; guint min_buffers; guint max_buffers; - guint prefix; - guint padding; - guint align; gboolean add_videometa; guint num_allocated; /* number of buffers allocated by the driver */ diff --git a/tests/check/elements/audiochebband.c b/tests/check/elements/audiochebband.c index 71e7c07..5f61485 100644 --- a/tests/check/elements/audiochebband.c +++ b/tests/check/elements/audiochebband.c @@ -123,7 +123,7 @@ GST_START_TEST (test_type1_32_bp_0hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i++) @@ -185,7 +185,7 @@ GST_START_TEST (test_type1_32_bp_11025hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i += 4) { @@ -251,7 +251,7 @@ GST_START_TEST (test_type1_32_bp_22050hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i += 2) { @@ -315,7 +315,7 @@ GST_START_TEST (test_type1_32_br_0hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i++) @@ -377,7 +377,7 @@ GST_START_TEST (test_type1_32_br_11025hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i += 4) { @@ -443,7 +443,7 @@ GST_START_TEST (test_type1_32_br_22050hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i += 2) { @@ -891,7 +891,7 @@ GST_START_TEST (test_type2_32_bp_0hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i++) @@ -953,7 +953,7 @@ GST_START_TEST (test_type2_32_bp_11025hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i += 4) { @@ -1019,7 +1019,7 @@ GST_START_TEST (test_type2_32_bp_22050hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i += 2) { @@ -1083,7 +1083,7 @@ GST_START_TEST (test_type2_32_br_0hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i++) @@ -1145,7 +1145,7 @@ GST_START_TEST (test_type2_32_br_11025hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i += 4) { @@ -1211,7 +1211,7 @@ GST_START_TEST (test_type2_32_br_22050hz) 44100 / 4.0 - 1000, NULL); g_object_set (G_OBJECT (audiochebband), "upper-frequency", 44100 / 4.0 + 1000, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 1024 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 1024; i += 2) { diff --git a/tests/check/elements/audiocheblimit.c b/tests/check/elements/audiocheblimit.c index 6560e16..0a137f4 100644 --- a/tests/check/elements/audiocheblimit.c +++ b/tests/check/elements/audiocheblimit.c @@ -120,7 +120,7 @@ GST_START_TEST (test_type1_32_lp_0hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 128; i++) @@ -179,7 +179,7 @@ GST_START_TEST (test_type1_32_lp_22050hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 128; i += 2) { @@ -240,7 +240,7 @@ GST_START_TEST (test_type1_32_hp_0hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 128; i++) @@ -299,7 +299,7 @@ GST_START_TEST (test_type1_32_hp_22050hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 128; i += 2) { @@ -360,7 +360,7 @@ GST_START_TEST (test_type1_64_lp_0hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gdouble), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gdouble), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gdouble *) map.data; for (i = 0; i < 128; i++) @@ -419,7 +419,7 @@ GST_START_TEST (test_type1_64_lp_22050hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gdouble), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gdouble), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gdouble *) map.data; for (i = 0; i < 128; i += 2) { @@ -480,7 +480,7 @@ GST_START_TEST (test_type1_64_hp_0hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gdouble), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gdouble), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gdouble *) map.data; for (i = 0; i < 128; i++) @@ -539,7 +539,7 @@ GST_START_TEST (test_type1_64_hp_22050hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gdouble), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gdouble), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gdouble *) map.data; for (i = 0; i < 128; i += 2) { @@ -600,7 +600,7 @@ GST_START_TEST (test_type2_32_lp_0hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 128; i++) @@ -659,7 +659,7 @@ GST_START_TEST (test_type2_32_lp_22050hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 128; i += 2) { @@ -720,7 +720,7 @@ GST_START_TEST (test_type2_32_hp_0hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 128; i++) @@ -779,7 +779,7 @@ GST_START_TEST (test_type2_32_hp_22050hz) "could not set to playing"); g_object_set (G_OBJECT (audiocheblimit), "cutoff", 44100 / 4.0, NULL); - inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), 0); + inbuffer = gst_buffer_new_allocate (NULL, 128 * sizeof (gfloat), NULL); gst_buffer_map (inbuffer, &map, GST_MAP_WRITE); in = (gfloat *) map.data; for (i = 0; i < 128; i += 2) { -- 2.7.4