Files
client-sdk-rust/webrtc-sys
Théo Monnom 8f294dde41 fix: windows crashes & builds (#55)
- Doing jobs in parallels in GHA (Divide build time by 3).
- Now use custom webrtc builds for this repo
- Windows crashes when receiving video is now fixed (thanks @cloudwebrtc)
    - Now reading defines from webrtc.ninja
- Added a small create_pc test to be sure libwebrtc is working/linked correctly 
- Fix MacOS builds 
- Fixed Linux duplicated main build error (due to nasm)
2023-04-24 18:27:30 +02:00
..
2023-03-19 21:58:20 +01:00
2023-03-19 21:58:20 +01:00
2023-01-02 20:13:48 +01:00
2023-01-02 20:13:48 +01:00
2023-04-24 18:27:30 +02:00
2023-04-19 12:33:39 +02:00

webrtc-sys

This crate provides wrapper over the WebRTC API for use from Rust. We use the crate cxx.rs to simplify our bindings.

Wrappers

Most of our wrappers use the cxx.rs types compatible with Rust. As most of our wrappers are stateless, we allow multiple instances of a specific wrapper to point to the same underlying webrtc pointer. (e.g: multiple livekit::MediaStreamTrack pointing to the same webrtc::MediaStreamTrackInterface).

Threadsafe methods use the const keyword so we can easily call them from the Rust side without worrying about the mutability of the object. (This is similar on how Cell/UnsafeCell works but implemented on the C++ side: interior mutability).

Code

We also use this C++ code to provide other needed utilities/features on the Rust side (e.g: tiny bindings to libyuv).