gstreamer_allocators/
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_allocators_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
28mod caps_features;
29pub use crate::caps_features::CAPS_FEATURES_MEMORY_DMABUF;
30
31mod fd_allocator;
32pub use fd_allocator::*;
33
34#[cfg(any(target_os = "linux", docsrs))]
35#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))]
36mod dma_buf_allocator;
37#[cfg(any(target_os = "linux", docsrs))]
38#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))]
39pub use dma_buf_allocator::*;
40
41#[cfg(any(all(feature = "v1_24", target_os = "linux"), docsrs))]
42#[cfg_attr(docsrs, doc(cfg(all(feature = "v1_24", target_os = "linux"))))]
43mod drm_dumb_allocator;
44#[cfg(any(all(feature = "v1_24", target_os = "linux"), docsrs))]
45#[cfg_attr(docsrs, doc(cfg(all(feature = "v1_24", target_os = "linux"))))]
46pub use drm_dumb_allocator::*;
47
48#[cfg(any(all(feature = "v1_24", unix), docsrs))]
49#[cfg_attr(docsrs, doc(cfg(all(feature = "v1_24", unix))))]
50mod shm_allocator;
51
52mod phys_memory;
53pub use phys_memory::*;
54
55// Re-export all the traits in a prelude module, so that applications
56// can always "use gst_base::prelude::*" without getting conflicts
57pub mod prelude {
58    #[doc(hidden)]
59    pub use gst::prelude::*;
60
61    pub use crate::auto::traits::*;
62}
63
64pub mod subclass;