-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DefaultTrackSelector should avoid enabling multiple renderers implementing MediaClock by default #2618
Comments
This is a side effect of having both audio renderers enabled at once (i.e. the problem described below). You can only have one renderer that implements MediaClock enabled at a time, since these renderers drive timing for the playback (and two things trying to do this simultaneously doesn't make sense :)). The fix for this is just to fix the issue below.
This is a track selection problem. It sounds like your DASH manifest contains a mixture of tracks playable with the extension and tracks playable with ExoPlayer's built in audio renderer. What do you actually want to happen? |
Ideally... I would like the first audio renderers track to playback as default. Then when I change audio stream (via setSelectionOverride), could be between renderers, only one audio set is ever playing. Is my problem that I need to be disabling one of the renderers up front...and enabling/disabling between them as needed when switching audio stream? Here is the output from onTracksChanged currently:
|
We should probably make To work around the problem in the meantime, you could extend
|
Roger that! Your suggestion to override selectTracks works a treat. I had to couple in disabling of 'none desired' renderers when changing audio stream (trackSelector.setRendererDisabled( iRenderer, true );) Here is the class for anyone looking to do the same: public class MultiAudio_DefaultTrackSelector extends DefaultTrackSelector
} |
Issue: #2618 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=156986606
Issue: #2618 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=156986606
Version: ExoPlayer release v2
Device: Samsung s7
Android: 6
Hi,
In the project I am working on, we are having to use a custom audio renderer (via an extension) from a 3rd party dev house. I need to use a mixture of their audio format, and a standard 2 channel mp4a aac stream.
All wrapped up into DASH, I get a video renderer and the two audio renderers back in the 'tracks changed' listing. I am having two issues I wonder if someone can comment on what we might be doing wrong...or if there is a bug/feature hole here.
Firstly, I am getting the 'Multiple renderer media clocks enabled' exception fire from ExoPlayerImplInternal.jave : function 'enableRenderers'. This is because we inherit a class from SimpleDecoderAudioRenderer which, naturally, returns itself in the function getMediaClock. What is the best practice here?
Secondly, (diverting around the first issue) when I playback the DASH stream...I am getting the two audio renderers both play their first streams...at the same time...together.
Unfortunately, and totally unhelpfully I know, I don't have a test stream I can share currently - due to license issues with the custom audio format.
Thanks,
Ste
The text was updated successfully, but these errors were encountered: