diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdnative/doc_classes/VideoStreamGDNative.xml | 5 | ||||
-rw-r--r-- | modules/stb_vorbis/audio_stream_ogg_vorbis.h | 2 | ||||
-rw-r--r-- | modules/theora/doc_classes/VideoStreamTheora.xml | 4 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.cpp | 1 | ||||
-rw-r--r-- | modules/webm/doc_classes/VideoStreamWebm.xml | 4 | ||||
-rw-r--r-- | modules/webm/video_stream_webm.cpp | 27 |
6 files changed, 28 insertions, 15 deletions
diff --git a/modules/gdnative/doc_classes/VideoStreamGDNative.xml b/modules/gdnative/doc_classes/VideoStreamGDNative.xml index ed7678b7be..c4d9a58fbb 100644 --- a/modules/gdnative/doc_classes/VideoStreamGDNative.xml +++ b/modules/gdnative/doc_classes/VideoStreamGDNative.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VideoStreamGDNative" inherits="VideoStream" category="Core" version="3.2"> <brief_description> + [VideoStream] resource for for video formats implemented via GDNative. </brief_description> <description> + [VideoStream] resource for for video formats implemented via GDNative. + It can be used via [url=https://github.com/KidRigger/godot-videodecoder]godot-videodecoder[/url] which uses the [url=https://ffmpeg.org]FFmpeg[/url] library. </description> <tutorials> </tutorials> @@ -11,6 +14,7 @@ <return type="String"> </return> <description> + Returns the video file handled by this [VideoStreamGDNative]. </description> </method> <method name="set_file"> @@ -19,6 +23,7 @@ <argument index="0" name="file" type="String"> </argument> <description> + Sets the video file that this [VideoStreamGDNative] resource handles. The supported extensions depend on the GDNative plugins used to expose video formats. </description> </method> </methods> diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/stb_vorbis/audio_stream_ogg_vorbis.h index cfa5e97faa..e909759acb 100644 --- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h +++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.h @@ -73,7 +73,7 @@ public: class AudioStreamOGGVorbis : public AudioStream { GDCLASS(AudioStreamOGGVorbis, AudioStream); - OBJ_SAVE_TYPE(AudioStream) //children are all saved as AudioStream, so they can be exchanged + OBJ_SAVE_TYPE(AudioStream); // Saves derived classes with common type so they can be interchanged. RES_BASE_EXTENSION("oggstr"); friend class AudioStreamPlaybackOGGVorbis; diff --git a/modules/theora/doc_classes/VideoStreamTheora.xml b/modules/theora/doc_classes/VideoStreamTheora.xml index 696101e252..ab1fcdcfb4 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"> <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..cf1fc3f175 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; diff --git a/modules/webm/doc_classes/VideoStreamWebm.xml b/modules/webm/doc_classes/VideoStreamWebm.xml index ff11bbb37d..4807672338 100644 --- a/modules/webm/doc_classes/VideoStreamWebm.xml +++ b/modules/webm/doc_classes/VideoStreamWebm.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VideoStreamWebm" inherits="VideoStream" category="Core" version="3.2"> <brief_description> + [VideoStream] resource for WebM videos. </brief_description> <description> + [VideoStream] resource handling the [url=https://www.webmproject.org/]WebM[/url] video format with [code].webm[/code] extension. </description> <tutorials> </tutorials> @@ -11,6 +13,7 @@ <return type="String"> </return> <description> + Returns the WebM video file handled by this [VideoStreamWebm]. </description> </method> <method name="set_file"> @@ -19,6 +22,7 @@ <argument index="0" name="file" type="String"> </argument> <description> + Sets the WebM video file that this [VideoStreamWebm] resource handles. The [code]file[/code] name should have the [code].webm[/code] extension. </description> </method> </methods> diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp index 6e2527595b..41f9e67672 100644 --- a/modules/webm/video_stream_webm.cpp +++ b/modules/webm/video_stream_webm.cpp @@ -30,21 +30,22 @@ #include "video_stream_webm.h" -#include "OpusVorbisDecoder.hpp" -#include "VPXDecoder.hpp" -#include <vpx/vpx_image.h> - -#include "mkvparser/mkvparser.h" - #include "core/os/file_access.h" #include "core/os/os.h" #include "core/project_settings.h" +#include "servers/audio_server.h" #include "thirdparty/misc/yuv2rgb.h" -#include "servers/audio_server.h" +// libsimplewebm +#include <OpusVorbisDecoder.hpp> +#include <VPXDecoder.hpp> + +// libvpx +#include <vpx/vpx_image.h> -#include <string.h> +// libwebm +#include <mkvparser/mkvparser.h> class MkvReader : public mkvparser::IMkvReader { @@ -335,22 +336,22 @@ void VideoStreamPlaybackWebm::update(float p_delta) { } else if (image.chromaShiftW == 1 && image.chromaShiftH == 1) { yuv420_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2); - // libyuv::I420ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h); + //libyuv::I420ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h); converted = true; } else if (image.chromaShiftW == 1 && image.chromaShiftH == 0) { yuv422_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2); - // libyuv::I422ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h); + //libyuv::I422ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h); converted = true; } else if (image.chromaShiftW == 0 && image.chromaShiftH == 0) { yuv444_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2); - // libyuv::I444ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h); + //libyuv::I444ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h); converted = true; } else if (image.chromaShiftW == 2 && image.chromaShiftH == 0) { - // libyuv::I411ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h); - // converted = true; + //libyuv::I411ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2] image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h); + //converted = true; } if (converted) { |