Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
cb4cb6e
Update .gitignore
theomonnom May 31, 2024
9535b9f
Create .gitignore
theomonnom May 31, 2024
00d4280
wip C bindings
theomonnom Jun 2, 2024
ffe9bd1
changing branch
theomonnom Jun 17, 2024
4a28e91
wip
theomonnom Aug 27, 2024
c9bcd34
Merge branch 'main' into theo/dynamic-webrtc
cloudwebrtc Nov 10, 2025
f7da02a
Merge branch 'main' into theo/dynamic-webrtc
cloudwebrtc Nov 10, 2025
89b1705
add unittests
cloudwebrtc Nov 10, 2025
c1d71af
WIP.
cloudwebrtc Nov 13, 2025
98f6ce3
wip.
cloudwebrtc Nov 14, 2025
b2edf7b
fix.
cloudwebrtc Nov 14, 2025
f35382c
wip.
cloudwebrtc Nov 18, 2025
ba9d1da
first working commit.
cloudwebrtc Nov 18, 2025
dee850a
wip.
cloudwebrtc Nov 19, 2025
3f06941
wip.
cloudwebrtc Nov 19, 2025
299c0d0
wip.
cloudwebrtc Nov 19, 2025
302b2a9
audiotrack source/sink.
cloudwebrtc Nov 19, 2025
711a65a
wip.
cloudwebrtc Nov 20, 2025
f6dae7a
audio_track.
cloudwebrtc Nov 20, 2025
e78bcaa
media_stream.
cloudwebrtc Dec 3, 2025
c85f75d
more native files.
cloudwebrtc Dec 5, 2025
8470ff1
wip.
cloudwebrtc Dec 5, 2025
e214b53
video stream.
cloudwebrtc Dec 8, 2025
4f436f6
update.
cloudwebrtc Dec 8, 2025
b3c8a59
i420 unit tests.
cloudwebrtc Dec 8, 2025
a628991
more tests.
cloudwebrtc Dec 8, 2025
a0c33c3
update.
cloudwebrtc Dec 8, 2025
0582a9d
update.
cloudwebrtc Dec 8, 2025
56bd5cd
add LKString, LKVector, LKData for refcounted objects.
cloudwebrtc Dec 9, 2025
2b8b845
update.
cloudwebrtc Dec 9, 2025
93dd288
update.
cloudwebrtc Dec 9, 2025
e9968b5
more changes.
cloudwebrtc Dec 9, 2025
5e39116
wip.
cloudwebrtc Dec 14, 2025
6e9b973
wip.
cloudwebrtc Dec 14, 2025
977b84a
wip.
cloudwebrtc Dec 15, 2025
6dc72ec
all interfaces.
cloudwebrtc Dec 15, 2025
97bb189
update.
cloudwebrtc Dec 15, 2025
6dfcc00
update.
cloudwebrtc Dec 15, 2025
a81ae53
more unit test.
cloudwebrtc Dec 16, 2025
719a8eb
fix linux build.
cloudwebrtc Dec 17, 2025
b6e68ac
desktop_capture.
cloudwebrtc Dec 22, 2025
16ab09e
frame cryptor.
cloudwebrtc Dec 22, 2025
3013b54
audio mixer.
cloudwebrtc Dec 23, 2025
f90d90e
update.
cloudwebrtc Dec 29, 2025
38ce4b1
update.
cloudwebrtc Dec 29, 2025
7b040c8
wip.
cloudwebrtc Dec 30, 2025
672947d
add unit test for frame cryptor.
cloudwebrtc Dec 31, 2025
6e54426
update.
cloudwebrtc Jan 5, 2026
47b44f9
Merge branch 'main' into theo/dynamic-webrtc
cloudwebrtc Jan 5, 2026
566f26d
Reorganize the package.
cloudwebrtc Jan 5, 2026
95aa45f
fix save_to_disk.
cloudwebrtc Jan 5, 2026
7595215
rename.
cloudwebrtc Jan 6, 2026
cb64c3d
fix examples/local_audio.
cloudwebrtc Jan 6, 2026
dbcb5a1
fix ffi build.
cloudwebrtc Jan 9, 2026
60e2bf0
remove yuv_helper form libwebrtc.
cloudwebrtc Jan 12, 2026
aa7a5b3
fix examples/wgpu_room.
cloudwebrtc Jan 12, 2026
6a10487
fix.
cloudwebrtc Jan 12, 2026
7c36b47
Restore code structure.
cloudwebrtc Jan 13, 2026
65120cc
revert changes.
cloudwebrtc Jan 13, 2026
0819878
revert code structure for frame_cryptor
cloudwebrtc Jan 13, 2026
7990578
revert changes.
cloudwebrtc Jan 13, 2026
dd4aee3
cleanup.
cloudwebrtc Jan 13, 2026
a06f81d
fix set_codec_preferences.
cloudwebrtc Jan 13, 2026
2fb65e3
code tidy.
cloudwebrtc Jan 13, 2026
588de82
fix licenserc.
cloudwebrtc Jan 13, 2026
ecf8971
fix.
cloudwebrtc Jan 13, 2026
a5f1d08
rename namespace.
cloudwebrtc Jan 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
709 changes: 270 additions & 439 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ members = [
"soxr-sys",
"yuv-sys",
"imgproc",
"webrtc-sys",
"webrtc-sys/build",

"examples/agent_dispatch",
"examples/api",
"examples/basic_room",
Expand All @@ -38,6 +35,5 @@ livekit-ffi = { version = "0.12.43", path = "livekit-ffi" }
livekit-protocol = { version = "0.6.0", path = "livekit-protocol" }
livekit-runtime = { version = "0.4.0", path = "livekit-runtime" }
soxr-sys = { version = "0.1.1", path = "soxr-sys" }
webrtc-sys = { version = "0.3.20", path = "webrtc-sys" }
webrtc-sys-build = { version = "0.3.12", path = "webrtc-sys/build" }
webrtc-sys-build = { version = "0.3.12", path = "libwebrtc/build" }
yuv-sys = { version = "0.3.10", path = "yuv-sys" }
2 changes: 1 addition & 1 deletion examples/wgpu_room/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tracing = ["console-subscriber", "tokio/tracing"]
[dependencies]
tokio = { version = "1", features = ["full", "parking_lot"] }
livekit = { workspace = true, features = ["rustls-tls-native-roots"]}
webrtc-sys = { workspace = true }
libwebrtc = { workspace = true }
futures = "0.3"
winit = { version = "0.30.11", features = [ "android-native-activity" ] }
parking_lot = { version = "0.12.1", features = ["deadlock_detection"] }
Expand Down
File renamed without changes.
87 changes: 57 additions & 30 deletions libwebrtc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,111 +7,138 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.23](https://github.com/livekit/rust-sdks/compare/rust-sdks/libwebrtc@0.3.22...rust-sdks/libwebrtc@0.3.23) - 2025-12-19
## [0.3.20](https://github.com/livekit/rust-sdks/compare/rust-sdks/webrtc-sys@0.3.19...rust-sdks/webrtc-sys@0.3.20) - 2025-12-19

### Fixed

- Exclude the desktop-capturer module link for mobile. ([#817](https://github.com/livekit/rust-sdks/pull/817))

## [0.3.22](https://github.com/livekit/rust-sdks/compare/rust-sdks/[email protected]/[email protected]) - 2025-12-17
## [0.3.19](https://github.com/livekit/rust-sdks/compare/rust-sdks/[email protected]/[email protected]) - 2025-12-17

### Fixed

- lazy loading for additional dependencies. ([#814](https://github.com/livekit/rust-sdks/pull/814))

### Other

- Expose WebRTC's audio_mixer ([#806](https://github.com/livekit/rust-sdks/pull/806))

## [0.3.21](https://github.com/livekit/rust-sdks/compare/rust-sdks/libwebrtc@0.3.20...rust-sdks/libwebrtc@0.3.21) - 2025-12-04
## [0.3.18](https://github.com/livekit/rust-sdks/compare/rust-sdks/webrtc-sys@0.3.17...rust-sdks/webrtc-sys@0.3.18) - 2025-12-04

### Other

- move starting/stopping GLib event loop into libwebrtc crate ([#798](https://github.com/livekit/rust-sdks/pull/798))
- initialize frame_.samples_per_channel_ ([#779](https://github.com/livekit/rust-sdks/pull/779))
- Expose desktop capturer ([#725](https://github.com/livekit/rust-sdks/pull/725))

## [0.3.20](https://github.com/livekit/rust-sdks/compare/rust-sdks/[email protected]/[email protected]) - 2025-11-20
## [0.3.17](https://github.com/livekit/rust-sdks/compare/rust-sdks/[email protected]/[email protected]) - 2025-11-20

### Fixed

- fix Android libwebrtc builds ([#791](https://github.com/livekit/rust-sdks/pull/791))

### Other

- Fix the fast path in capture_frame function, without buffering ([#778](https://github.com/livekit/rust-sdks/pull/778))
- Enable H265 encoding & decoding on Nvidia GPU ([#776](https://github.com/livekit/rust-sdks/pull/776))
- copy desktop_capture.ninja into C++ library archive ([#787](https://github.com/livekit/rust-sdks/pull/787))
- enable Pipewire (Wayland) and X11 desktop capture ([#784](https://github.com/livekit/rust-sdks/pull/784))

## [0.3.19](https://github.com/livekit/rust-sdks/compare/rust-sdks/[email protected]/[email protected]) - 2025-10-27
## [0.3.16](https://github.com/livekit/rust-sdks/compare/rust-sdks/[email protected]/[email protected]) - 2025-10-27

### Fixed

- fix unable to locate __arm_tpidr2_save for android ffi. ([#765](https://github.com/livekit/rust-sdks/pull/765))

### Other

- updated the following local packages: webrtc-sys
- Linux hardware acceleration build fixes ([#753](https://github.com/livekit/rust-sdks/pull/753))

## [0.3.18](https://github.com/livekit/rust-sdks/compare/rust-sdks/libwebrtc@0.3.17...rust-sdks/libwebrtc@0.3.18) - 2025-10-22
## [0.3.15](https://github.com/livekit/rust-sdks/compare/rust-sdks/webrtc-sys@0.3.14...rust-sdks/webrtc-sys@0.3.15) - 2025-10-22

### Other

- License check ([#746](https://github.com/livekit/rust-sdks/pull/746))
- put examples in root Cargo workspace ([#731](https://github.com/livekit/rust-sdks/pull/731))

## [0.3.17](https://github.com/livekit/rust-sdks/compare/rust-sdks/libwebrtc@0.3.16...rust-sdks/libwebrtc@0.3.17) - 2025-10-13
## [0.3.14](https://github.com/livekit/rust-sdks/compare/rust-sdks/webrtc-sys@0.3.13...rust-sdks/webrtc-sys@0.3.14) - 2025-10-13

### Added

- *(e2ee)* add data channel encryption ([#708](https://github.com/livekit/rust-sdks/pull/708))

### Fixed

- fix some potential audio issues, clean up the code a bit, and suppress some warnings ([#737](https://github.com/livekit/rust-sdks/pull/737))
- fix linux so link issue. ([#733](https://github.com/livekit/rust-sdks/pull/733))
- change search_dirs to use cc --print-search-dirs instead of clang --print-search-dirs ([#697](https://github.com/livekit/rust-sdks/pull/697))

### Other

- bump libwebrtc libs version for webrtc-sys. ([#741](https://github.com/livekit/rust-sdks/pull/741))
- Enable buffer scaling ([#473](https://github.com/livekit/rust-sdks/pull/473))

## [0.3.16](https://github.com/livekit/rust-sdks/compare/rust-sdks/libwebrtc@0.3.15...rust-sdks/libwebrtc@0.3.16) - 2025-10-03
## [0.3.13](https://github.com/livekit/rust-sdks/compare/rust-sdks/webrtc-sys@0.3.12...rust-sdks/webrtc-sys@0.3.13) - 2025-10-03

### Other

- updated the following local packages: webrtc-sys
- Fix empty audio frames after resample ([#722](https://github.com/livekit/rust-sdks/pull/722))

## [0.3.15](https://github.com/livekit/rust-sdks/compare/rust-sdks/libwebrtc@0.3.14...rust-sdks/libwebrtc@0.3.15) - 2025-09-29
## [0.3.12](https://github.com/livekit/rust-sdks/compare/rust-sdks/webrtc-sys@0.3.11...rust-sdks/webrtc-sys@0.3.12) - 2025-09-29

### Fixed

- fix Builds/E2E Tests CI. ([#715](https://github.com/livekit/rust-sdks/pull/715))

## [0.3.14](https://github.com/livekit/rust-sdks/compare/rust-sdks/[email protected]/[email protected]) - 2025-09-09

### Other

- updated the following local packages: webrtc-sys
- nvidia codec improve ([#721](https://github.com/livekit/rust-sdks/pull/721))
- Upgrade libwebrtc to m137. ([#696](https://github.com/livekit/rust-sdks/pull/696))

## [0.3.13](https://github.com/livekit/rust-sdks/compare/rust-sdks/libwebrtc@0.3.12...rust-sdks/libwebrtc@0.3.13) - 2025-09-03
## [0.3.11](https://github.com/livekit/rust-sdks/compare/rust-sdks/webrtc-sys@0.3.10...rust-sdks/webrtc-sys@0.3.11) - 2025-09-09

### Other

- updated the following local packages: webrtc-sys
- Optional flags for video hw codec. ([#701](https://github.com/livekit/rust-sdks/pull/701))

## [0.3.10](https://github.com/livekit/rust-sdks/compare/rust-sdks/[email protected]/[email protected]) - 2025-09-03

### Added

- VA-API support for linux. ([#638](https://github.com/livekit/rust-sdks/pull/638))

### Fixed

- hardware rendering ([#695](https://github.com/livekit/rust-sdks/pull/695))
# Changelog

## [0.3.12](https://github.com/livekit/rust-sdks/compare/rust-sdks/libwebrtc@0.3.11...rust-sdks/libwebrtc@0.3.12) - 2025-06-17
## [0.3.9](https://github.com/livekit/rust-sdks/compare/rust-sdks/webrtc-sys@0.3.8...rust-sdks/webrtc-sys@0.3.9) - 2025-06-17

### Other

- updated the following local packages: livekit-protocol, webrtc-sys
- updated the following local packages: webrtc-sys-build

## [0.3.11](https://github.com/livekit/rust-sdks/compare/rust-sdks/libwebrtc@0.3.10...rust-sdks/libwebrtc@0.3.11) - 2025-06-11
## [0.3.8](https://github.com/livekit/rust-sdks/compare/rust-sdks/webrtc-sys@0.3.7...rust-sdks/webrtc-sys@0.3.8) - 2025-06-11

### Fixed

- fix uint32 overflow ([#615](https://github.com/livekit/rust-sdks/pull/615))
- fix libwebrtc.jar build issue ([#586](https://github.com/livekit/rust-sdks/pull/586))

### Other

- bump version for webrtc (fix win CI) ([#650](https://github.com/livekit/rust-sdks/pull/650))
- try to fix webrtc build for iOS/macOS. ([#646](https://github.com/livekit/rust-sdks/pull/646))
- remove ([#633](https://github.com/livekit/rust-sdks/pull/633))
- expose apm stream_delay ([#616](https://github.com/livekit/rust-sdks/pull/616))
- Add i420_to_nv12 ([#605](https://github.com/livekit/rust-sdks/pull/605))
- ffi-v0.13.0 ([#590](https://github.com/livekit/rust-sdks/pull/590))
- add AudioProcessingModule ([#580](https://github.com/livekit/rust-sdks/pull/580))

## [0.3.10] - 2025-02-05

### Fixed

- Fix build issue

## [0.3.9] - 2025-01-17
## [0.3.7] - 2025-02-05

### Added

- Expose DataChannel.bufferedAmount property

## [0.3.8] - 2024-12-14
## [0.3.6] - 2024-12-14

### Added

Expand Down
73 changes: 30 additions & 43 deletions libwebrtc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,44 @@ version = "0.3.23"
edition = "2021"
homepage = "https://livekit.io"
license = "Apache-2.0"
description = "Livekit safe bindings to libwebrtc"
repository = "https://github.com/livekit/rust-sdks"
description = "Unsafe bindings to libwebrtc"
repository = "https://github.com/livekit/client-sdk-rust"

[features]
default = [ "glib-main-loop" ]
# On Wayland, libwebrtc uses GDBus to communicate with the XDG Desktop Portal.
# GDBus requires a GLib event loop to be running. If you already have a GLib
# event loop running in your application, for example if you are using the
# GTK or GStreamer Rust bindings, disable this feature.
glib-main-loop = [ "dep:glib" ]
default = []
static = []

[dependencies]
livekit-protocol = { workspace = true }
livekit-runtime = { workspace = true }
yuv-sys = { workspace = true }
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"

[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
glib = { version = "0.21.3", optional = true }
parking_lot = "0.12.5"
serde = "1.0.228"
serde_derive = "1.0.228"
serde_json = "1.0.145"
thiserror = "2.0.17"
tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1.17"

[target.'cfg(target_os = "android")'.dependencies]
jni = "0.21"
[dependencies.uuid]
version = "1.19.0"
# Lets you generate random UUIDs
features = [
"v4",
]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
webrtc-sys = { workspace = true }
livekit-runtime = { workspace = true }
lazy_static = "1.4"
parking_lot = { version = "0.12" }
tokio = { version = "1", default-features = false, features = ["sync", "macros"] }
cxx = "1.0"
[build-dependencies]
webrtc-sys-build = { workspace = true }
cxx-build = "1.0"
glob = "0.3"
cc = "1.0"
pkg-config = "0.3.22"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
js-sys = "0.3"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [
"MessageEvent",
"RtcPeerConnection",
"RtcSignalingState",
"RtcSdpType",
"RtcSessionDescriptionInit",
"RtcPeerConnectionIceEvent",
"RtcIceCandidate",
"RtcDataChannel",
"RtcDataChannelEvent",
"RtcDataChannelState",
"EventTarget",
"WebGlRenderingContext",
"WebGlTexture",
] }
[target.'cfg(target_os = "linux")'.build-dependencies]
pkg-config = "0.3.22"

[dev-dependencies]
env_logger = "0.10"

[lib]
crate-type = ["lib", "staticlib"]
File renamed without changes.
48 changes: 48 additions & 0 deletions libwebrtc/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Copyright 2025 LiveKit, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

use std::env;

fn main() {
if env::var("DOCS_RS").is_ok() {
return;
}

let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
let is_desktop = target_os == "linux" || target_os == "windows" || target_os == "macos";

println!("cargo:rerun-if-env-changed=LK_DEBUG_WEBRTC");
println!("cargo:rerun-if-env-changed=LK_CUSTOM_WEBRTC");

//let use_debug_lib = webrtc_sys_build::rtc_debug_enabled();
let use_dylib = !cfg!(feature = "static");
//let use_custom_rtc = webrtc_sys_build::is_using_custom_webrtc();

let webrtc_dir = webrtc_sys_build::webrtc_dir();
//let webrtc_include = webrtc_dir.join("include");
//let webrtc_lib = webrtc_dir.join("lib");

if use_dylib {
if let Err(e) = webrtc_sys_build::copy_dylib_to_target(&webrtc_dir) {
println!("cargo:warning=failed to copy livekit_rtc dylib to target: {}", e);
}
}

if use_dylib {
webrtc_sys_build::link_shared_library(&webrtc_dir);
} else {
webrtc_sys_build::link_static_library(&webrtc_dir);
}
}
File renamed without changes.
File renamed without changes.
Loading
Loading