mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 09:38:17 +00:00
update for buffer api change
This commit is contained in:
parent
af14e951c1
commit
48ba9063b0
4 changed files with 4 additions and 4 deletions
|
@ -141,7 +141,7 @@ gst_schro_wrap_gst_buffer (GstBuffer * buffer)
|
||||||
GstMemory *mem;
|
GstMemory *mem;
|
||||||
GstMapInfo info;
|
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)) {
|
if (!gst_memory_map (mem, &info, GST_MAP_READ)) {
|
||||||
GST_ERROR ("Couldn't get readable memory from gstbuffer");
|
GST_ERROR ("Couldn't get readable memory from gstbuffer");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -881,7 +881,7 @@ gst_base_audio_visualizer_chain (GstPad * pad, GstObject * parent,
|
||||||
if (!(adata = (gpointer) gst_adapter_map (scope->adapter, sbpf)))
|
if (!(adata = (gpointer) gst_adapter_map (scope->adapter, sbpf)))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
gst_buffer_take_memory (inbuf, -1,
|
gst_buffer_append_memory (inbuf,
|
||||||
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY, adata, sbpf, 0,
|
gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY, adata, sbpf, 0,
|
||||||
sbpf, NULL, NULL));
|
sbpf, NULL, NULL));
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ gst_core_media_buffer_new (GstCoreMediaCtx * ctx, CMSampleBufferRef sample_buf)
|
||||||
meta->pixel_buf = pixel_buf;
|
meta->pixel_buf = pixel_buf;
|
||||||
meta->block_buf = block_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,
|
gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, data,
|
||||||
size, 0, size, NULL, NULL));
|
size, 0, size, NULL, NULL));
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ gst_core_video_buffer_new (GstCoreMediaCtx * ctx, CVBufferRef cvbuf,
|
||||||
size = cv->CVPixelBufferGetBytesPerRow (pixbuf) * height;
|
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,
|
gst_memory_new_wrapped (GST_MEMORY_FLAG_NO_SHARE, data,
|
||||||
size, 0, size, NULL, NULL));
|
size, 0, size, NULL, NULL));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue