GES-Selecting Audio Stream

Chris Wine chriswine at gmail.com
Thu Dec 3 00:39:43 UTC 2020


Hi, I'm having a problem with selecting the correct audio stream from an
input file that I'm using with GES. The input file has 1 video stream and 4
identical (as far as the CAPS are concerned) audio streams. I am currently
using GStreamer/GES mingw x64 1.18.1 on the Windows platform.

As the documentation suggested, I wrote a signal handler for the
GESTimeline's "select-tracks-for-object" signal, and I've verified that it
is working as expected with returning a NULL for GESTrackElements that are
not the audio stream I want, while returning a GPtrArray with the
timeline's audio track when it is the audio stream I want.

The problem though is that only the 1st audio stream of the input file is
ever chosen for the output. I've been looking through the GES source code,
and it appears that when ges_source_create_topbin in GESSource is called
for the audio, it will always just look for the first pad created when the
"pad-added" signal is on uridecodebin is called; this made me wonder if
something in the creation of uridecodebin itself was supposed to be
responsible for selecting the correct audio stream. However, the only thing
I can find there is the "caps" property which does restrict the streams,
but since my 4 audio streams all have identical CAPS, this doesn't end up
being a restriction.

My question is first, am I missing something obvious that would make this
work as expected? If not, aside from code changes to
GESSource/UriSource/AudioUriSource, is there something tricky I can do like
finding the uridecodebin, intercepting the pad-added signal before it gets
to the GESSource, and only letting it through when getting to the pad that
I want to be connected?

Thank you, responses are much appreciated.
--Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201202/72cc3d92/attachment.htm>


More information about the gstreamer-devel mailing list