How to decide the audio language when using decodebin

longkas longkas at gmail.com
Sun May 24 18:39:18 UTC 2020


Hello,
I'm coding using decodebin to play file:
        filesrc ! decodebin ! audiomixer ! audioconvert ! autoaudiosink

since the file has multi  audio tracks, I want to decide which track to be
used on "pad-added" signal:

       onAudioPadAdded(GstElement* element, GstPad* pad, gpointer data){}

then I try to get stream info on the pad but there's no tag info on the
stream and the stream type is UNKNOWN:
        GstStream* stream = gst_pad_get_stream(pad);
	GstStreamType type = gst_stream_get_stream_type(stream);
	g_print("logAudioCaps start stream=%s type=%d\n", mid, type);
	GstTagList* tl = gst_stream_get_tags(stream);
	gchar* tls = gst_tag_list_to_string(tl);
	g_print("logAudioCaps tls %s\n", tls);

How can I get tags then, please help, thank you

BR




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list