Full Theora video support in VideoStreamPlayer

- Implement `set_stream_position` and `get_stream_length`.
- Don't show blank frame when stopping the video (smooth loops).
- Fix audio for videos with up to 8 channels.
- Improve internal audio handling.
This commit is contained in:
Bernat Arlandis
2025-01-28 17:39:46 +01:00
parent 4a44078451
commit b9bebf7081
6 changed files with 541 additions and 218 deletions

View File

@ -339,7 +339,6 @@ void VideoStreamPlayer::play() {
if (playback.is_null()) {
return;
}
playback->stop();
playback->play();
set_process_internal(true);
last_audio_time = 0;
@ -468,7 +467,9 @@ double VideoStreamPlayer::get_stream_position() const {
void VideoStreamPlayer::set_stream_position(double p_position) {
if (playback.is_valid()) {
resampler.flush();
playback->seek(p_position);
last_audio_time = 0;
}
}