gstreamer_mpegts/
lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2#![allow(clippy::missing_safety_doc)]
3#![allow(clippy::manual_c_str_literals)]
4
5use std::sync::Once;
6
7pub use glib;
8pub use gst;
9pub use gstreamer_mpegts_sys as ffi;
10
11static MPEGTS_INIT: Once = Once::new();
12
13macro_rules! assert_initialized_main_thread {
14 () => {
15 if !gst::INITIALIZED.load(std::sync::atomic::Ordering::SeqCst) {
16 gst::assert_initialized();
17 }
18 crate::MPEGTS_INIT.call_once(|| unsafe { crate::ffi::gst_mpegts_initialize() });
19 };
20}
21
22pub fn init() {
23 assert_initialized_main_thread!();
24}
25
26#[allow(unused_imports)]
27mod auto;
28#[allow(unused_imports)]
29pub use crate::auto::*;