Gstreamermm and abilities to use different plugins

Marcin Kolny marcin.kolny at gmail.com
Fri Nov 11 13:39:14 UTC 2016


Hi,
You have two options doing it in gstreamermm:
 * using parser (so you use gst-launch syntax):
      Glib::RefPtr<Gst::Element> element = Gst::Parse::launch("fakesrc !
... ! nvh264enc ! ...");
      element->set_state(Gst::STATE_PLAYING); // or any other stuff
  Please note that element can be casted to Gst::Bin, if you need it.
 * constructing pipeline from scratch:
  Glib::RefPtr<Gst::Element> fakesrc =
Gst::ElementFactory::create_element("fakesrc"), encoder =
Gst::ElementFactory::create_element("nvh264enc"); // and other elements
  Glib::RefPtr<Gst::Pipeline> pipeline = Gst::Pipeline::create();
  pipeline->add(fakesrc)->add(encoder); // and other elements
  fakesrc->link(encoder); // and other elements
  pipeline->set_state(Gst::STATE_PLAYING); // or any other operation
  You can find very basic example of creating simple pipelines this way in
the "examples" directory in the repository, e.g.
https://git.gnome.org/browse/gstreamermm/tree/examples/basics/bus.cc

Feel free to reach me, if you have more detailed questions about gstreamermm

2016-11-11 13:33 GMT+01:00 LC <lienes.cirules at gmail.com>:

> Hello!
> I am going to use gstreamermm api where various plugins can be used.
> Currently i need nvenc element like nvh264enc and another element rtmpdump.
>
> Is it possible to includes all installed plugins in gstreamermm api that
> comes with gstreamer written in c.
> Maybe there is a chance to parse those pipelines where nvh264enc included ?
>
> I saw that python binding allows me to do things like this:
>
> from gi.repository import Gst, GObject
> ....
> main_bin = Gst.parse_bin_from_description( "fakesink ! .....! nvh264enc!
> ..."
> ...
>
> And it works!
>
> Is it possible with gstreamermm.h ?
>
> Thanks!
>
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.
> n4.nabble.com/Gstreamermm-and-abilities-to-use-different-
> plugins-tp4680615.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



-- 
Pozdrawiam
Marcin Kolny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161111/e72f3daa/attachment.html>


More information about the gstreamer-devel mailing list