Gstreamermm and abilities to use different plugins

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Gstreamermm and abilities to use different plugins

llama
This post was updated on .
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 ? I cant find header files to nvh264enc inside gstreamermm.h. Is it available once they are available ?

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

Marcin Kolny
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 <[hidden email]>:
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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
Pozdrawiam
Marcin Kolny

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

llama
I saw the way to parse and create pipeline.
I wonder, if it's possible to use nvh264enc element if it's not included in gstreamermm.h.
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

Marcin Kolny
Yes, it's possible to use any element you have installed in your system. Those elements included in gstreamermm.h are just a classes which provide convenient and typesafe API of elements from gstreamer-core and gst-plugins-base, for setting properties, connecting to signals, or use interface methods.
Also, please note that this API is deprecated, and will be removed in the future.

2016-11-11 15:10 GMT+01:00 LC <[hidden email]>:
I saw the way to parse and create pipeline.
I wonder, if it's possible to use nvh264enc element if it's not included in
gstreamermm.h.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamermm-and-abilities-to-use-different-plugins-tp4680615p4680617.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
Pozdrawiam
Marcin Kolny

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

llama
It was helpful :)
Many thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

llama
This post was updated on .
Now i am fighting with gstreamermm setup.
I installed required dependencies, and followed basic installation instructions.
I made build from git source and ./autogen.sh than ./configure.
Configure throw some errors but lastly it shows good formated configuration.

But make does not work. It says :
make  all-recursive
make[1]: Entering directory '/home/videogoal/Desktop/gstreamermm'
Making all in tools
make[2]: Entering directory '/home/lc/Desktop/gstreamermm/tools'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/lc/Desktop/gstreamermm/tools'
Making all in gstreamer/gstreamermm
make[2]: Entering directory '/home/lc/Desktop/gstreamermm/gstreamer/gstreamermm'
make[2]: *** No rule to make target 'allocator.cc', needed by 'allocator.lo'.  Stop.
make[2]: Leaving directory '/home/lc/Desktop/gstreamermm/gstreamer/gstreamermm'
Makefile:645: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/lc/Desktop/gstreamermm'
Makefile:487: recipe for target 'all' failed
make: *** [all] Error 2
 
So i wonder if build really works as expected.
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

Marcin Kolny
I'd recommend you to clean your repository before:
git clean -dxf
./autogen.sh
make
sudo make install

However, git repository is rather intended for gstreamermm developers, so I'd recommend to use stable release. You can download the package from the ftp: http://ftp.gnome.org/pub/gnome/sources/gstreamermm/1.8/
When you unpack the tarbal, you need to:
./configure
make
sudo make install

Let me know if you have any other issues,

Marcin

2016-11-12 15:11 GMT+01:00 LC <[hidden email]>:
Now i am fighting with gstreamermm setup.
I installed required dependencies, and followed basic installation
instructions.
I made build from git source and ./autogen.sh than ./configure.
Configure throw some errors but lastly it shows good formated configuration.

But make install does not work. It says :
make  all-recursive
make[1]: Entering directory '/home/videogoal/Desktop/gstreamermm'
Making all in tools
make[2]: Entering directory '/home/lc/Desktop/gstreamermm/tools'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/lc/Desktop/gstreamermm/tools'
Making all in gstreamer/gstreamermm
make[2]: Entering directory
'/home/lc/Desktop/gstreamermm/gstreamer/gstreamermm'
make[2]: *** No rule to make target 'allocator.cc', needed by
'allocator.lo'.  Stop.
make[2]: Leaving directory
'/home/lc/Desktop/gstreamermm/gstreamer/gstreamermm'
Makefile:645: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/lc/Desktop/gstreamermm'
Makefile:487: recipe for target 'all' failed
make: *** [all] Error 2

So i wonder if build really works as expected.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamermm-and-abilities-to-use-different-plugins-tp4680615p4680646.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

llama
gstreamermm-1.8.0 configuration works.
There is necessery to use ./configure CPPFLAGS, otherwise it complains about /usr/local/include/gstreamer-1.0/gst/gl/gstglapi.h:24:32: fatal error: gst/gl/gstglconfig.h: No such file or directory.

sudo make throw me errors like those :
  CXX      glfilter.lo
glfilter.cc: In member function ‘void Gst::Bad::GLFilter::render_to_target(bool, GLuint, GLuint, const SlotTextureOperation&)’:
glfilter.cc:44:120: error: cannot convert ‘bool’ to ‘GstGLMemory* {aka _GstGLMemory*}’ for argument ‘2’ to ‘gboolean gst_gl_filter_render_to_target(GstGLFilter*, GstGLMemory*, GstGLMemory*, GstGLFilterRenderFunc, gpointer)’
   gst_gl_filter_render_to_target(gobj(), resize, input, target, &Slot_Texture_Operation_gstreamermm_callback, slot_copy);
                                                                                                                        ^
