mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
update for memory api changes
This commit is contained in:
parent
ad0af26eed
commit
ecaea36c3d
22 changed files with 59 additions and 55 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue