gstreamer_allocators/
lib.rs1#![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
31#[cfg(any(all(feature = "v1_30", target_os = "android"), docsrs))]
32#[cfg_attr(docsrs, doc(cfg(all(feature = "v1_30", target_os = "android"))))]
33mod ahardware_buffer;
34#[cfg(any(all(feature = "v1_30", target_os = "android"), docsrs))]
35#[cfg_attr(docsrs, doc(cfg(all(feature = "v1_30", target_os = "android"))))]
36pub use ahardware_buffer::*;
37
38#[cfg(any(unix, docsrs))]
39#[cfg_attr(docsrs, doc(cfg(unix)))]
40mod fd_allocator;
41#[cfg(any(unix, docsrs))]
42#[cfg_attr(docsrs, doc(cfg(unix)))]
43pub use fd_allocator::*;
44
45#[cfg(any(target_os = "linux", docsrs))]
46#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))]
47mod dma_buf_allocator;
48#[cfg(any(target_os = "linux", docsrs))]
49#[cfg_attr(docsrs, doc(cfg(target_os = "linux")))]
50pub use dma_buf_allocator::*;
51
52#[cfg(any(all(feature = "v1_24", target_os = "linux"), docsrs))]
53#[cfg_attr(docsrs, doc(cfg(all(feature = "v1_24", target_os = "linux"))))]
54mod drm_dumb_allocator;
55#[cfg(any(all(feature = "v1_24", target_os = "linux"), docsrs))]
56#[cfg_attr(docsrs, doc(cfg(all(feature = "v1_24", target_os = "linux"))))]
57pub use drm_dumb_allocator::*;
58
59#[cfg(any(all(feature = "v1_24", unix), docsrs))]
60#[cfg_attr(docsrs, doc(cfg(all(feature = "v1_24", unix))))]
61mod shm_allocator;
62
63mod phys_memory;
64pub use phys_memory::*;
65
66pub mod prelude {
69 #[doc(hidden)]
70 pub use gst::prelude::*;
71
72 pub use crate::auto::traits::*;
73 #[cfg(any(target_os = "linux", docsrs))]
74 pub use crate::dma_buf_allocator::DmaBufAllocatorExtManual;
75 #[cfg(any(all(feature = "v1_24", target_os = "linux"), docsrs))]
76 pub use crate::drm_dumb_allocator::DRMDumbAllocatorExtManual;
77 #[cfg(any(unix, docsrs))]
78 pub use crate::fd_allocator::FdAllocatorExtManual;
79}
80
81pub mod subclass;