mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
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:
parent
4a44078451
commit
b9bebf7081
6 changed files with 541 additions and 218 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue