Changing the audio parser and decoder dynamically

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Changing the audio parser and decoder dynamically

DeepakRohan
This post was updated on .
Hi,

I am trying to switch audio tracks in the dynamic pipeline.
In my probe callback, I unlink the elements and remove the parser and decoder elements. Then i set the active pad on my input-selector element with the target track to activated/switched to.

From the logs it seems that i am able to successfully switch between audio tracks, but immediately after switching audio stops coming. After some time say 36 seconds, the playback hangs.

I have also put a buffer probe on alsasink's sinkpad. I get the prints from the buffer probe callback for playback. But the print stops after i have switched the tracks.

Even the pad activate function which gets called after the changing the active-pad of the input-selector element, I have handled things correctly (seems from logs). Required links have happened with required elements being added and linked in the pipeline.

Can anyone let me know what to debug in such case.

Another thing what I have noticed is that the pad activate after setting the active-pad is coming twice.
Is this the expected behavior.