summaryrefslogtreecommitdiff
path: root/modules/theora
diff options
context:
space:
mode:
Diffstat (limited to 'modules/theora')
-rw-r--r--modules/theora/doc_classes/VideoStreamTheora.xml5
-rw-r--r--modules/theora/video_stream_theora.cpp2
-rw-r--r--modules/theora/video_stream_theora.h38
3 files changed, 23 insertions, 22 deletions
diff --git a/modules/theora/doc_classes/VideoStreamTheora.xml b/modules/theora/doc_classes/VideoStreamTheora.xml
index 92244a4d28..cb8852d5ef 100644
--- a/modules/theora/doc_classes/VideoStreamTheora.xml
+++ b/modules/theora/doc_classes/VideoStreamTheora.xml
@@ -4,7 +4,8 @@
[VideoStream] resource for Ogg Theora videos.
</brief_description>
<description>
- [VideoStream] resource handling the [url=https://www.theora.org/]Ogg Theora[/url] video format with [code].ogv[/code] extension.
+ [VideoStream] resource handling the [url=https://www.theora.org/]Ogg Theora[/url] video format with [code].ogv[/code] extension. The Theora codec is less efficient than [VideoStreamWebm]'s VP8 and VP9, but it requires less CPU resources to decode. The Theora codec is decoded on the CPU.
+ [b]Note:[/b] While Ogg Theora videos can also have an [code].ogg[/code] extension, you will have to rename the extension to [code].ogv[/code] to use those videos within Godot.
</description>
<tutorials>
</tutorials>
@@ -22,7 +23,7 @@
<argument index="0" name="file" type="String">
</argument>
<description>
- Sets the Ogg Theora video file that this [VideoStreamTheora] resource handles. The [code]file[/code] name should have the [code].o[/code] extension.
+ Sets the Ogg Theora video file that this [VideoStreamTheora] resource handles. The [code]file[/code] name should have the [code].ogv[/code] extension.
</description>
</method>
</methods>
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index 498391e44a..4f33f58ed1 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -30,8 +30,8 @@
#include "video_stream_theora.h"
+#include "core/config/project_settings.h"
#include "core/os/os.h"
-#include "core/project_settings.h"
#include "thirdparty/misc/yuv2rgb.h"
diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h
index f90c2465b4..867f464038 100644
--- a/modules/theora/video_stream_theora.h
+++ b/modules/theora/video_stream_theora.h
@@ -35,7 +35,7 @@
#include "core/os/file_access.h"
#include "core/os/semaphore.h"
#include "core/os/thread.h"
-#include "core/ring_buffer.h"
+#include "core/templates/ring_buffer.h"
#include "scene/resources/video_stream.h"
#include "servers/audio_server.h"
@@ -125,35 +125,35 @@ protected:
void clear();
public:
- virtual void play();
- virtual void stop();
- virtual bool is_playing() const;
+ virtual void play() override;
+ virtual void stop() override;
+ virtual bool is_playing() const override;
- virtual void set_paused(bool p_paused);
- virtual bool is_paused() const;
+ virtual void set_paused(bool p_paused) override;
+ virtual bool is_paused() const override;
- virtual void set_loop(bool p_enable);
- virtual bool has_loop() const;
+ virtual void set_loop(bool p_enable) override;
+ virtual bool has_loop() const override;
- virtual float get_length() const;
+ virtual float get_length() const override;
virtual String get_stream_name() const;
virtual int get_loop_count() const;
- virtual float get_playback_position() const;
- virtual void seek(float p_time);
+ virtual float get_playback_position() const override;
+ virtual void seek(float p_time) override;
void set_file(const String &p_file);
- virtual Ref<Texture2D> get_texture() const;
- virtual void update(float p_delta);
+ virtual Ref<Texture2D> get_texture() const override;
+ virtual void update(float p_delta) override;
- virtual void set_mix_callback(AudioMixCallback p_callback, void *p_userdata);
- virtual int get_channels() const;
- virtual int get_mix_rate() const;
+ virtual void set_mix_callback(AudioMixCallback p_callback, void *p_userdata) override;
+ virtual int get_channels() const override;
+ virtual int get_mix_rate() const override;
- virtual void set_audio_track(int p_idx);
+ virtual void set_audio_track(int p_idx) override;
VideoStreamPlaybackTheora();
~VideoStreamPlaybackTheora();
@@ -169,7 +169,7 @@ protected:
static void _bind_methods();
public:
- Ref<VideoStreamPlayback> instance_playback() {
+ Ref<VideoStreamPlayback> instance_playback() override {
Ref<VideoStreamPlaybackTheora> pb = memnew(VideoStreamPlaybackTheora);
pb->set_audio_track(audio_track);
pb->set_file(file);
@@ -178,7 +178,7 @@ public:
void set_file(const String &p_file) { file = p_file; }
String get_file() { return file; }
- void set_audio_track(int p_track) { audio_track = p_track; }
+ void set_audio_track(int p_track) override { audio_track = p_track; }
VideoStreamTheora() { audio_track = 0; }
};