Gstreamer - decodebin - program number

Tim Müller tim at centricular.com
Wed Jul 26 10:33:39 UTC 2017


On Wed, 2017-07-26 at 11:30 +0200, Duchassin Frederic wrote:

Hi Fred,

I don't think this will work. You need to set this property on the
actual GstElement, not a GstElementFactory.

If you were using playbin you could have used the (newish) "element-
setup" signal for this.

With decodebin, you can use the "element-added" signal. Only problem is
that this will be emitted for all elements that are added to decodebin,
so you need to make sure you only set this property on the ts demuxer.

One way of doing this check is just checking for the property with
something like:

  if (g_object_class_find_property (G_OBJECT_GET_CLASS (added_element),
"program-number")) {
    g_object_set (added_element, "program-number", ..., NULL);
  }

Or you get the factory from the element and then check the factory
name.

Cheers
 -Tim


-- 
Tim Müller, Centricular Ltd - http://www.centricular.com

Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/


More information about the gstreamer-devel mailing list