1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT

use crate::ffi;
use glib::GStr;

#[doc(alias = "GST_ALLOCATOR_DMABUF")]
pub static ALLOCATOR_DMABUF: &GStr =
    unsafe { GStr::from_utf8_with_nul_unchecked(ffi::GST_ALLOCATOR_DMABUF) };
#[doc(alias = "GST_ALLOCATOR_FD")]
pub static ALLOCATOR_FD: &GStr =
    unsafe { GStr::from_utf8_with_nul_unchecked(ffi::GST_ALLOCATOR_FD) };
/// Name of this allocator, to be used for example with [`gst::Allocator::find()`][crate::gst::Allocator::find()] and
/// [`gst::Memory::is_type()`][crate::gst::Memory::is_type()].
#[cfg(feature = "v1_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
#[doc(alias = "GST_ALLOCATOR_SHM")]
pub static ALLOCATOR_SHM: &GStr =
    unsafe { GStr::from_utf8_with_nul_unchecked(ffi::GST_ALLOCATOR_SHM) };
/// Constant that defines the caps feature name for DMA buffer sharing.
///
/// It has to be used for non-mappable dma-buf only, i.e. when the underlying
/// memory is not mappable to user space. Or when the mapped memory contains
/// non meaningful data. It can be the case for protected content or when the
/// user wants explicitly avoid any software post processing.
///
/// In these cases all elements between the exported and the importer has to work
/// in passthrough mode. This is done by adding this caps feature.
///
/// When the memory is mappable for read and write requests then it is assumes
/// to be a fast path and so this caps feature should not be used. Though
/// according to the dma-buf protocol, while it is mapped it prevents the
/// exporter to migrate the buffer.
///
/// This caps feature should not serve at all the purpose of selecting the
/// [`ALLOCATOR_DMABUF`][crate::ALLOCATOR_DMABUF] allocator during caps negotiation.
/// When the exporter is the upstream element from the importer point of view,
/// the exporter should try to map the dma buffer at runtime (preferably during
/// decide_allocation phase). When it succeeds for `GST_MAP_READWRITE` this caps
/// feature should not be used. This allows scalers, color converts and any image
/// processing filters to work directly on the dma buffer.
/// In this case the importer element should check all incoming memory using
/// [`is_dmabuf_memory()`][crate::is_dmabuf_memory()].
#[doc(alias = "GST_CAPS_FEATURE_MEMORY_DMABUF")]
pub static CAPS_FEATURE_MEMORY_DMABUF: &GStr =
    unsafe { GStr::from_utf8_with_nul_unchecked(ffi::GST_CAPS_FEATURE_MEMORY_DMABUF) };