GStreamer, C++, and MPEGTS

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

GStreamer, C++, and MPEGTS

Russel Winder
Google and grep between them seem to have failed to show a public C++ binding
for the GStreamer MPEGTS plugin. Is this because no-one bothered, or because
it was deemed to hard or the wrong thing to do?

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer, C++, and MPEGTS

Sebastian Dröge-3
On Tue, 2017-09-12 at 12:42 +0100, Russel Winder wrote:
> Google and grep between them seem to have failed to show a public C++
> binding for the GStreamer MPEGTS plugin. Is this because no-one
> bothered, or because it was deemed to hard or the wrong thing to do?

Plugins generally don't have bindings, except for some bindings that
provide convenience API for various core plugins.

Do you mean the MPEG-TS library from gst-plugins-bad? I don't think
there are bindings in gstreamermm for that, but they could be added if
someone wants. Most of the bindings are autogenerated so that shouldn't
be too much work.
Same story as for all the other bindings except for the ones generated
at runtime (Python, JavaScript, ...).

--
Sebastian Dröge, Centricular Ltd · https://www.centricular.com

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

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer, C++, and MPEGTS

Russel Winder
On Tue, 2017-09-12 at 15:18 +0300, Sebastian Dröge wrote:
[…]
>
> Plugins generally don't have bindings, except for some bindings that
> provide convenience API for various core plugins.

I had sort of assumed that. Plugins are loaded dynamically and so a compile-
time language binding can only have the "meta-API" – which is why some
gstreamermm stuff is deprecated I suspect.

> Do you mean the MPEG-TS library from gst-plugins-bad? I don't think
> there are bindings in gstreamermm for that, but they could be added if
> someone wants. Most of the bindings are autogenerated so that shouldn't
> be too much work.
> Same story as for all the other bindings except for the ones generated
> at runtime (Python, JavaScript, ...).

Very much the MPEG-TS stuff.

In C++ with gstreamermm, it seems impossible to use MPEG-TS at all currently
because a Glib::RegPtr<Gst::Message> in the bus callback method cannot deliver
the contained pointer to pass to the C functions.

The gstreamermm package on Debian Sid appears to have various of the enums
from the plugin sources available, which makes it seem as though someone has
started trying to do something, but not really got far enough for usability.

I did try cloning and building the gstreamermm Git repository from GitHub, but
it seems there is stuff you need to have in place to get past Stage 0, and it
is Autotools not Meson, and there are very few instructions.

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer, C++, and MPEGTS

Sebastian Dröge-3
On Tue, 2017-09-12 at 14:15 +0100, Russel Winder wrote:
>
> > Do you mean the MPEG-TS library from gst-plugins-bad? I don't think
> > there are bindings in gstreamermm for that, but they could be added if
> > someone wants. Most of the bindings are autogenerated so that shouldn't
> > be too much work.
> > Same story as for all the other bindings except for the ones generated
> > at runtime (Python, JavaScript, ...).
>
> Very much the MPEG-TS stuff.

What MPEG-TS "stuff"? The library? The tsdemux element?

> In C++ with gstreamermm, it seems impossible to use MPEG-TS at all currently
> because a Glib::RegPtr<Gst::Message> in the bus callback method cannot deliver
> the contained pointer to pass to the C functions.

You can get the pointer to the GstMessage out of that smart pointer
again and then use the C API to interface with the MPEG-TS library for
example. Or you create bindings for that as part of gstreamermm.

For other kinds of messages that don't use custom data structures, you
can use the GstStructure API (which is also bound in gstreamermm).

> The gstreamermm package on Debian Sid appears to have various of the enums
> from the plugin sources available, which makes it seem as though someone has
> started trying to do something, but not really got far enough for usability.
>
> I did try cloning and building the gstreamermm Git repository from GitHub, but
> it seems there is stuff you need to have in place to get past Stage 0, and it
> is Autotools not Meson, and there are very few instructions.

It should be the standard:

  ./autogen.sh
  (./configure)
  make
  make install

While making sure that you have all dependencies installed.

--
Sebastian Dröge, Centricular Ltd · https://www.centricular.com

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

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer, C++, and MPEGTS

Russel Winder
On Tue, 2017-09-12 at 17:12 +0300, Sebastian Dröge wrote:
>
[…]
> What MPEG-TS "stuff"? The library? The tsdemux element?

Apologies, I am being vague. I am after MPEG-TS packet processing in the bus
event handler so as to get the EIT packages and create the various tables so
as to construct the EPG. So the MPEG-TS API to GstMessage instances.

I have started tinkering with using std::unique_ptr with explicit deleter to
get lightweight RAII using the C API in C++.

[…]
> You can get the pointer to the GstMessage out of that smart pointer
> again and then use the C API to interface with the MPEG-TS library for
> example. Or you create bindings for that as part of gstreamermm.
>
> For other kinds of messages that don't use custom data structures, you
> can use the GstStructure API (which is also bound in gstreamermm).

I got so wrapped up in the Glib::RefPtr itself and forgot the obvious, every
instance has a gobj method so it is easy to get the GstMessage* from the
Glib::RefPtr<Gst::Message>const&. I was being silly.

[…]
>
> It should be the standard:
>
>   ./autogen.sh
>   (./configure)
>   make
>   make install
>
> While making sure that you have all dependencies installed.

But that is why the instructions are needed:

|> ./autogen.sh --prefix=$HOME/Built
./autogen.sh: 5: ./autogen.sh: mm-common-prepare: not found

:-)

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GStreamer, C++, and MPEGTS

Sebastian Dröge-3
On Tue, 2017-09-12 at 16:06 +0100, Russel Winder wrote:
>
> But that is why the instructions are needed:
>
> > > ./autogen.sh --prefix=$HOME/Built
>
> ./autogen.sh: 5: ./autogen.sh: mm-common-prepare: not found

"apt-file search mm-common-prepare" if you're on a Debian based
distribution :) This one is in the mm-common package here.

--
Sebastian Dröge, Centricular Ltd · https://www.centricular.com

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

signature.asc (981 bytes) Download Attachment