Hi Franz,
You should be able to use any plugin from gstreamermm. Please have a look
at the examples in the gstreamermm repository, for example the oggplayer
[1]. As you can see there, we create filesrc element using ElementFactory
class, which returns an object of type Gst::Element:

Glib::RefPtr<Gst::Element> source = Gst::ElementFactory::create_element(
"filesrc");

This object has bunch of methods, and the one you might be interested in is
set_property which is equivalent to g_object_set and allows you setting
property values, e.g.

source->set_property("location", "/my/file.mp4");

Please let me know if you have any questions

[1]
https://gitlab.gnome.org/GNOME/gstreamermm/-/blob/master/examples/ogg_player/main.cc#L183


czw., 29 paź 2020 o 10:31 Franz Bender via gtkmm-list <gtkmm-list@gnome.org>
napisał(a):

> Dear gtkmm-Community,
>
> I’m working on a C++ project involving GStreamer, which is why I use
> gstreamermm as a C++ bridge. My problem is that I have to interface with a
> gstreamer plugin which is not wrapped by gstreamermm. I was unable to
> figure out how to implement this into my pipeline.
>
> Specifically I want to use NVidias nvinfer plugin (which is part of their
> deepstream-neural-network-efforts) in a C++ tool. What is the preferred way
> of adding these C-plugins to a Cpp-Gstreamermm Pipeline and setting their
> properties? Would I use the Gst::ElementFactory to create the Element?
>
> I would really appreciate a tiny example on how I could add a C plugin to
> this minimal pipeline example:
>
>
>
> Glib::RefPtr<Glib::MainLoop> mainLoop;
> Glib::RefPtr<Gst::Pipeline> pipeline;
>
> Gst::init();
> mainLoop = Glib::MainLoop::create();
> pipeline = Gst::Pipeline::create("Pipeline“);
>
> // Add a pure C plugin, set a property to a value
> // and maybe connect a signal
>
> pipeline->set_state(Gst::STATE_PLAYING);
> mainLoop->run();
>
>
>
> Many thanks in advance for your efforts!
>
> Best regards from Berlin,
> Franz :)
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtkmm-list
>


-- 
Marcin Kolny
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to