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/// Constant that defines the caps feature name for DMA buffer sharing.
23///
24/// It has to be used for non-mappable dma-buf only, i.e. when the underlying
25/// memory is not mappable to user space. Or when the mapped memory contains
26/// non meaningful data. It can be the case for protected content or when the
27/// user wants explicitly avoid any software post processing.
28///
29/// In these cases all elements between the exported and the importer has to work
30/// in passthrough mode. This is done by adding this caps feature.
31///
32/// When the memory is mappable for read and write requests then it is assumes
33/// to be a fast path and so this caps feature should not be used. Though
34/// according to the dma-buf protocol, while it is mapped it prevents the
35/// exporter to migrate the buffer.
36///
37/// This caps feature should not serve at all the purpose of selecting the
38/// [`ALLOCATOR_DMABUF`][crate::ALLOCATOR_DMABUF] allocator during caps negotiation.
39/// When the exporter is the upstream element from the importer point of view,
40/// the exporter should try to map the dma buffer at runtime (preferably during
41/// decide_allocation phase). When it succeeds for `GST_MAP_READWRITE` this caps
42/// feature should not be used. This allows scalers, color converts and any image
43/// processing filters to work directly on the dma buffer.
44/// In this case the importer element should check all incoming memory using
45/// [`is_dmabuf_memory()`][crate::is_dmabuf_memory()].
46#[doc(alias = "GST_CAPS_FEATURE_MEMORY_DMABUF")]
47pub static CAPS_FEATURE_MEMORY_DMABUF: &GStr =
48    unsafe { GStr::from_utf8_with_nul_unchecked(ffi::GST_CAPS_FEATURE_MEMORY_DMABUF) };