diff options
author | SeleckyErik <35656626+SeleckyErik@users.noreply.github.com> | 2019-10-24 01:35:47 +0100 |
---|---|---|
committer | SeleckyErik <35656626+SeleckyErik@users.noreply.github.com> | 2019-10-24 01:35:47 +0100 |
commit | 61bda112bd28b970b069f70c8dbcefc11da9caed (patch) | |
tree | a2ebd6d2bc6e3a0c3a828ac76311ad414d750cb2 /modules/theora | |
parent | 35944aebdeb4c3b5869aaeedaaded02397b7ce92 (diff) |
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
Diffstat (limited to 'modules/theora')
-rw-r--r-- | modules/theora/video_stream_theora.cpp | 2 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 28a8b77283..ed1a7f682b 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -368,7 +368,7 @@ float VideoStreamPlaybackTheora::get_time() const { return time - AudioServer::get_singleton()->get_output_latency() - delay_compensation; //-((get_total())/(float)vi.rate); }; -Ref<Texture> VideoStreamPlaybackTheora::get_texture() { +Ref<Texture> VideoStreamPlaybackTheora::get_texture() const { return texture; } diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h index 0c37d33358..b241722cd1 100644 --- a/modules/theora/video_stream_theora.h +++ b/modules/theora/video_stream_theora.h @@ -147,7 +147,7 @@ public: void set_file(const String &p_file); - virtual Ref<Texture> get_texture(); + virtual Ref<Texture> get_texture() const; virtual void update(float p_delta); virtual void set_mix_callback(AudioMixCallback p_callback, void *p_userdata); |