Commit graph

14 commits

Author SHA1 Message Date
Rémi Verschelde
d6176db271 Unexpose subclasses of ResourceFormatLoader and -Saver
ResourceFormatLoader and ResourceFormatSaver are meant to be overridden
to add support for different formats in ResourceLoader and ResourceSaver.
Those should be exposed as they can be overridden in plugins.

On the other hand, all predefined subclasses of those two base classes
are only meant to register support for new file and resource types, but
should not and cannot be used directly from script, so they should not
be exposed.

Also unexposed ResourceImporterOGGVorbis (and thus its base class
ResourceImporter) which are editor-only.
2019-06-18 17:56:23 +02:00
Anish
f0757f31a4 Fixes VideostreamGDNative crash on audio_channel=0.
Added an if case to check if the mix_callback exists before running any
of the audio code.

Fixes: #28644
2019-05-04 00:34:58 +05:30
Rémi Verschelde
d52b70fb5e SCons: Always use env.Prepend for CPPPATH
Include paths are processed from left to right, so we use Prepend to
ensure that paths to bundled thirdparty files will have precedence over
system paths (e.g. `/usr/include` should have lowest priority).
2019-04-30 13:12:06 +02:00
qarmin
856a8226a5 Small fixes, mostly dupicated code 2019-04-08 11:03:37 +02:00
Anish
bd22b1cbe6 Fixes segfault on opening incompatible files.
If a file cannot be opened by the plugin connected, the engine
would crash. This has been fixed by quitting the open_file() method
early.
2019-03-11 16:41:30 +05:30
Anish
978c2a604a Fixed crash on loading GDNative videos.
Fixed issue with loading a resource supported by the gdnative videodecoders
that does not exist.
2019-03-06 22:56:36 +01:00
marxin
e5f665c718 Fix -Wsign-compare warnings.
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
2019-02-27 07:45:57 +01:00
Rémi Verschelde
322fad70bd Fix copyright year in VideoStreamGDNative 2019-02-12 23:05:30 +01:00
Anish
8c1677fc3f Fixed infinite loop at end of video.
A missing condition caused infinite looping, despite
the video playing flag being set to false.
Small change to fix.

Fixes: #20552
2019-01-12 00:51:59 +05:30
Rémi Verschelde
e5f1d19352 Consistency in resource format saver/loader de-registration
Some used 'is_valid()' checks, others not. Validity is already checked in 'unref()',
and 'remove_resource_format_*()' has an ERR_FAIL condition on 'is_null()' already
(which shouldn't happen since we're only unregistering things that we previously
registered.

Also add missing GDCLASS statement in ResourceFormatLoaderVideoStreamGDNative,
missed in #20552 which was last amended before #19501 was merged.
2019-01-10 12:45:57 +01:00
Marcin Zawiejski
7860b74b0f
Remove vsgdnative loader on exit 2019-01-10 07:19:16 +01:00
Rémi Verschelde
72feccf205 Adapt GDNative VideoStream to use ResourceFormatLoader
Same logic as used for Webm and Theora support in #19937 and #21084,
fixing issues when exporting projects.
2018-12-13 15:33:28 +01:00
Rémi Verschelde
012dac9aad Fix includes and initialization for GDNative Videodecoder
Fixes warnings and a crash when running the destructor with an
uninitialized pcm pointer.
2018-12-13 15:31:13 +01:00
Anish
7199b7b5dd Added interface for GDNative Videodecoder.
Interface and callback api added for Videodecoder support.
Should be able to construct any format videodecoder using
only the given interface.

GSoC 2018 project.
2018-12-13 15:19:09 +01:00