New support for AUDIO

Allows looking for audio streams in media files (settings) and enabling  / disabling audio for each MediaPlayer individually. Control of volume per media, saving in session file.
This commit is contained in:
Bruno Herbelin
2023-10-28 12:58:17 +02:00
parent f19b18d806
commit 5a1a88bf33
9 changed files with 142 additions and 6 deletions

View File

@@ -894,6 +894,14 @@ void SessionLoader::visit(MediaPlayer &n)
n.setTimeline(tl);
}
// audio
int audiovolume = 100;
mediaplayerNode->QueryIntAttribute("audio_volume", &audiovolume);
n.setAudioVolume(audiovolume);
bool audioenabled = false;
mediaplayerNode->QueryBoolAttribute("audio", &audioenabled);
n.setAudioEnabled(audioenabled);
// change play rate: will be activated in SessionLoader::visit (MediaSource& s)
double speed = 1.0;
mediaplayerNode->QueryDoubleAttribute("speed", &speed);