outbuf = gst_buffer_new ();
gst_buffer_copy_into (outbuf, buf, GST_BUFFER_COPY_METADATA, 0, -1);
- gst_buffer_take_memory (outbuf, -1, jpegenc->output_mem);
+ gst_buffer_append_memory (outbuf, jpegenc->output_mem);
jpegenc->output_mem = NULL;
ret = gst_pad_push (jpegenc->srcpad, outbuf);
data = (guint8 *) avimux->idx;
avimux->idx = NULL; /* will be free()'ed by gst_buffer_unref() */
- gst_buffer_take_memory (buffer, -1,
+ gst_buffer_append_memory (buffer,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
avimux->total_data += size + 8;
ret = gst_buffer_new ();
slen = strlen (utf8);
- gst_buffer_take_memory (ret, -1,
+ gst_buffer_append_memory (ret,
gst_memory_new_wrapped (0, utf8, slen, 0, slen, utf8, g_free));
GST_BUFFER_OFFSET (ret) = 0;
GstBuffer *buf;
buf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (free_func ? 0 : GST_MEMORY_FLAG_READONLY,
mem, size, 0, size, mem, free_func));
GstBuffer *buf;
buf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (free_func ? 0 : GST_MEMORY_FLAG_READONLY,
mem, size, 0, size, mem, free_func));
GstBuffer *buf;
buf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
return buf;
GstBuffer *buf;
buf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (free_func ? 0 : GST_MEMORY_FLAG_READONLY,
mem, size, 0, size, mem, free_func));
GstMemory *mem;
mem = gst_buffer_get_memory (*buf, i);
- gst_buffer_take_memory (dest, -1, mem);
+ gst_buffer_append_memory (dest, mem);
}
return TRUE;
}
buf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
GST_BUFFER_OFFSET (buf) = multifilesrc->offset;
GST_BUFFER_OFFSET_END (buf) = multifilesrc->offset + size;
GST_MEMDUMP ("Extracted packet", data, depay->packetsize);
buf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, data, depay->packetsize, 0,
depay->packetsize, data, g_free));
data = g_base64_decode (configuration, &size);
confbuf = gst_buffer_new ();
- gst_buffer_take_memory (confbuf, -1,
+ gst_buffer_append_memory (confbuf,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
if (!gst_rtp_theora_depay_parse_configuration (rtptheoradepay, confbuf))
/* create buffer for packet */
if (G_UNLIKELY (to_free)) {
outbuf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, to_free,
(payload - to_free) + length, payload - to_free, length, to_free,
g_free));
data = g_base64_decode (configuration, &size);
confbuf = gst_buffer_new ();
- gst_buffer_take_memory (confbuf, -1,
+ gst_buffer_append_memory (confbuf,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
if (!gst_rtp_vorbis_depay_parse_configuration (rtpvorbisdepay, confbuf))
goto invalid_configuration;
/* create buffer for packet */
if (G_UNLIKELY (to_free)) {
outbuf = gst_buffer_new ();
- gst_buffer_take_memory (outbuf, -1,
+ gst_buffer_append_memory (outbuf,
gst_memory_new_wrapped (0, to_free,
(payload - to_free) + length, payload - to_free, length, to_free,
g_free));
size -= 1;
buf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
/* don't need message anymore */
}
outbuf = gst_buffer_new ();
- gst_buffer_take_memory (outbuf, -1,
+ gst_buffer_append_memory (outbuf,
gst_memory_new_wrapped (0, pktdata, pktsize, offset, ret, pktdata,
g_free));
len = strlen (header);
buf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, header, len, 0, len, header, g_free));
return buf;
len = strlen (header);
buf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (0, header, len, 0, len, header, g_free));
return buf;
if (meta->mem == MAP_FAILED)
goto mmap_failed;
- gst_buffer_take_memory (newbuf, -1,
+ gst_buffer_append_memory (newbuf,
gst_memory_new_wrapped (0,
meta->mem, meta->vbuffer.length, 0, meta->vbuffer.length, NULL,
NULL));
}
succeeded = TRUE;
- gst_buffer_take_memory (ximage, -1,
+ gst_buffer_append_memory (ximage,
gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, meta->ximage->data,
meta->size, 0, meta->size, NULL, NULL));
}
buf = gst_buffer_new ();
- gst_buffer_take_memory (buf, -1, gst_memory_new_wrapped (0, data,
+ gst_buffer_append_memory (buf, gst_memory_new_wrapped (0, data,
size, 0, size, data, g_free));
GST_BUFFER_OFFSET (buf) = 0;
GST_BUFFER_TIMESTAMP (buf) = 0;
for (i = 0; i < 48000; i++)
data[i] = (n % 2 == 0) ? -1.0 : 1.0;
- gst_buffer_take_memory (buffer, -1, gst_memory_new_wrapped (0, data,
+ gst_buffer_append_memory (buffer, gst_memory_new_wrapped (0, data,
size, 0, size, data, g_free));
GST_BUFFER_OFFSET (buffer) = GST_BUFFER_OFFSET_NONE;