How to get pointer to a gstBuffer with QtGSTreamer

George Kiagiadakis kiagiadakis.george at gmail.com
Tue Apr 17 02:45:04 PDT 2012


On Tue, Apr 17, 2012 at 12:22 PM, pfarmer <flacone at gmx.de> wrote:
> Hello,
> How can I get a pointer to a gstBuffer with QtGSTreamer?
>
> I want to combine a 3D rendering library with GStreamer. In order to display
> some 2D video content in the rendering frame i need the following image data
> format:
> RGBRGBRGB... each letter is one byte; which corresponds to the following
> GStreamer caps:
>

Why would you want to get a GstBuffer pointer when what you really
want is to get the data of the buffer? bufferptr->data() should do
that in QtGStreamer. But if you really really want a GstBuffer*, then
you can just get it implicitly from a smart pointer:

QGst::BufferPtr bufferptr;
GstBuffer *b = bufferptr;
gst_buffer_ref(b);
....

Regards,
George


More information about the gstreamer-devel mailing list