gstreamer_rtp/
lib.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3#![cfg_attr(docsrs, feature(doc_cfg))]
4#![allow(clippy::missing_safety_doc)]
5#![allow(clippy::manual_c_str_literals)]
6#![doc = include_str!("../README.md")]
7
8pub use glib;
9pub use gst;
10pub use gstreamer_rtp_sys as ffi;
11
12macro_rules! assert_initialized_main_thread {
13    () => {
14        if !gst::INITIALIZED.load(std::sync::atomic::Ordering::SeqCst) {
15            gst::assert_initialized();
16        }
17    };
18}
19
20macro_rules! skip_assert_initialized {
21    () => {};
22}
23
24#[allow(unused_imports)]
25mod auto;
26pub use crate::auto::*;
27
28#[cfg(feature = "serde")]
29mod flag_serde;
30
31pub mod subclass;
32
33pub mod rtp_buffer;
34pub use crate::rtp_buffer::{
35    calc_header_len, calc_packet_len, calc_payload_len, compare_seqnum, ext_timestamp, RTPBuffer,
36};
37#[cfg(feature = "v1_20")]
38#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
39pub mod rtp_header_extension;
40
41#[cfg(feature = "v1_20")]
42#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
43pub mod rtp_base_payload;
44
45pub mod rtp_base_depayload;
46
47#[cfg(feature = "v1_16")]
48#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
49mod rtp_meta;
50#[cfg(feature = "v1_16")]
51#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
52pub use crate::rtp_meta::*;
53
54// Re-export all the traits in a prelude module, so that applications
55// can always "use gst_rtp::prelude::*" without getting conflicts
56pub mod prelude {
57    #[doc(hidden)]
58    pub use gst::prelude::*;
59
60    #[cfg(feature = "v1_20")]
61    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
62    pub use crate::rtp_base_payload::RTPBasePayloadExtManual;
63    #[cfg(feature = "v1_20")]
64    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
65    pub use crate::rtp_header_extension::RTPHeaderExtensionExtManual;
66    pub use crate::{
67        auto::traits::*, rtp_base_depayload::RTPBaseDepayloadExtManual, rtp_buffer::RTPBufferExt,
68    };
69}
70
71pub mod functions {
72    pub use super::auto::functions::*;
73}