summaryrefslogtreecommitdiffstats
path: root/modules/webm/video_stream_webm.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove WebM support (and deps libvpx and opus)Rémi Verschelde2021-10-151-469/+0
| | | | | | | | | | | | | | | | | | | We've had many issues with WebM support and specifically the libvpx library over the years, mostly due to its poor integration in Godot's buildsystem, but without anyone really interested in improving this state. With the new GDExtensions in Godot 4.0, we intend to move video decoding to first-party extensions, and this would likely be done using something like libvlc to expose more codecs. Removing the `webm` module means we can remove libsimplewebm, libvpx and opus, which we were only used for that purpose. Both libvpx and opus were fairly complex pieces of the buildsystem, so this is a nice cleanup. This also removes the compile-time dependency on `yasm`. Fixes lots of compilation or non-working WebM issues which will be linked in the PR.
* Replace references to VisualServer in code comments with RenderingServerHugo Locurcio2021-10-071-1/+1
| | | | VisualServer no longer exists in the `master` branch.
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-1/+1
|
* Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-1/+1
| | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* Rename File::get_len() get_length()Marcel Admiraal2021-05-251-1/+1
|
* Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the types of a big number of variables. General rules: - Using `uint64_t` in general. We also considered `int64_t` but eventually settled on keeping it unsigned, which is also closer to what one would expect with `size_t`/`off_t`. - We only keep `int64_t` for `seek_end` (takes a negative offset from the end) and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means we only need to guard against passing negative values in `core_bind.cpp`. - Using `uint32_t` integers for concepts not needing such a huge range, like pages, blocks, etc. In addition: - Improve usage of integer types in some related places; namely, `DirAccess`, core binds. Note: - On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for big files on 32-bit Windows builds made with that toolchain. We might add a workaround. Fixes #44363. Fixes godotengine/godot-proposals#400. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Print a warning when trying to seek in VideoPlayerHugo Locurcio2021-04-141-1/+1
| | | | | Seeking isn't implemented in built-in video formats and can only be supported in GDNative-provided video formats.
* Reorganize Project Settingsreduz2021-02-181-1/+1
| | | | | | | -Advanced Settings toggle also hides advanced properties when disabled -Simplified Advanced Bar (errors were just plain redundant) -Reorganized rendering quality settings. -Reorganized miscelaneous settings for clean up.
* Improve resource load cachereduz2021-02-111-1/+1
| | | | | | -Added a new method in Resource: reset_state , used for reloading the same resource from disk -Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type) -Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-20/+40
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-56/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-22/+3
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Exposed RenderingDevice to script APIJuan Linietsky2020-04-201-1/+1
| | | | | | | | | | | | | Also added an easier way to load native GLSL shaders. Extras: Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload. Note: The precommit hooks are broken because they don't seem to support enums from one class being used in another. Feel free to fix this after merging this PR.
* Replace NULL with nullptrlupoDharkael2020-04-021-17/+17
|
* Removed interactive loader, added proper thread loading.Juan Linietsky2020-02-281-1/+1
|
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-5/+5
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Texture refactorJuan Linietsky2020-02-111-3/+6
| | | | | | | | -Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
* Workaround WebM playback bug after AudioServer latency fixesRémi Verschelde2020-02-071-5/+10
| | | | | | | | | | | | | | | | | | | | | af9bb0ea15dfd3dfe8950fcfcce364485dadd92a fixed AudioServer's `get_output_delay()` (which used to always return 0) while renaming it to `get_output_latency()`. It now returns the latency from the AudioDriver, which can be non-0. While this was a clear bugfix, it broke playback for WebM files without audio track. It seems like the playback code, even though it queried the output delay to calculate a time compensation, was designed to work even though the delay value was actually bogus. Now that it's correct, it's not working. As a workaround we comment out uses of the output latency, restoring the behavior of Godot 3.1. This code should still be reviewed by someone more versed in video playback and fixed to properly account for the non-0 driver latency. Fixes #35760.
* doc: Complete documentation for VideoStreamsRémi Verschelde2020-01-261-13/+14
| | | | Also quick clean up of the matching C++ files.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Memory leak and crash fixesRafał Mikrut2019-11-101-0/+2
|
* Refactor VideoPlayer and VideoStreamSeleckyErik2019-10-241-1/+1
| | | | | | | | | | | | VideoStream: - Fix const correctenss VideoPlayer: - Remove unused member variable last_frame - Move _mix_audios function definition to source file - Fix function parameter naming to match p_ convention - Fix const correctness - Add null checking
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in rest of 'modules/'Robin Hübner2019-08-121-2/+1
|
* Small fixes to unrechable code, possibly overflows, using NULL pointersqarmin2019-06-031-3/+4
|
* Fix sign-compare error from #26051Rémi Verschelde2019-04-301-2/+2
|
* Merge pull request #26051 from 20kdc/videofixRémi Verschelde2019-04-301-4/+23
|\ | | | | webm/theora/yuv2rgb/libsimplewebm: Fix colour issues I could find.
| * webm/theora/yuv2rgb: Fix YUV conversion issues and add BGRP WEBM handling. ↵20kdc2019-02-211-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | (Now clang-format friendly.) This should fix the various issues with colours in Ogg Theora and WEBM playback. (A reference project is attached to PR #26051, which this commit should be part of.) This version of the commit, rather than moving x->RGBA handling into libsimplewebm, uses a colourspace field added to libsimplewebm by a PR there. Thus, the commit that precedes this should be the synchronization & cleanup commit for that. Also, this version is now clang-format friendly. I hope.
* | Clean up latency related functionsJuan Linietsky2019-04-271-2/+2
|/
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Don't delete FileAccess when it is nullMarc Gilleron2018-10-051-1/+0
|
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-3/+3
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Fix loading and exporting of Theora and WebM video streamsRémi Verschelde2018-07-031-0/+43
| | | | | | | | | | | | | | | | | | | | | Theora and WebM video streams were mistakenly imported with a ResourceImporter, but those imported ogvstr and webmstr were simply links to the local resource. While that works fine in the editor, it no longer works when exporting a game as the "source" ogv and webm files are ommitted and only the ogvstr and webmstr references were exported. As discussed with @reduz, it doesn't make sense to import videos, as we only intend to play them back and not modify them/access their raw data. As such we use a ResourceFormatLoader instead of an importer, to load the file on the fly. ogv and webm files linked to this loader are now considered as resources, and thus exported. Note: The Theora and WebM loaders lack any kind of validity check beyond the existence of the target file, but it was already the case with the importer. Better checks and error reports could be added, but those loaders will eventually be obsoleted by GDNative plugins anyway. Fixes #14954.
* Bind many more properties to scriptsBojidar Marinov2018-01-121-1/+1
| | | | | | | Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Style: Apply new clang-format 5.0 style to all filesRémi Verschelde2017-12-071-17/+23
|
* Fix video playbackMatt Hughes2017-10-141-80/+73
| | | | | | | | This adds support to - VideoPlayer - VideoStreamWebm - VideoStreamTheora
* Rename get_position => get_playback_position and seek_pos => seek on audio ↵Marcelo Fernandez2017-09-231-2/+2
| | | | classes
* Rename pos to position in user facing methods and variablesletheed2017-09-201-2/+2
| | | | | | | | | | | Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
* Fix files headerPoommetee Ketson2017-09-011-1/+1
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Clang-formatting *.cpp and *.h (some files excluded)Poommetee Ketson2017-07-221-1/+1
|
* -Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky2017-07-191-2/+2
| | | | -Added system for feature overrides, it's pretty cool :)
* Move other lone thirdparty files to thirdparty/miscRémi Verschelde2017-04-281-1/+2
| | | | | Also move Box2D ConvexDecomposition contrib code to thirdparty/b2d_convexdecomp.
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-29/+26
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* -renamed globals.h to global_config.cpp (this seems to have caused a few ↵Juan Linietsky2017-02-211-1/+1
| | | | | | modified files) -.pck and .zip exporting redone, seems to be working..