From 61bda112bd28b970b069f70c8dbcefc11da9caed Mon Sep 17 00:00:00 2001 From: SeleckyErik <35656626+SeleckyErik@users.noreply.github.com> Date: Thu, 24 Oct 2019 01:35:47 +0100 Subject: Refactor VideoPlayer and VideoStream VideoStream: - Fix const correctenss VideoPlayer: - Remove unused member variable last_frame - Move _mix_audios function definition to source file - Fix function parameter naming to match p_ convention - Fix const correctness - Add null checking --- modules/gdnative/videodecoder/video_stream_gdnative.cpp | 2 +- modules/gdnative/videodecoder/video_stream_gdnative.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gdnative/videodecoder') diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.cpp b/modules/gdnative/videodecoder/video_stream_gdnative.cpp index f3c34fd5e0..14b7f9a2ef 100644 --- a/modules/gdnative/videodecoder/video_stream_gdnative.cpp +++ b/modules/gdnative/videodecoder/video_stream_gdnative.cpp @@ -279,7 +279,7 @@ void VideoStreamPlaybackGDNative::set_paused(bool p_paused) { paused = p_paused; } -Ref VideoStreamPlaybackGDNative::get_texture() { +Ref VideoStreamPlaybackGDNative::get_texture() const { return texture; } diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.h b/modules/gdnative/videodecoder/video_stream_gdnative.h index 9aed1fd2a0..5ff7acb616 100644 --- a/modules/gdnative/videodecoder/video_stream_gdnative.h +++ b/modules/gdnative/videodecoder/video_stream_gdnative.h @@ -168,7 +168,7 @@ public: //virtual int mix(int16_t* p_buffer,int p_frames)=0; - virtual Ref get_texture(); + virtual Ref get_texture() const; virtual void update(float p_delta); virtual void set_mix_callback(AudioMixCallback p_callback, void *p_userdata); -- cgit v1.2.3