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