glfilter.cc: In static member function ‘static void Gst::Bad::GLFilter_Class::class_init_function(void*, void*)’:
glfilter.cc:104:25: error: invalid conversion from ‘gboolean (*)(GstGLFilter*, guint, guint) {aka int (*)(_GstGLFilter*, unsigned int, unsigned int)}’ to ‘gboolean (*)(GstGLFilter*, GstGLMemory*, GstGLMemory*) {aka int (*)(_GstGLFilter*, _GstGLMemory*, _GstGLMemory*)}’ [-fpermissive]
   klass->filter_texture = &filter_texture_vfunc_callback;

As I understood these are gstreamer internal type convertion problems.
Maybe it's necessery to set some compiler flags ?
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

Marcin Kolny
Hi,
gsteamer-plugins-bad is very experimental module, and I'd recommend you to disable it:
./configure --disable-plugins-bad

2016-11-14 10:44 GMT+01:00 LC <[hidden email]>:
gstreamermm-1.8.0 configuration works.
There is necessery to use ./configure CPPFLAGS, otherwise it complains about
/usr/local/include/gstreamer-1.0/gst/gl/gstglapi.h:24:32: fatal error:
gst/gl/gstglconfig.h: No such file or directory.

sudo make throw me errors like those :
  CXX      glfilter.lo
glfilter.cc: In member function ‘void
Gst::Bad::GLFilter::render_to_target(bool, GLuint, GLuint, const
SlotTextureOperation&)’:
glfilter.cc:44:120: error: cannot convert ‘bool’ to ‘GstGLMemory* {aka
_GstGLMemory*}’ for argument ‘2’ to ‘gboolean
gst_gl_filter_render_to_target(GstGLFilter*, GstGLMemory*, GstGLMemory*,
GstGLFilterRenderFunc, gpointer)’
   gst_gl_filter_render_to_target(gobj(), resize, input, target,
&Slot_Texture_Operation_gstreamermm_callback, slot_copy);

^
glfilter.cc: In static member function ‘static void
Gst::Bad::GLFilter_Class::class_init_function(void*, void*)’:
glfilter.cc:104:25: error: invalid conversion from ‘gboolean
(*)(GstGLFilter*, guint, guint) {aka int (*)(_GstGLFilter*, unsigned int,
unsigned int)}’ to ‘gboolean (*)(GstGLFilter*, GstGLMemory*, GstGLMemory*)
{aka int (*)(_GstGLFilter*, _GstGLMemory*, _GstGLMemory*)}’ [-fpermissive]
   klass->filter_texture = &filter_texture_vfunc_callback;

As I understood these are gstreamer internal type convertion problems.
Maybe it's necessery to set some compiler flags ?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamermm-and-abilities-to-use-different-plugins-tp4680615p4680671.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
Pozdrawiam
Marcin Kolny

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

llama
This post was updated on .
As i understood from previous conversation, i can use any gstreamer plugin installed on my system.

If i disable them by ./configure disabling this module, do i have no risk to get some inconsistencies with installed bad gstreamer plugins ?

What this gsteamer-plugins-bad module resolves ?

Thanks for the fast response :)
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

llama
By disabling that module, `make && make install` sucess. But hello_world sample throw errors like this:
videogoal@videogoal-HP-EliteBook-8470w:~/Downloads/gstreamermm-1.8.0/examples/hello_world$ sudo ./example

(lt-example:5653): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(lt-example:5653): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

Is it problem around GLib, GTK, GObject or Gstreamer ?

I have glibmm-2.47.6 and libgtkmm-3.0-1v5.
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

Marcin Kolny
In reply to this post by llama
Disabling plugins-bad in gstreamermm means, that you won't be able to use some convenient C++ interfaces, but it doesn't mean that you won't be able to use gst-plugins-bad plugins at all. Moreover, gstreamermm's plugins bad contains only interface for GLFilter, so it's probably not so useful in your case.

2016-11-14 12:36 GMT+01:00 LC <[hidden email]>:
As i understood from previous conversation, i can use any gstreamer plugin
installed on my system.

If i disable them, do i have no risk to get some inconsistencies with
installed bad gstreamer plugins ?

What this gsteamer-plugins-bad reloves ?

Thanks for the fast response :)



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamermm-and-abilities-to-use-different-plugins-tp4680615p4680677.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
Pozdrawiam
Marcin Kolny

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamermm and abilities to use different plugins

Marcin Kolny
In reply to this post by llama
It's very difficult to say, where is it coming from, without a callstack. However, I'm almost sure that it's caused by the plugins interface, which as I said few mails earlier, is deprecated. So as long as you don't use plugins interface, and don't hit any functional issues, I wouldn't care that much about this.

2016-11-14 13:11 GMT+01:00 LC <[hidden email]>:
By disabling that module, `make && make install` sucess. But hello_world
sample throw errors like this:
videogoal@videogoal-HP-EliteBook-8470w:~/Downloads/gstreamermm-1.8.0/examples/hello_world$
sudo ./example

(lt-example:5653): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(lt-example:5653): GLib-GObject-CRITICAL **: g_type_add_interface_static:
assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

Is it problem around GLib, GTK, GObject or Gstreamer ?

I have glibmm-2.47.6 and libgtkmm-3.0-1v5.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Gstreamermm-and-abilities-to-use-different-plugins-tp4680615p4680681.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
Pozdrawiam
Marcin Kolny

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel