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