Skip to main content

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