GstMemory *mem;
GstMapInfo info;
- mem = gst_buffer_get_merged_memory (buffer);
+ mem = gst_buffer_get_all_memory (buffer);
if (!gst_memory_map (mem, &info, GST_MAP_READ)) {
GST_ERROR ("Couldn't get readable memory from gstbuffer");
return NULL;
if (!(adata = (gpointer) gst_adapter_map (scope->adapter, sbpf)))
break;
- gst_buffer_take_memory (inbuf, -1,
+ gst_buffer_append_memory (inbuf,
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY, adata, sbpf, 0,
sbpf, NULL, NULL));
meta->pixel_buf = pixel_buf;
meta->block_buf = block_buf;
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, data,
size, 0, size, NULL, NULL));
size = cv->CVPixelBufferGetBytesPerRow (pixbuf) * height;
}
- gst_buffer_take_memory (buf, -1,
+ gst_buffer_append_memory (buf,
gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, data,
size, 0, size, NULL, NULL));