diff options
Diffstat (limited to 'modules/webm')
-rw-r--r-- | modules/webm/doc_classes/VideoStreamWebm.xml | 9 | ||||
-rw-r--r-- | modules/webm/libvpx/SCsub | 9 | ||||
-rw-r--r-- | modules/webm/register_types.cpp | 4 | ||||
-rw-r--r-- | modules/webm/video_stream_webm.cpp | 6 |
4 files changed, 10 insertions, 18 deletions
diff --git a/modules/webm/doc_classes/VideoStreamWebm.xml b/modules/webm/doc_classes/VideoStreamWebm.xml index f3e13ba31a..3b9acfd873 100644 --- a/modules/webm/doc_classes/VideoStreamWebm.xml +++ b/modules/webm/doc_classes/VideoStreamWebm.xml @@ -12,17 +12,14 @@ </tutorials> <methods> <method name="get_file"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the WebM video file handled by this [VideoStreamWebm]. </description> </method> <method name="set_file"> - <return type="void"> - </return> - <argument index="0" name="file" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="file" type="String" /> <description> Sets the WebM video file that this [VideoStreamWebm] resource handles. The [code]file[/code] name should have the [code].webm[/code] extension. </description> diff --git a/modules/webm/libvpx/SCsub b/modules/webm/libvpx/SCsub index 67d3f1bebd..4334cf732b 100644 --- a/modules/webm/libvpx/SCsub +++ b/modules/webm/libvpx/SCsub @@ -235,7 +235,7 @@ if env["platform"] == "uwp": else: import platform - is_x11_or_server_arm = (env["platform"] == "linuxbsd" or env["platform"] == "server") and ( + is_x11_or_server_arm = env["platform"] == "linuxbsd" and ( platform.machine().startswith("arm") or platform.machine().startswith("aarch") ) is_macos_x86 = env["platform"] == "osx" and ("arch" in env and (env["arch"] != "arm64")) @@ -314,12 +314,7 @@ if webm_cpu_x86: if webm_cpu_arm: if env["platform"] == "iphone": env_libvpx["ASFLAGS"] = "-arch armv7" - elif ( - env["platform"] == "android" - and env["android_arch"] == "armv7" - or env["platform"] == "linuxbsd" - or env["platform"] == "server" - ): + elif env["platform"] == "android" and env["android_arch"] == "armv7" or env["platform"] == "linuxbsd": env_libvpx["ASFLAGS"] = "-mfpu=neon" elif env["platform"] == "uwp": env_libvpx["AS"] = "armasm" diff --git a/modules/webm/register_types.cpp b/modules/webm/register_types.cpp index 82157a71c9..8f690a6892 100644 --- a/modules/webm/register_types.cpp +++ b/modules/webm/register_types.cpp @@ -35,10 +35,10 @@ static Ref<ResourceFormatLoaderWebm> resource_loader_webm; void register_webm_types() { - resource_loader_webm.instance(); + resource_loader_webm.instantiate(); ResourceLoader::add_resource_format_loader(resource_loader_webm, true); - ClassDB::register_class<VideoStreamWebm>(); + GDREGISTER_CLASS(VideoStreamWebm); } void unregister_webm_types() { diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp index 15bf9dbf2d..12e0f5bd25 100644 --- a/modules/webm/video_stream_webm.cpp +++ b/modules/webm/video_stream_webm.cpp @@ -31,7 +31,7 @@ #include "video_stream_webm.h" #include "core/config/project_settings.h" -#include "core/os/file_access.h" +#include "core/io/file_access.h" #include "core/os/os.h" #include "servers/audio_server.h" @@ -74,7 +74,7 @@ public: virtual int Length(long long *total, long long *available) { if (file) { - const uint64_t len = file->get_len(); + const uint64_t len = file->get_length(); if (total) { *total = len; } @@ -116,7 +116,7 @@ bool VideoStreamPlaybackWebm::open_file(const String &p_file) { frame_data.resize((webm->getWidth() * webm->getHeight()) << 2); Ref<Image> img; - img.instance(); + img.instantiate(); img->create(webm->getWidth(), webm->getHeight(), false, Image::FORMAT_RGBA8); texture->create_from_image(img); |