Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amazon-kinesis-video-streams-webrtc-sdk-c as c++ core module #12

Closed
fire opened this issue Jan 4, 2020 · 12 comments
Closed

amazon-kinesis-video-streams-webrtc-sdk-c as c++ core module #12

fire opened this issue Jan 4, 2020 · 12 comments

Comments

@fire
Copy link
Member

fire commented Jan 4, 2020

https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c

@fire fire changed the title Investigating Investigating as Godot Engine Module Jan 4, 2020
@fire
Copy link
Member Author

fire commented Jan 4, 2020

https://github.com/rawrtc/rawrtc was also mentioned.

rawrtc support is dependent on Mbed-TLS/mbedtls#1813.

@Faless
Copy link
Collaborator

Faless commented Mar 19, 2020

Copied from Faless/WebRTCNative#1 (comment)

The work on the native part started during GSoC 2018, and libwebrtc is the most compatible and fully featured implementation, so at the time it seemed the best option for us.
It would also allow us to expand our API supporting media streaming (voice/video chat, server content streaming, etc).

That said, I've been following rawrtc for a while now. it's really interesting, and I've been thinking about how to integrate it in Godot as a module, since having out-of-the-box data channels support for native platforms would be great.

The main problem I see is its dependency on libre, which itself depends on openssl (which we ditched in favour of mbedtls).
So the first step would be to patch libre to use mbedtls (which would make for a great contribution upstream, there's even a discussion about it: rawrtc/rawrtc#121).
I would love to see that happen, but it seems a long shot for 3.2 unless some kind-hearted human being decides to invest quite some time on it.

Since there is already a working implementation with libwebrtc I've decided to focus on finalizing/stabilizing that for this release cycle.
I agree with you though, that rawrtc is very promising, and I'm looking forward to see it integrated as a module in the future.

@ig-gh
Copy link

ig-gh commented Mar 4, 2021

https://github.com/paullouisageneau/libdatachannel

C/C++ WebRTC Data Channels and Media Transport standalone library

libdatachannel is a standalone implementation of WebRTC Data Channels, WebRTC Media Transport, and WebSockets in C++17 with C bindings for POSIX platforms (including GNU/Linux, Android, and Apple macOS) and Microsoft Windows. It enables direct connectivity between native applications and web browsers without the pain of importing the entire WebRTC stack. The interface consists of simplified versions of the JavaScript WebRTC and WebSocket APIs present in browsers, in order to ease the design of cross-environment applications. It can be compiled with multiple backends:

  • The security layer can be provided through OpenSSL or GnuTLS.
  • The connectivity for WebRTC can be provided through my ad-hoc ICE library libjuice as submodule or through libnice.

@fire
Copy link
Member Author

fire commented Mar 4, 2021

Does it use mbtls? Thats the current blocker.

Secondly lgpl is incompatible with MIT license.

@ig-gh
Copy link

ig-gh commented Mar 4, 2021

Does it use mbtls? Thats the current blocker.

OpenSSL or GnuTLS.
Should it possible to add mbTLS support(?)

Secondly lgpl is incompatible with MIT license.

Not as a lawyer - lgpl licensed work can be used as a library.
Differences from the GPL

A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.

@fire
Copy link
Member Author

fire commented Mar 4, 2021

So that's a no. Godot is a single executable.

@fire
Copy link
Member Author

fire commented Dec 15, 2021

I reviewed old issues.

https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/issues/1163 mentioned [mbedtls crypto support] was done.

Steps to compile standalone. (WIP)

cmake .. -DUSE_MBEDTLS=yes -DUSE_OPENSSL=no -G"Visual Studio 17 2022"

@fire fire changed the title Investigating as Godot Engine Module amazon-kinesis-video-streams-webrtc-sdk-c as c++ core module Dec 15, 2021
@Faless
Copy link
Collaborator

Faless commented Dec 15, 2021

I did try to use the kinesis webrtc sdk in place the google library in the plugin, (which I think should be the first step when trying any new library anyway), but had some issues I couldn't figure out during ICE candidate exchange (if I recall correctly):
https://github.com/faless/webrtc-native/tree/aws

Additionally, at least at the time, the library didn't support negotiated data channels (so we should double check that's supported now).

@fire
Copy link
Member Author

fire commented Dec 15, 2021

Started a fork of this repo https://github.com/V-Sekai/webrtc-native on the aws-4.0 branch.

@fire
Copy link
Member Author

fire commented Apr 11, 2022

Tracking:

  • Unknown issues Faless couldn't figure out during ICE candidate exchange
  • Negotiated data channels

@Faless
Copy link
Collaborator

Faless commented Nov 22, 2022

We recently moved to libdatachannel which is a very good library so another switch is very unlikely.
It supports either OpenSSL or GnuTLS as crypto library, so probably adding mbedTLS support to it is possible (a needed step to build as module I think).
In any case, given it can easily be supported with GDNative/GDExtension, it might not be worth the extra bloat to the engine in default builds (though this repository could also provide the option to be built as a custom module).

Closing since the switch to kinesis is not planned.

@Faless Faless closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2022
@fire
Copy link
Member Author

fire commented Nov 22, 2022

To add. libdatachannel has approved to relicense to MPL so that is the other reason this is unplanned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants