mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-05-13 22:02:41 +00:00
04c840a1d9
Pre-1.20 it currently has nothing to re-export and would cause clippy warnings, but like this it won't be forgotten to update the conditions if new API is added that is available from older versions. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1414>
29 lines
599 B
Rust
29 lines
599 B
Rust
#![cfg_attr(docsrs, feature(doc_cfg))]
|
|
#![allow(clippy::missing_safety_doc)]
|
|
|
|
use std::sync::Once;
|
|
|
|
pub use ffi::*;
|
|
pub use glib;
|
|
pub use gst;
|
|
|
|
static MPEGTS_INIT: Once = Once::new();
|
|
|
|
macro_rules! assert_initialized_main_thread {
|
|
() => {
|
|
if !gst::INITIALIZED.load(std::sync::atomic::Ordering::SeqCst) {
|
|
gst::assert_initialized();
|
|
}
|
|
crate::MPEGTS_INIT.call_once(|| unsafe { ffi::gst_mpegts_initialize() });
|
|
};
|
|
}
|
|
|
|
pub fn init() {
|
|
assert_initialized_main_thread!();
|
|
}
|
|
|
|
#[allow(unused_imports)]
|
|
mod auto;
|
|
#[allow(unused_imports)]
|
|
pub use crate::auto::*;
|