Re: GStreamer plugin (C++)



On Mon, 2012-07-30 at 11:13 +0200, Dirk Van Haerenborgh wrote:
> Hi all,
> 
> I'm trying to write a gstreamer plugin in C++, using the GStreamermm
> bindings. Now, there's a good plugins writers guide
> (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/),
> and on the web there's various examples and templates, but for
> gstreamermm, there's very little amount of documentation whatsoever.
> 
> I know I could just resort to using a mixture of C and C++, but using
> the C++ bindings seems so much more elegant.
> 
> Simply 'translating' the examples found in the gstreamer pwg to
> gstreamermm is kind of a dead end; gstreamer requires the use of quite
> a few macros for defining types, which I cannot see an immediate
> gstreamermm translation to. Additionally, I have only little
> experience with gstreamer, and absolutely no experience with gobj
> (yet).
> 
> Is anyone able to put me on the right track? Even the tiniest example
> or explanation would do.
> 
> Thanks in advance,
> -Dirk

Presently, the only plug-ins that have a (probably non-existent)
possibility of being developed using gstreamermm are ones that are
private to applications.  If that's possible, These plug-ins would be
registered using the Gst::Plugin::register_static()[1] method and not
the process that you've described above.

[1]
http://developer.gnome.org/gstreamermm/unstable/classGst_1_1Plugin.html#ac0728bb285ae1bed9298c0f9ea522ad9

In theory, one would extend one of the gstreamermm base classes[2] and
call the Gst::ElementFactory::register_element()[3] method in the
Gst::Plugin::SlotInit slot (callback) so that an element factory that
generates these elements can be created.  That factory can then be added
to the registry using Gst::Registry::add_feature()[4] in the same
Gst::Plugin::SlotInit slot.

[2] http://developer.gnome.org/gstreamermm/unstable/group__GstBaseClasses.html

[3] The Gst::ElementFactory::register_element() method is a method that
is not implemented yet but would wrap the gst_element_register()
function.  That would be part of an upcoming release.

[4]
http://developer.gnome.org/gstreamermm/unstable/classGst_1_1Registry.html#ae1f9a1ddd60ef5a7e1f8cddf14ec404f

I've not tested this and don't really know exactly how it would work (or
if it actually would) but it's how I'd try if I had to.  However, I
think it's easier to write the plug-in in C presently, but that's just a
matter of making things easier.

> 
> PS: If I end up with something working, I will most definitely release
> it to the public domain.
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> https://mail.gnome.org/mailman/listinfo/gtkmm-list

-- 
José






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]