qtgstreamer: Buffer Timestamp

George Kiagiadakis kiagiadakis.george at gmail.com
Thu Jan 2 05:46:33 PST 2014


On Thu, Jan 2, 2014 at 3:35 PM, Martin Jackson
<mjackson220.list at gmail.com> wrote:
> Hi George,
>
> Thanks for the prompt reply!
>
> I wondered if something like that was possible, but I couldn't figure out
> how to access the underlying structure of the QGst::Buffer class, or
> alternatively to promote a GstBuffer to a QGst::Buffer
>
> Could you possibly point me in the right direction on how to do this?
>

This is also in the documentation somewhere and applies for any class,
not just GstBuffer:

*** GstBuffer* -> QGst::BufferPtr: Use the wrap() method.

GstBuffer *buf;
QGst::BufferPtr qbuf = QGst::BufferPtr::wrap (buf);

*** QGst::BufferPtr -> GstBuffer*: Just cast to the C class pointer
(static_cast, to be sure it is safe)

QGst::BufferPtr qbuf;
GstBuffer *buf = static_cast<GstBuffer*>(qbuf);

Regards,
George


More information about the gstreamer-devel mailing list