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_mixer;
19pub mod audio_resampler;
20pub mod audio_track;
21pub mod candidate;
22pub mod data_channel;
23#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]
24pub mod desktop_capturer;
25pub mod frame_cryptor;
26pub mod helper;
27pub mod jsep;
28pub mod media_stream;
29pub mod media_stream_track;
30pub mod peer_connection;
31pub mod peer_connection_factory;
32pub mod prohibit_libsrtp_initialization;
33pub mod rtc_error;
34pub mod rtp_parameters;
35pub mod rtp_receiver;
36pub mod rtp_sender;
37pub mod rtp_transceiver;
38pub mod video_frame;
39pub mod video_frame_buffer;
40pub mod video_track;
41pub mod webrtc;
42pub mod yuv_helper;
43
44pub const MEDIA_TYPE_VIDEO: &str = "video";
45pub const MEDIA_TYPE_AUDIO: &str = "audio";
46pub const MEDIA_TYPE_DATA: &str = "data";
47
48macro_rules! impl_thread_safety {
49    ($obj:ty, Send) => {
50        unsafe impl Send for $obj {}
51    };
52
53    ($obj:ty, Send + Sync) => {
54        unsafe impl Send for $obj {}
55        unsafe impl Sync for $obj {}
56    };
57}
58
59pub(crate) use impl_thread_safety;