Skip to main content

webrtc_sys/
lib.rs

1// Copyright 2025 LiveKit, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#[cfg(target_os = "android")]
16pub mod android;
17pub mod apm;
18pub mod audio_device_controller;
19pub mod audio_mixer;
20pub mod audio_resampler;
21pub mod audio_track;
22pub mod candidate;
23pub mod data_channel;
24#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]
25pub mod desktop_capturer;
26pub mod frame_cryptor;
27pub mod helper;
28pub mod jsep;
29pub mod media_stream;
30pub mod media_stream_track;
31pub mod packet_trailer;
32pub mod peer_connection;
33pub mod peer_connection_factory;
34pub mod prohibit_libsrtp_initialization;
35pub mod rtc_error;
36pub mod rtp_parameters;
37pub mod rtp_receiver;
38pub mod rtp_sender;
39pub mod rtp_transceiver;
40pub mod video_frame;
41pub mod video_frame_buffer;
42pub mod video_track;
43pub mod webrtc;
44pub mod yuv_helper;
45
46pub const MEDIA_TYPE_VIDEO: &str = "video";
47pub const MEDIA_TYPE_AUDIO: &str = "audio";
48pub const MEDIA_TYPE_DATA: &str = "data";
49
50macro_rules! impl_thread_safety {
51    ($obj:ty, Send) => {
52        unsafe impl Send for $obj {}
53    };
54
55    ($obj:ty, Send + Sync) => {
56        unsafe impl Send for $obj {}
57        unsafe impl Sync for $obj {}
58    };
59}
60
61pub(crate) use impl_thread_safety;