GstMeta buffers

John P Poet jppoet at gmail.com
Mon Oct 3 23:15:03 UTC 2016


On Fri, Sep 30, 2016 at 1:16 AM Sebastian Dröge <sebastian at centricular.com>
wrote:

>
> You can use a C++ class but you will have to store it as a pointer, and
> make sure that you call delete on it when the meta is freed.
>
> Storing C++ classes directly in C structs causes memory leaks as their
> destructor can't be called.
>

The problem I forgot about with using C++, is there is no direct way to
call a C++ method from C.  Can I rename:

 gst-libav/ext/libav/gstavvidenc.c
to
 gst-libav/ext/libav/gstavvidenc.cpp

?

Assuming the answer is no, means that I need to change my C++ methods to
just be C functions.  It is probably time for me to get a better handle on
glib (GObject) stuff.  Until I started working on this gstreamer stuff, I
had not written straight C in a couple of decades.  Do you happen to know
of a good guide to "GObject for C++ programers"?

Thanks,

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161003/07418046/attachment.html>


More information about the gstreamer-devel mailing list