feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -81,10 +81,10 @@ void VideoStreamPlayer::_mix_audios(void *p_self) {
|
|||
|
||||
// Called from audio thread
|
||||
void VideoStreamPlayer::_mix_audio() {
|
||||
if (!stream.is_valid()) {
|
||||
if (stream.is_null()) {
|
||||
return;
|
||||
}
|
||||
if (!playback.is_valid() || !playback->is_playing() || playback->is_paused()) {
|
||||
if (playback.is_null() || !playback->is_playing() || playback->is_paused()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -158,6 +158,7 @@ void VideoStreamPlayer::_notification(int p_notification) {
|
|||
playback->update(delta); // playback->is_playing() returns false in the last video frame
|
||||
|
||||
if (!playback->is_playing()) {
|
||||
resampler.flush();
|
||||
if (loop) {
|
||||
play();
|
||||
return;
|
||||
|
|
@ -178,6 +179,7 @@ void VideoStreamPlayer::_notification(int p_notification) {
|
|||
draw_texture_rect(texture, Rect2(Point2(), s), false);
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_SUSPENDED:
|
||||
case NOTIFICATION_PAUSED: {
|
||||
if (is_playing() && !is_paused()) {
|
||||
paused_from_tree = true;
|
||||
|
|
@ -189,6 +191,13 @@ void VideoStreamPlayer::_notification(int p_notification) {
|
|||
}
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_UNSUSPENDED: {
|
||||
if (get_tree()->is_paused()) {
|
||||
break;
|
||||
}
|
||||
[[fallthrough]];
|
||||
}
|
||||
|
||||
case NOTIFICATION_UNPAUSED: {
|
||||
if (paused_from_tree) {
|
||||
paused_from_tree = false;
|
||||
|
|
@ -203,7 +212,7 @@ void VideoStreamPlayer::_notification(int p_notification) {
|
|||
}
|
||||
|
||||
Size2 VideoStreamPlayer::get_minimum_size() const {
|
||||
if (!expand && !texture.is_null()) {
|
||||
if (!expand && texture.is_valid()) {
|
||||
return texture->get_size();
|
||||
} else {
|
||||
return Size2();
|
||||
|
|
@ -256,7 +265,7 @@ void VideoStreamPlayer::set_stream(const Ref<VideoStream> &p_stream) {
|
|||
stream->connect_changed(callable_mp(this, &VideoStreamPlayer::set_stream).bind(stream));
|
||||
}
|
||||
|
||||
if (!playback.is_null()) {
|
||||
if (playback.is_valid()) {
|
||||
playback->set_paused(paused);
|
||||
texture = playback->get_texture();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue