gstreamer/gstreamer-sharp/glue/adapter.c

15 lines
309 B
C
Raw Normal View History

#include <gst/gst.h>
#include <gst/base/gstadapter.h>
GstBuffer *
2009-09-20 08:19:49 +00:00
gstsharp_gst_adapter_peek_buffer (GstAdapter * adapter, guint size)
{
GstBuffer *ret = gst_buffer_try_new_and_alloc (size);
if (ret == NULL)
return NULL;
gst_adapter_copy (adapter, GST_BUFFER_DATA (ret), 0, size);
return ret;
}