Skip to main content

gstreamer_analytics/
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_analytics_sys as ffi;
11
12#[cfg(feature = "v1_28")]
13macro_rules! assert_initialized_main_thread {
14    () => {
15        if !gst::INITIALIZED.load(std::sync::atomic::Ordering::SeqCst) {
16            gst::assert_initialized();
17        }
18    };
19}
20
21macro_rules! skip_assert_initialized {
22    () => {};
23}
24
25#[allow(unused_imports)]
26mod auto;
27pub use crate::auto::*;
28
29#[cfg(feature = "v1_26")]
30#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
31mod tensor;
32#[cfg(feature = "v1_26")]
33#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
34pub use crate::tensor::*;
35
36#[cfg(feature = "v1_26")]
37#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
38mod tensor_meta;
39#[cfg(feature = "v1_26")]
40#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))]
41pub use crate::tensor_meta::*;
42
43mod relation_meta;
44pub use crate::relation_meta::*;
45
46mod object_detection;
47pub use crate::object_detection::*;
48
49mod tracking;
50pub use crate::tracking::*;
51
52mod classification;
53pub use crate::classification::*;
54
55#[cfg(feature = "v1_28")]
56#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
57mod batchmeta;
58#[cfg(feature = "v1_28")]
59#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
60pub use crate::batchmeta::*;
61
62#[cfg(feature = "v1_28")]
63#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
64mod model_info;
65
66mod enums;
67
68// Re-export all the traits in a prelude module, so that applications
69// can always "use gst_app::prelude::*" without getting conflicts
70pub mod prelude {
71    pub use crate::classification::AnalyticsRelationMetaClassificationExt;
72    pub use crate::object_detection::AnalyticsRelationMetaODExt;
73    pub use crate::tracking::AnalyticsRelationMetaTrackingExt;
74}