gstreamer_allocators/auto/constants.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::ffi;
7use glib::GStr;
8
9#[doc(alias = "GST_ALLOCATOR_DMABUF")]
10pub static ALLOCATOR_DMABUF: &GStr =
11 unsafe { GStr::from_utf8_with_nul_unchecked(ffi::GST_ALLOCATOR_DMABUF) };
12#[doc(alias = "GST_ALLOCATOR_FD")]
13pub static ALLOCATOR_FD: &GStr =
14 unsafe { GStr::from_utf8_with_nul_unchecked(ffi::GST_ALLOCATOR_FD) };
15/// Name of this allocator, to be used for example with [`gst::Allocator::find()`][crate::gst::Allocator::find()] and
16/// [`gst::Memory::is_type()`][crate::gst::Memory::is_type()].
17#[cfg(feature = "v1_24")]
18#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
19#[doc(alias = "GST_ALLOCATOR_SHM")]
20pub static ALLOCATOR_SHM: &GStr =
21 unsafe { GStr::from_utf8_with_nul_unchecked(ffi::GST_ALLOCATOR_SHM) };
22/// Name of this allocator, to be used for example with [`gst::Allocator::find()`][crate::gst::Allocator::find()] and
23/// [`gst::Memory::is_type()`][crate::gst::Memory::is_type()].
24#[cfg(feature = "v1_28")]
25#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
26#[doc(alias = "GST_ALLOCATOR_UDMABUF")]
27pub static ALLOCATOR_UDMABUF: &GStr =
28 unsafe { GStr::from_utf8_with_nul_unchecked(ffi::GST_ALLOCATOR_UDMABUF) };
29/// Name of the caps feature for indicating the use of AHardwareBuffer-backed
30/// memory.
31#[cfg(feature = "v1_30")]
32#[cfg_attr(docsrs, doc(cfg(feature = "v1_30")))]
33#[doc(alias = "GST_CAPS_FEATURE_MEMORY_AHARDWAREBUFFER")]
34pub static CAPS_FEATURE_MEMORY_AHARDWAREBUFFER: &GStr =
35 unsafe { GStr::from_utf8_with_nul_unchecked(ffi::GST_CAPS_FEATURE_MEMORY_AHARDWAREBUFFER) };
36/// Constant that defines the caps feature name for DMA buffer sharing.
37///
38/// It has to be used for non-mappable dma-buf only, i.e. when the underlying
39/// memory is not mappable to user space. Or when the mapped memory contains
40/// non meaningful data. It can be the case for protected content or when the
41/// user wants explicitly avoid any software post processing.
42///
43/// In these cases all elements between the exported and the importer has to work
44/// in passthrough mode. This is done by adding this caps feature.
45///
46/// When the memory is mappable for read and write requests then it is assumes
47/// to be a fast path and so this caps feature should not be used. Though
48/// according to the dma-buf protocol, while it is mapped it prevents the
49/// exporter to migrate the buffer.
50///
51/// This caps feature should not serve at all the purpose of selecting the
52/// [`ALLOCATOR_DMABUF`][crate::ALLOCATOR_DMABUF] allocator during caps negotiation.
53/// When the exporter is the upstream element from the importer point of view,
54/// the exporter should try to map the dma buffer at runtime (preferably during
55/// decide_allocation phase). When it succeeds for `GST_MAP_READWRITE` this caps
56/// feature should not be used. This allows scalers, color converts and any image
57/// processing filters to work directly on the dma buffer.
58/// In this case the importer element should check all incoming memory using
59/// [`is_dmabuf_memory()`][crate::is_dmabuf_memory()].
60#[doc(alias = "GST_CAPS_FEATURE_MEMORY_DMABUF")]
61pub static CAPS_FEATURE_MEMORY_DMABUF: &GStr =
62 unsafe { GStr::from_utf8_with_nul_unchecked(ffi::GST_CAPS_FEATURE_MEMORY_DMABUF) };