gstreamer_base/auto/
flags.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::{bitflags::bitflags, translate::*};
8
9bitflags! {
10    /// Flags to be used in a [`BaseParseFrame`][crate::BaseParseFrame].
11    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
12    #[doc(alias = "GstBaseParseFrameFlags")]
13    pub struct BaseParseFrameFlags: u32 {
14        /// set by baseclass if current frame
15        ///  is passed for processing to the subclass for the first time
16        ///  (and not set on subsequent calls with same data).
17        #[doc(alias = "GST_BASE_PARSE_FRAME_FLAG_NEW_FRAME")]
18        const NEW_FRAME = ffi::GST_BASE_PARSE_FRAME_FLAG_NEW_FRAME as _;
19        /// set to indicate this buffer should not be
20        ///  counted as frame, e.g. if this frame is dependent on a previous one.
21        ///  As it is not counted as a frame, bitrate increases but frame to time
22        ///  conversions are maintained.
23        #[doc(alias = "GST_BASE_PARSE_FRAME_FLAG_NO_FRAME")]
24        const NO_FRAME = ffi::GST_BASE_PARSE_FRAME_FLAG_NO_FRAME as _;
25        /// `pre_push_frame` can set this to indicate
26        ///  that regular segment clipping can still be performed (as opposed to
27        ///  any custom one having been done).
28        #[doc(alias = "GST_BASE_PARSE_FRAME_FLAG_CLIP")]
29        const CLIP = ffi::GST_BASE_PARSE_FRAME_FLAG_CLIP as _;
30        /// indicates to `finish_frame` that the
31        ///  the frame should be dropped (and might be handled internally by subclass)
32        #[doc(alias = "GST_BASE_PARSE_FRAME_FLAG_DROP")]
33        const DROP = ffi::GST_BASE_PARSE_FRAME_FLAG_DROP as _;
34        /// indicates to `finish_frame` that the
35        ///  the frame should be queued for now and processed fully later
36        ///  when the first non-queued frame is finished
37        #[doc(alias = "GST_BASE_PARSE_FRAME_FLAG_QUEUE")]
38        const QUEUE = ffi::GST_BASE_PARSE_FRAME_FLAG_QUEUE as _;
39    }
40}
41
42#[doc(hidden)]
43impl IntoGlib for BaseParseFrameFlags {
44    type GlibType = ffi::GstBaseParseFrameFlags;
45
46    #[inline]
47    fn into_glib(self) -> ffi::GstBaseParseFrameFlags {
48        self.bits()
49    }
50}
51
52#[doc(hidden)]
53impl FromGlib<ffi::GstBaseParseFrameFlags> for BaseParseFrameFlags {
54    #[inline]
55    unsafe fn from_glib(value: ffi::GstBaseParseFrameFlags) -> Self {
56        skip_assert_initialized!();
57        Self::from_bits_truncate(value)
58    }
59}