Gstreamer - decodebin - program number
Duchassin Frederic
duchassin at sefram.fr
Wed Jul 26 09:30:31 UTC 2017
Hello,
I found very poor documentation or examples with “autoplug-select” signal but I try to selectr the right stream with this code :
static GstAutoplugSelectResult cb_autoplug_select (GstElement *bin,
GstPad *pad,
GstCaps *caps,
GstElementFactory *factory,
gpointer user_data)
{
gchar * capsstr = gst_caps_to_string (caps);
gchar * factorynamestr = GST_OBJECT_NAME (factory);
g_print ("autoplug-select %s: %s", factorynamestr, capsstr);
if(strcmp(factorynamestr, "tsdemux") == 0) //tsdemux used
{
int val = 21;
g_object_set(G_OBJECT(factory), "program-number ", val, NULL);
}
/* Try factory. */
return GST_AUTOPLUG_SELECT_TRY;
}
But it doesn’t work !
Message receive is :
(QML_LibpcapGstreamerUart:802): GLib-GObject-WARNING **: g_object_set_valist: object class 'GstElementFactory' has no property named 'program-number '
Have you got an idea about the problem ?
Fred
De : gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] De la part de Nicolas Dufresne
Envoyé : vendredi 21 juillet 2017 20:14
À : Discussion of the development of and with GStreamer
Objet : Re: Gstreamer - decodebin - program number
Le vendredi 21 juillet 2017 à 13:25 +0000, Duchassin Frédéric a écrit :
Hello,
I try to use gstreamer to decode a TS file.
I use decodebin because it’s fantastic to automatically detect to decoder, parser…needed !
My TS file can contain H264 video or mpeg2, and audio could be dolby, aac, mpeg1…. So decodebin is perfect to construct the pipeline.
But my main problem is that I would like to change the program number to decode ?
Do you know a way to do this ?
(tsdemux can do that this with “program_number” but I can’t put tsdemux before decodebin. It doesn’t work)
decodebin has a signal called "autoplug-select". Also, the tsdemux property is named "program-number" with a -.
Salutations / Best Regards
-----------------------------------------------------------------
Fred
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170726/ef28e766/attachment.html>
More information about the gstreamer-devel
mailing list