summaryrefslogtreecommitdiff
path: root/modules/theora
diff options
context:
space:
mode:
Diffstat (limited to 'modules/theora')
-rw-r--r--modules/theora/doc_classes/VideoStreamTheora.xml6
-rw-r--r--modules/theora/video_stream_theora.cpp7
2 files changed, 9 insertions, 4 deletions
diff --git a/modules/theora/doc_classes/VideoStreamTheora.xml b/modules/theora/doc_classes/VideoStreamTheora.xml
index 696101e252..92244a4d28 100644
--- a/modules/theora/doc_classes/VideoStreamTheora.xml
+++ b/modules/theora/doc_classes/VideoStreamTheora.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStreamTheora" inherits="VideoStream" category="Core" version="3.2">
+<class name="VideoStreamTheora" inherits="VideoStream" version="4.0">
<brief_description>
+ [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.
</description>
<tutorials>
</tutorials>
@@ -11,6 +13,7 @@
<return type="String">
</return>
<description>
+ Returns the Ogg Theora video file handled by this [VideoStreamTheora].
</description>
</method>
<method name="set_file">
@@ -19,6 +22,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.
</description>
</method>
</methods>
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index 9ba77d3c77..00c7e87568 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -147,7 +147,6 @@ void VideoStreamPlaybackTheora::clear() {
thread = NULL;
ring_buffer.clear();
#endif
- //file_name = "";
theora_p = 0;
vorbis_p = 0;
@@ -364,8 +363,10 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) {
};
float VideoStreamPlaybackTheora::get_time() const {
-
- return time - AudioServer::get_singleton()->get_output_latency() - delay_compensation; //-((get_total())/(float)vi.rate);
+ // FIXME: AudioServer output latency was fixed in af9bb0e, previously it used to
+ // systematically return 0. Now that it gives a proper latency, it broke this
+ // code where the delay compensation likely never really worked.
+ return time - /* AudioServer::get_singleton()->get_output_latency() - */ delay_compensation;
};
Ref<Texture> VideoStreamPlaybackTheora::get_texture() const {