gstreamer_base/
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_base_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
28pub mod functions;
29pub use crate::functions::*;
30
31mod adapter;
32pub use crate::adapter::*;
33mod flow_combiner;
34pub use crate::flow_combiner::*;
35mod aggregator;
36mod aggregator_pad;
37mod base_parse;
38mod base_sink;
39mod base_src;
40mod base_transform;
41
42pub mod base_parse_frame;
43pub use crate::base_parse_frame::BaseParseFrame;
44
45pub const BASE_TRANSFORM_FLOW_DROPPED: gst::FlowSuccess = gst::FlowSuccess::CustomSuccess;
46pub const BASE_PARSE_FLOW_DROPPED: gst::FlowSuccess = gst::FlowSuccess::CustomSuccess;
47pub const AGGREGATOR_FLOW_NEED_DATA: gst::FlowError = gst::FlowError::CustomError;
48
49// Re-export all the traits in a prelude module, so that applications
50// can always "use gst_base::prelude::*" without getting conflicts
51pub mod prelude {
52    #[doc(hidden)]
53    pub use gst::prelude::*;
54
55    pub use crate::{
56        aggregator::AggregatorExtManual, aggregator_pad::AggregatorPadExtManual, auto::traits::*,
57        base_parse::BaseParseExtManual, base_sink::BaseSinkExtManual, base_src::BaseSrcExtManual,
58        base_transform::BaseTransformExtManual,
59    };
60}
61
62pub mod subclass;