Skip to main content

Module track_switch

Module track_switch 

Source
Expand description

Audio-track switch strategy decision logic.

Pure logic, extracted from the command layer so it can be unit-tested in the player core — the sibling of super::seek. player_switch_audio_track turns the resulting AudioTrackSwitchStrategy into a concrete action.

The rule this module exists to state: an engine can only select a track the stream in front of it actually carries. A Jellyfin transcode is built around one AudioStreamIndex, so the alternate tracks are not in the stream at all — the switch has to re-open it. Only a direct play/stream hands the engine the source file with every track present.

Enums§

AudioTrackSwitchStrategy
How a request to change audio track has to be carried out.

Functions§

determine_audio_track_switch_strategy
Decide how to honour an audio-track change.
resume_position
Where to resume after re-opening the stream for a track change.