[gst-devel] Switching audio-pipeline during playing doesn't work?
LazyT
LazyT at gmx.net
Thu Nov 8 18:36:25 CET 2007
Hi,
i need to switch my audio pipeline during playing to another demuxer
audio-src-pad and change the audio-decoder (mad<->a52), but this doesn't
work.
The pipeline looks like this:
[src]-[demuxer]-[audioqueue]-[audiodecoder]-[audioconverter]-[volume]-[audiosink]
Sourcecode:
void Callback(GstPad *pad, gboolean blocked, gpointer user_data)
{
if(blocked)
{
gst_pad_unlink(demuxer-src-old, audioqueue-sink);
gst_element_unlink(audioqueue, audiodecoder-old);
gst_element_unlink(audiodecoder-old, audioconverter);
gst_bin_remove(GST_BIN(pipeline), audiodecoder-old);
gst_bin_add(GST_BIN(pipeline), audiodecoder-new);
gst_element_link(audiodecoder-new, audioconverter);
gst_element_link(audioqueue, audiodecoder-new);
gst_pad_link(demuxer-src-new, audioqueue-sink);
gst_element_set_state(audiodecoder-new, GST_STATE_PLAYING);
gst_pad_set_blocked_async(pad, false, Callback, NULL);
}
}
Switching the audiotrack is done via
"gst_pad_set_blocked_async(demuxer-src-old, true, Callback, NULL);" when
the user requests it and the only result is silence...
Any hints what's going wrong here?
Thank you,
Thomas
More information about the gstreamer-devel
mailing list