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
56use crate::ffi;
7use glib::{bitflags::bitflags, translate::*};
89bitflags! {
10/// Various flags to control the operation of the fd backed memory.
11#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
12 #[doc(alias = "GstFdMemoryFlags")]
13pub struct FdMemoryFlags: u32 {
14/// no flag
15#[doc(alias = "GST_FD_MEMORY_FLAG_NONE")]
16const NONE = ffi::GST_FD_MEMORY_FLAG_NONE as _;
17/// once the memory is mapped,
18 /// keep it mapped until the memory is destroyed.
19#[doc(alias = "GST_FD_MEMORY_FLAG_KEEP_MAPPED")]
20const KEEP_MAPPED = ffi::GST_FD_MEMORY_FLAG_KEEP_MAPPED as _;
21/// do a private mapping instead of
22 /// the default shared mapping.
23#[doc(alias = "GST_FD_MEMORY_FLAG_MAP_PRIVATE")]
24const MAP_PRIVATE = ffi::GST_FD_MEMORY_FLAG_MAP_PRIVATE as _;
25/// don't close the file descriptor when
26 /// the memory is freed. Since: 1.10
27#[doc(alias = "GST_FD_MEMORY_FLAG_DONT_CLOSE")]
28const DONT_CLOSE = ffi::GST_FD_MEMORY_FLAG_DONT_CLOSE as _;
29 }
30}
3132#[doc(hidden)]
33impl IntoGlib for FdMemoryFlags {
34type GlibType = ffi::GstFdMemoryFlags;
3536#[inline]
37fn into_glib(self) -> ffi::GstFdMemoryFlags {
38self.bits()
39 }
40}
4142#[doc(hidden)]
43impl FromGlib<ffi::GstFdMemoryFlags> for FdMemoryFlags {
44#[inline]
45unsafe fn from_glib(value: ffi::GstFdMemoryFlags) -> Self {
46skip_assert_initialized!();
47Self::from_bits_truncate(value)
48 }
49}