summaryrefslogtreecommitdiffstats
path: root/modules/webrtc
Commit message (Collapse)AuthorAgeFilesLines
* Fix some issues found by cppcheck.bruvzg2022-04-061-9/+9
|
* Discern between virtual and abstract class bindingsreduz2022-03-101-1/+1
| | | | | | | | | | | | | | * Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
* WebRTC: Fix potential nullptr dereference in error messageRémi Verschelde2022-03-041-4/+2
| | | | | | | | | | | | | | | | | | This was evidently a typo. Didn't get a crash but GCC 12 raised a `-Warray-bounds` warning: ``` In file included from ./core/io/stream_peer.h:34, from ./core/io/packet_peer.h:34, from ./core/multiplayer/multiplayer_peer.h:34, from modules/webrtc/webrtc_multiplayer_peer.h:34, from modules/webrtc/webrtc_multiplayer_peer.cpp:31: In member function 'T* Ref<T>::operator->() [with T = WebRTCMultiplayerPeer::ConnectedPeer]', inlined from 'virtual Error WebRTCMultiplayerPeer::put_packet(const uint8_t*, int)' at modules/webrtc/webrtc_multiplayer_peer.cpp:376:4: ./core/object/ref_counted.h:101:24: error: array subscript 0 is outside array bounds of 'Ref<WebRTCMultiplayerPeer::ConnectedPeer> [0]' [-Werror=array-bounds] 101 | return reference; | ^~~~~~~~~ ```
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-161-1/+3
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* Add an XML schema for documentationHugo Locurcio2022-02-155-5/+5
| | | | | | | | This makes it easier to spot syntax errors when editing the class reference. The schema is referenced locally so validation can still work offline. Each class XML's schema conformance is also checked on GitHub Actions.
* Improve some signal bindings to use specific `Object` subtypesRémi Verschelde2022-01-282-2/+2
|
* Rename or refactor macros to avoid leading underscoresOmar Polo2022-01-201-3/+5
| | | | | These are not used consistently and some can conflict with system-specific defines. While here, also delete some unused macros.
* Dictionary: Serialize empty dict as `{}` instead of `{\n}`Rémi Verschelde2022-01-181-4/+2
| | | | | Also make sure to always convert multiline dictionaries to a single line for its EditorHelp representation, as multiline values break formatting.
* Update copyright statements to 2022Rémi Verschelde2022-01-0317-34/+34
| | | | Happy new year to the wonderful Godot community!
* Fix usage of "Return" in the docskobewi2022-01-021-1/+1
|
* [Net] Fix WebRTC returning packets from peers too early.Fabio Alessandrelli2021-12-151-0/+11
| | | | | | | | Due to the async nature of WebRTC implementations, the multiplayer peer could end up having queued packets from a given connection before it is able to emit the "peer_added" signal. This commit ensures that packets from peers which are not notified yet are skipped by `get_packet` and `get_available_packet_count`.
* doc: Fix style inconsistencies for `[b]Note:[/b]` paragraphsRémi Verschelde2021-10-051-1/+2
| | | | And fix up formatting not supported by makerst.
* [Net] Rename RPC constants and annotation arguments.Fabio Alessandrelli2021-10-011-2/+2
| | | | | | | | | any -> any_peer sync -> call_local ordered -> unreliable_ordered Multiplayer.RPC_MODE_ANY -> RPC_MODE_ANY_PEER Multiplayer.TRANSFER_MODE_ORDERED -> TRANSFER_MODE_UNRELIABLE_ORDERED
* Use range iterators for `Map`Lightning_A2021-09-301-18/+18
|
* Fix const pointers types in docs and extension API.Fabio Alessandrelli2021-09-291-2/+2
| | | | | | The GDVIRTUAL_NATIVE_PTR did not declare the correct GDNativeConstPtr template, resulting in "void*" being used as it's type info in both the documentation and the extension API dump.
* Merge pull request #52481 from Faless/net/4.x_native_peersFabio Alessandrelli2021-09-2817-381/+617
|\ | | | | [Net] Extension system for network peers, webrtc.
| * [Net/Docs] Update extensions documentation.Fabio Alessandrelli2021-09-243-4/+177
| |
| * [Net] Expose WebRTC classes to extensions.Fabio Alessandrelli2021-09-2412-340/+437
| |
| * [Net] MultiplayerPeer cleanup, defaults.Fabio Alessandrelli2021-09-242-37/+3
| |
* | Document Android permission requirements for network access where neededHugo Locurcio2021-09-251-0/+1
|/
* Don't generate empty doc sections and reduce code duplicationAaron Franke2021-09-201-2/+0
|
* Multiplayer networking renames/simplificationMax Hilbrunner2021-09-081-1/+1
| | | | Removes _networking_ prefix from some methods and members, now that multiplayer has been largely moved out of Node and SceneTree and is seperated into its own set of classes.
* [Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli2021-09-073-16/+16
| | | | | | | | | | | Move multiplayer classes to "core/multiplayer" subdir. Move the RPCConfig and enums (TransferMode, RPCMode) to a separate file (multiplayer.h), and bind them to the global namespace. Move the RPC handling code to its own class (RPCManager). Renames "get_rpc_sender_id" to "get_remote_sender_id".
* [Net] Implement RPC channels in MultiplayerAPI.Fabio Alessandrelli2021-07-303-41/+82
|
* doc: Use self-closing tags for `return` and `argument`Rémi Verschelde2021-07-303-104/+52
| | | | | | | | For the time being we don't support writing a description for those, preferring having all details in the method's description. Using self-closing tags saves half the lines, and prevents contributors from thinking that they should write the argument or return documentation there.
* Use Ref<T> references as iterators where relevantRémi Verschelde2021-07-261-5/+5
| | | | And const when possible.
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-17/+17
|
* Add get_buffered_amount() to WebRTCDataChannelDavid Snopek2021-07-208-0/+27
|
* Optimize StringName usagereduz2021-07-182-9/+9
| | | | | | | | | | | * Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
* Fix "IDHandler.get_prop is not a function" error when calling some methods ↵David Snopek2021-07-171-4/+4
| | | | on WebRTCDataChannel
* [HTML5] Fix build (with module_webxr_enabled=no).Fabio Alessandrelli2021-07-151-3/+2
| | | | | The XR API changed a bit, and it's not just a rename, though probably an easy update for someone who is qualified :).
* Misc cleanup of header includesRémi Verschelde2021-07-151-0/+1
| | | | | Was looking for misuse of module headers without checking that the module is actually enabled and got carried away...
* Implement the ability to disable classesreduz2021-07-131-4/+4
| | | | | | | * This PR adds the ability to disable classes when building. * For now it's only possible to do this via command like: `scons disable_classes=RayCast2D,Area3D` * Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
* [Net] Rename WebRTCMultiplayer to WebRTCMultiplayerPeer.Fabio Alessandrelli2021-07-125-44/+44
|
* [Net] Rename NetworkedMultiplayerPeer to MultiplayerPeer.Fabio Alessandrelli2021-07-123-13/+13
|
* Rename Reference to RefCountedPedro J. Estébanez2021-06-113-4/+4
|
* Fix typos with codespellRémi Verschelde2021-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 2.0.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn GIRD leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Initialize class/struct variables with default values in modules/Rafał Mikrut2021-02-082-11/+4
|
* Update copyright statements to 2021Rémi Verschelde2021-01-0117-34/+34
| | | | | | | | | | | | | | 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 🎆
* SCons: Add explicit dependencies on thirdparty code in cloned envRémi Verschelde2020-12-181-2/+0
| | | | | | | | | | | | | | Since we clone the environments to build thirdparty code, we don't get an explicit dependency on the build objects produced by that environment. So when we update thirdparty code, Godot code using it is not necessarily rebuilt (I think it is for changed headers, but not for changed .c/.cpp files), which can lead to an invalid compilation output (linking old Godot .o files with a newer, potentially ABI breaking version of thirdparty code). This was only seen as really problematic with bullet updates (leading to crashes when rebuilding Godot after a bullet update without cleaning .o files), but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.
* [HTML5] Add function signatures to JS libraries.Fabio Alessandrelli2020-12-041-1/+21
|
* Fix useless assignement in webrtc/library_godot_webrtc.jsMarcel Admiraal2020-11-251-1/+1
|
* [HTML5] Run eslint --fix.Fabio Alessandrelli2020-11-231-92/+92
| | | | Should I write a poem about this whole new world? ;)
* [HTML5] Libraries refactor for linting.Fabio Alessandrelli2020-11-211-46/+54
| | | | | | | | | | | | Initial work to make liniting easier. This includes: - Rename http_request.js to library_godot_http_request.js. - Rename externs.js to engine.externs.js. - New library_godot_runtime.js (GodotRuntime) wraps around emscripten functions. - Refactor of XMLHttpRequest handler in engine/preloader.js. - Few fixes to bugs spotted by early stage linting.
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-2/+0
|
* [HTML5] Port JavaScript inline code to libraries.Fabio Alessandrelli2020-11-106-412/+521
| | | | | | | | | The API is implemented in javascript, and generates C functions that can be called from godot. This allows much cleaner code replacing all `EM_ASM` calls in our C++ code with plain C function calls. This also gets rid of few hacks and comes with few optimizations (e.g. custom cursor shapes should be much faster now).
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-072-2/+2
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* doc: Sync classref with current sourceRémi Verschelde2020-10-091-2/+0
|
* Merge pull request #41875 from nekomatata/webrtc-doc-turn-serverRémi Verschelde2020-09-081-1/+1
|\ | | | | Fix TURN server example in WebRTC documentation
| * Fix TURN server example in WebRTC documentationPouleyKetchoupp2020-09-081-1/+1
| | | | | | | | | | WebRTC GDNative plugin uses `credential` and not `credentials`. https://github.com/godotengine/webrtc-native/blob/74f2c78db5cdffa5b2b6ba9cd041061d7694400c/src/WebRTCLibPeerConnection.cpp#L35-L37