Skip to main content

gstreamer/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::{GStr, bitflags::bitflags, prelude::*, translate::*};
8
9bitflags! {
10    /// GstBinFlags are a set of flags specific to bins. Most are set/used
11    /// internally. They can be checked using the GST_OBJECT_FLAG_IS_SET() macro,
12    /// and (un)set using GST_OBJECT_FLAG_SET() and GST_OBJECT_FLAG_UNSET().
13    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
14    #[doc(alias = "GstBinFlags")]
15    pub struct BinFlags: u32 {
16        /// Don't resync a state change when elements are added or linked in the bin
17        #[doc(alias = "GST_BIN_FLAG_NO_RESYNC")]
18        const NO_RESYNC = ffi::GST_BIN_FLAG_NO_RESYNC as _;
19        /// Indicates whether the bin can handle elements that add/remove source pads
20        /// at any point in time without first posting a no-more-pads signal.
21        #[doc(alias = "GST_BIN_FLAG_STREAMS_AWARE")]
22        const STREAMS_AWARE = ffi::GST_BIN_FLAG_STREAMS_AWARE as _;
23    }
24}
25
26#[doc(hidden)]
27impl IntoGlib for BinFlags {
28    type GlibType = ffi::GstBinFlags;
29
30    #[inline]
31    fn into_glib(self) -> ffi::GstBinFlags {
32        self.bits()
33    }
34}
35
36#[doc(hidden)]
37impl FromGlib<ffi::GstBinFlags> for BinFlags {
38    #[inline]
39    unsafe fn from_glib(value: ffi::GstBinFlags) -> Self {
40        skip_assert_initialized!();
41        Self::from_bits_truncate(value)
42    }
43}
44
45impl StaticType for BinFlags {
46    #[inline]
47    #[doc(alias = "gst_bin_flags_get_type")]
48    fn static_type() -> glib::Type {
49        unsafe { from_glib(ffi::gst_bin_flags_get_type()) }
50    }
51}
52
53impl glib::HasParamSpec for BinFlags {
54    type ParamSpec = glib::ParamSpecFlags;
55    type SetValue = Self;
56    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
57
58    fn param_spec_builder() -> Self::BuilderFn {
59        Self::ParamSpec::builder
60    }
61}
62
63impl glib::value::ValueType for BinFlags {
64    type Type = Self;
65}
66
67unsafe impl<'a> glib::value::FromValue<'a> for BinFlags {
68    type Checker = glib::value::GenericValueTypeChecker<Self>;
69
70    #[inline]
71    unsafe fn from_value(value: &'a glib::Value) -> Self {
72        skip_assert_initialized!();
73        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
74    }
75}
76
77impl ToValue for BinFlags {
78    #[inline]
79    fn to_value(&self) -> glib::Value {
80        let mut value = glib::Value::for_value_type::<Self>();
81        unsafe {
82            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
83        }
84        value
85    }
86
87    #[inline]
88    fn value_type(&self) -> glib::Type {
89        Self::static_type()
90    }
91}
92
93impl From<BinFlags> for glib::Value {
94    #[inline]
95    fn from(v: BinFlags) -> Self {
96        skip_assert_initialized!();
97        ToValue::to_value(&v)
98    }
99}
100
101bitflags! {
102    /// A set of flags that can be provided to the [`Buffer::copy_into()`][crate::Buffer::copy_into()]
103    /// function to specify which items should be copied.
104    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
105    #[doc(alias = "GstBufferCopyFlags")]
106    pub struct BufferCopyFlags: u32 {
107        /// flag indicating that buffer flags should be copied
108        #[doc(alias = "GST_BUFFER_COPY_FLAGS")]
109        const FLAGS = ffi::GST_BUFFER_COPY_FLAGS as _;
110        /// flag indicating that buffer pts, dts,
111        ///  duration, offset and offset_end should be copied
112        #[doc(alias = "GST_BUFFER_COPY_TIMESTAMPS")]
113        const TIMESTAMPS = ffi::GST_BUFFER_COPY_TIMESTAMPS as _;
114        /// flag indicating that buffer meta should be
115        ///  copied
116        #[doc(alias = "GST_BUFFER_COPY_META")]
117        const META = ffi::GST_BUFFER_COPY_META as _;
118        /// flag indicating that buffer memory should be reffed
119        ///  and appended to already existing memory. Unless the memory is marked as
120        ///  NO_SHARE, no actual copy of the memory is made but it is simply reffed.
121        ///  Add [`DEEP`][Self::DEEP] to force a real copy.
122        #[doc(alias = "GST_BUFFER_COPY_MEMORY")]
123        const MEMORY = ffi::GST_BUFFER_COPY_MEMORY as _;
124        /// flag indicating that buffer memory should be
125        ///  merged
126        #[doc(alias = "GST_BUFFER_COPY_MERGE")]
127        const MERGE = ffi::GST_BUFFER_COPY_MERGE as _;
128        /// flag indicating that memory should always be copied instead of reffed
129        #[doc(alias = "GST_BUFFER_COPY_DEEP")]
130        const DEEP = ffi::GST_BUFFER_COPY_DEEP as _;
131    }
132}
133
134#[doc(hidden)]
135impl IntoGlib for BufferCopyFlags {
136    type GlibType = ffi::GstBufferCopyFlags;
137
138    #[inline]
139    fn into_glib(self) -> ffi::GstBufferCopyFlags {
140        self.bits()
141    }
142}
143
144#[doc(hidden)]
145impl FromGlib<ffi::GstBufferCopyFlags> for BufferCopyFlags {
146    #[inline]
147    unsafe fn from_glib(value: ffi::GstBufferCopyFlags) -> Self {
148        skip_assert_initialized!();
149        Self::from_bits_truncate(value)
150    }
151}
152
153impl StaticType for BufferCopyFlags {
154    #[inline]
155    #[doc(alias = "gst_buffer_copy_flags_get_type")]
156    fn static_type() -> glib::Type {
157        unsafe { from_glib(ffi::gst_buffer_copy_flags_get_type()) }
158    }
159}
160
161impl glib::HasParamSpec for BufferCopyFlags {
162    type ParamSpec = glib::ParamSpecFlags;
163    type SetValue = Self;
164    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
165
166    fn param_spec_builder() -> Self::BuilderFn {
167        Self::ParamSpec::builder
168    }
169}
170
171impl glib::value::ValueType for BufferCopyFlags {
172    type Type = Self;
173}
174
175unsafe impl<'a> glib::value::FromValue<'a> for BufferCopyFlags {
176    type Checker = glib::value::GenericValueTypeChecker<Self>;
177
178    #[inline]
179    unsafe fn from_value(value: &'a glib::Value) -> Self {
180        skip_assert_initialized!();
181        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
182    }
183}
184
185impl ToValue for BufferCopyFlags {
186    #[inline]
187    fn to_value(&self) -> glib::Value {
188        let mut value = glib::Value::for_value_type::<Self>();
189        unsafe {
190            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
191        }
192        value
193    }
194
195    #[inline]
196    fn value_type(&self) -> glib::Type {
197        Self::static_type()
198    }
199}
200
201impl From<BufferCopyFlags> for glib::Value {
202    #[inline]
203    fn from(v: BufferCopyFlags) -> Self {
204        skip_assert_initialized!();
205        ToValue::to_value(&v)
206    }
207}
208
209bitflags! {
210    /// A set of buffer flags used to describe properties of a [`Buffer`][crate::Buffer].
211    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
212    #[doc(alias = "GstBufferFlags")]
213    pub struct BufferFlags: u32 {
214        /// the buffer is live data and should be discarded in
215        ///  the PAUSED state.
216        #[doc(alias = "GST_BUFFER_FLAG_LIVE")]
217        const LIVE = ffi::GST_BUFFER_FLAG_LIVE as _;
218        /// the buffer contains data that should be dropped
219        ///  because it will be clipped against the segment
220        ///  boundaries or because it does not contain data
221        ///  that should be shown to the user.
222        #[doc(alias = "GST_BUFFER_FLAG_DECODE_ONLY")]
223        const DECODE_ONLY = ffi::GST_BUFFER_FLAG_DECODE_ONLY as _;
224        /// the buffer marks a data discontinuity in the stream.
225        ///  This typically occurs after a seek or a dropped buffer
226        ///  from a live or network source.
227        #[doc(alias = "GST_BUFFER_FLAG_DISCONT")]
228        const DISCONT = ffi::GST_BUFFER_FLAG_DISCONT as _;
229        /// the buffer timestamps might have a discontinuity
230        ///  and this buffer is a good point to resynchronize.
231        #[doc(alias = "GST_BUFFER_FLAG_RESYNC")]
232        const RESYNC = ffi::GST_BUFFER_FLAG_RESYNC as _;
233        /// the buffer data is corrupted.
234        #[doc(alias = "GST_BUFFER_FLAG_CORRUPTED")]
235        const CORRUPTED = ffi::GST_BUFFER_FLAG_CORRUPTED as _;
236        /// the buffer contains a media specific marker. for
237        ///  video this is the end of a frame boundary, for audio
238        ///  this is the start of a talkspurt. for RTP
239        ///  packets this matches the marker flag in the
240        ///  RTP packet header.
241        #[doc(alias = "GST_BUFFER_FLAG_MARKER")]
242        const MARKER = ffi::GST_BUFFER_FLAG_MARKER as _;
243        /// the buffer contains header information that is
244        ///  needed to decode the following data.
245        #[doc(alias = "GST_BUFFER_FLAG_HEADER")]
246        const HEADER = ffi::GST_BUFFER_FLAG_HEADER as _;
247        /// the buffer has been created to fill a gap in the
248        ///  stream and contains media neutral data (elements can
249        ///  switch to optimized code path that ignores the buffer
250        ///  content).
251        #[doc(alias = "GST_BUFFER_FLAG_GAP")]
252        const GAP = ffi::GST_BUFFER_FLAG_GAP as _;
253        /// the buffer can be dropped without breaking the
254        ///  stream, for example to reduce bandwidth.
255        #[doc(alias = "GST_BUFFER_FLAG_DROPPABLE")]
256        const DROPPABLE = ffi::GST_BUFFER_FLAG_DROPPABLE as _;
257        /// this unit cannot be decoded independently.
258        #[doc(alias = "GST_BUFFER_FLAG_DELTA_UNIT")]
259        const DELTA_UNIT = ffi::GST_BUFFER_FLAG_DELTA_UNIT as _;
260        /// this flag is set when memory of the buffer
261        ///  is added/removed
262        #[doc(alias = "GST_BUFFER_FLAG_TAG_MEMORY")]
263        const TAG_MEMORY = ffi::GST_BUFFER_FLAG_TAG_MEMORY as _;
264        /// Elements which write to disk or permanent storage should ensure the data
265        /// is synced after writing the contents of this buffer.
266        #[doc(alias = "GST_BUFFER_FLAG_SYNC_AFTER")]
267        const SYNC_AFTER = ffi::GST_BUFFER_FLAG_SYNC_AFTER as _;
268        /// This buffer is important and should not be dropped.
269        ///
270        /// This can be used to mark important buffers, e.g. to flag RTP packets
271        /// carrying keyframes or codec setup data for RTP Forward Error Correction
272        /// purposes, or to prevent still video frames from being dropped by elements
273        /// due to QoS.
274        #[doc(alias = "GST_BUFFER_FLAG_NON_DROPPABLE")]
275        const NON_DROPPABLE = ffi::GST_BUFFER_FLAG_NON_DROPPABLE as _;
276    }
277}
278
279#[doc(hidden)]
280impl IntoGlib for BufferFlags {
281    type GlibType = ffi::GstBufferFlags;
282
283    #[inline]
284    fn into_glib(self) -> ffi::GstBufferFlags {
285        self.bits()
286    }
287}
288
289#[doc(hidden)]
290impl FromGlib<ffi::GstBufferFlags> for BufferFlags {
291    #[inline]
292    unsafe fn from_glib(value: ffi::GstBufferFlags) -> Self {
293        skip_assert_initialized!();
294        Self::from_bits_truncate(value)
295    }
296}
297
298impl StaticType for BufferFlags {
299    #[inline]
300    #[doc(alias = "gst_buffer_flags_get_type")]
301    fn static_type() -> glib::Type {
302        unsafe { from_glib(ffi::gst_buffer_flags_get_type()) }
303    }
304}
305
306impl glib::HasParamSpec for BufferFlags {
307    type ParamSpec = glib::ParamSpecFlags;
308    type SetValue = Self;
309    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
310
311    fn param_spec_builder() -> Self::BuilderFn {
312        Self::ParamSpec::builder
313    }
314}
315
316impl glib::value::ValueType for BufferFlags {
317    type Type = Self;
318}
319
320unsafe impl<'a> glib::value::FromValue<'a> for BufferFlags {
321    type Checker = glib::value::GenericValueTypeChecker<Self>;
322
323    #[inline]
324    unsafe fn from_value(value: &'a glib::Value) -> Self {
325        skip_assert_initialized!();
326        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
327    }
328}
329
330impl ToValue for BufferFlags {
331    #[inline]
332    fn to_value(&self) -> glib::Value {
333        let mut value = glib::Value::for_value_type::<Self>();
334        unsafe {
335            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
336        }
337        value
338    }
339
340    #[inline]
341    fn value_type(&self) -> glib::Type {
342        Self::static_type()
343    }
344}
345
346impl From<BufferFlags> for glib::Value {
347    #[inline]
348    fn from(v: BufferFlags) -> Self {
349        skip_assert_initialized!();
350        ToValue::to_value(&v)
351    }
352}
353
354bitflags! {
355    /// Additional flags to control the allocation of a buffer
356    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
357    #[doc(alias = "GstBufferPoolAcquireFlags")]
358    pub struct BufferPoolAcquireFlags: u32 {
359        /// buffer is keyframe
360        #[doc(alias = "GST_BUFFER_POOL_ACQUIRE_FLAG_KEY_UNIT")]
361        const KEY_UNIT = ffi::GST_BUFFER_POOL_ACQUIRE_FLAG_KEY_UNIT as _;
362        /// when the bufferpool is empty, acquire_buffer
363        /// will by default block until a buffer is released into the pool again. Setting
364        /// this flag makes acquire_buffer return [`FlowReturn::Eos`][crate::FlowReturn::Eos] instead of blocking.
365        #[doc(alias = "GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT")]
366        const DONTWAIT = ffi::GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT as _;
367        /// buffer is discont
368        #[doc(alias = "GST_BUFFER_POOL_ACQUIRE_FLAG_DISCONT")]
369        const DISCONT = ffi::GST_BUFFER_POOL_ACQUIRE_FLAG_DISCONT as _;
370    }
371}
372
373#[doc(hidden)]
374impl IntoGlib for BufferPoolAcquireFlags {
375    type GlibType = ffi::GstBufferPoolAcquireFlags;
376
377    #[inline]
378    fn into_glib(self) -> ffi::GstBufferPoolAcquireFlags {
379        self.bits()
380    }
381}
382
383#[doc(hidden)]
384impl FromGlib<ffi::GstBufferPoolAcquireFlags> for BufferPoolAcquireFlags {
385    #[inline]
386    unsafe fn from_glib(value: ffi::GstBufferPoolAcquireFlags) -> Self {
387        skip_assert_initialized!();
388        Self::from_bits_truncate(value)
389    }
390}
391
392impl StaticType for BufferPoolAcquireFlags {
393    #[inline]
394    #[doc(alias = "gst_buffer_pool_acquire_flags_get_type")]
395    fn static_type() -> glib::Type {
396        unsafe { from_glib(ffi::gst_buffer_pool_acquire_flags_get_type()) }
397    }
398}
399
400impl glib::HasParamSpec for BufferPoolAcquireFlags {
401    type ParamSpec = glib::ParamSpecFlags;
402    type SetValue = Self;
403    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
404
405    fn param_spec_builder() -> Self::BuilderFn {
406        Self::ParamSpec::builder
407    }
408}
409
410impl glib::value::ValueType for BufferPoolAcquireFlags {
411    type Type = Self;
412}
413
414unsafe impl<'a> glib::value::FromValue<'a> for BufferPoolAcquireFlags {
415    type Checker = glib::value::GenericValueTypeChecker<Self>;
416
417    #[inline]
418    unsafe fn from_value(value: &'a glib::Value) -> Self {
419        skip_assert_initialized!();
420        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
421    }
422}
423
424impl ToValue for BufferPoolAcquireFlags {
425    #[inline]
426    fn to_value(&self) -> glib::Value {
427        let mut value = glib::Value::for_value_type::<Self>();
428        unsafe {
429            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
430        }
431        value
432    }
433
434    #[inline]
435    fn value_type(&self) -> glib::Type {
436        Self::static_type()
437    }
438}
439
440impl From<BufferPoolAcquireFlags> for glib::Value {
441    #[inline]
442    fn from(v: BufferPoolAcquireFlags) -> Self {
443        skip_assert_initialized!();
444        ToValue::to_value(&v)
445    }
446}
447
448bitflags! {
449    /// The capabilities of this clock
450    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
451    #[doc(alias = "GstClockFlags")]
452    pub struct ClockFlags: u32 {
453        /// clock can do a single sync timeout request
454        #[doc(alias = "GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC")]
455        const CAN_DO_SINGLE_SYNC = ffi::GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC as _;
456        /// clock can do a single async timeout request
457        #[doc(alias = "GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC")]
458        const CAN_DO_SINGLE_ASYNC = ffi::GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC as _;
459        /// clock can do sync periodic timeout requests
460        #[doc(alias = "GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC")]
461        const CAN_DO_PERIODIC_SYNC = ffi::GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC as _;
462        /// clock can do async periodic timeout callbacks
463        #[doc(alias = "GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC")]
464        const CAN_DO_PERIODIC_ASYNC = ffi::GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC as _;
465        /// clock's resolution can be changed
466        #[doc(alias = "GST_CLOCK_FLAG_CAN_SET_RESOLUTION")]
467        const CAN_SET_RESOLUTION = ffi::GST_CLOCK_FLAG_CAN_SET_RESOLUTION as _;
468        /// clock can be slaved to a master clock
469        #[doc(alias = "GST_CLOCK_FLAG_CAN_SET_MASTER")]
470        const CAN_SET_MASTER = ffi::GST_CLOCK_FLAG_CAN_SET_MASTER as _;
471        /// clock needs to be synced before it can be used
472        #[doc(alias = "GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC")]
473        const NEEDS_STARTUP_SYNC = ffi::GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC as _;
474    }
475}
476
477#[doc(hidden)]
478impl IntoGlib for ClockFlags {
479    type GlibType = ffi::GstClockFlags;
480
481    #[inline]
482    fn into_glib(self) -> ffi::GstClockFlags {
483        self.bits()
484    }
485}
486
487#[doc(hidden)]
488impl FromGlib<ffi::GstClockFlags> for ClockFlags {
489    #[inline]
490    unsafe fn from_glib(value: ffi::GstClockFlags) -> Self {
491        skip_assert_initialized!();
492        Self::from_bits_truncate(value)
493    }
494}
495
496impl StaticType for ClockFlags {
497    #[inline]
498    #[doc(alias = "gst_clock_flags_get_type")]
499    fn static_type() -> glib::Type {
500        unsafe { from_glib(ffi::gst_clock_flags_get_type()) }
501    }
502}
503
504impl glib::HasParamSpec for ClockFlags {
505    type ParamSpec = glib::ParamSpecFlags;
506    type SetValue = Self;
507    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
508
509    fn param_spec_builder() -> Self::BuilderFn {
510        Self::ParamSpec::builder
511    }
512}
513
514impl glib::value::ValueType for ClockFlags {
515    type Type = Self;
516}
517
518unsafe impl<'a> glib::value::FromValue<'a> for ClockFlags {
519    type Checker = glib::value::GenericValueTypeChecker<Self>;
520
521    #[inline]
522    unsafe fn from_value(value: &'a glib::Value) -> Self {
523        skip_assert_initialized!();
524        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
525    }
526}
527
528impl ToValue for ClockFlags {
529    #[inline]
530    fn to_value(&self) -> glib::Value {
531        let mut value = glib::Value::for_value_type::<Self>();
532        unsafe {
533            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
534        }
535        value
536    }
537
538    #[inline]
539    fn value_type(&self) -> glib::Type {
540        Self::static_type()
541    }
542}
543
544impl From<ClockFlags> for glib::Value {
545    #[inline]
546    fn from(v: ClockFlags) -> Self {
547        skip_assert_initialized!();
548        ToValue::to_value(&v)
549    }
550}
551
552bitflags! {
553    /// These are some terminal style flags you can use when creating your
554    /// debugging categories to make them stand out in debugging output.
555    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
556    #[doc(alias = "GstDebugColorFlags")]
557    pub struct DebugColorFlags: u32 {
558        /// Use black as foreground color.
559        #[doc(alias = "GST_DEBUG_FG_BLACK")]
560        const FG_BLACK = ffi::GST_DEBUG_FG_BLACK as _;
561        /// Use red as foreground color.
562        #[doc(alias = "GST_DEBUG_FG_RED")]
563        const FG_RED = ffi::GST_DEBUG_FG_RED as _;
564        /// Use green as foreground color.
565        #[doc(alias = "GST_DEBUG_FG_GREEN")]
566        const FG_GREEN = ffi::GST_DEBUG_FG_GREEN as _;
567        /// Use yellow as foreground color.
568        #[doc(alias = "GST_DEBUG_FG_YELLOW")]
569        const FG_YELLOW = ffi::GST_DEBUG_FG_YELLOW as _;
570        /// Use blue as foreground color.
571        #[doc(alias = "GST_DEBUG_FG_BLUE")]
572        const FG_BLUE = ffi::GST_DEBUG_FG_BLUE as _;
573        /// Use magenta as foreground color.
574        #[doc(alias = "GST_DEBUG_FG_MAGENTA")]
575        const FG_MAGENTA = ffi::GST_DEBUG_FG_MAGENTA as _;
576        /// Use cyan as foreground color.
577        #[doc(alias = "GST_DEBUG_FG_CYAN")]
578        const FG_CYAN = ffi::GST_DEBUG_FG_CYAN as _;
579        /// Use white as foreground color.
580        #[doc(alias = "GST_DEBUG_FG_WHITE")]
581        const FG_WHITE = ffi::GST_DEBUG_FG_WHITE as _;
582        /// Use black as background color.
583        #[doc(alias = "GST_DEBUG_BG_BLACK")]
584        const BG_BLACK = ffi::GST_DEBUG_BG_BLACK as _;
585        /// Use red as background color.
586        #[doc(alias = "GST_DEBUG_BG_RED")]
587        const BG_RED = ffi::GST_DEBUG_BG_RED as _;
588        /// Use green as background color.
589        #[doc(alias = "GST_DEBUG_BG_GREEN")]
590        const BG_GREEN = ffi::GST_DEBUG_BG_GREEN as _;
591        /// Use yellow as background color.
592        #[doc(alias = "GST_DEBUG_BG_YELLOW")]
593        const BG_YELLOW = ffi::GST_DEBUG_BG_YELLOW as _;
594        /// Use blue as background color.
595        #[doc(alias = "GST_DEBUG_BG_BLUE")]
596        const BG_BLUE = ffi::GST_DEBUG_BG_BLUE as _;
597        /// Use magenta as background color.
598        #[doc(alias = "GST_DEBUG_BG_MAGENTA")]
599        const BG_MAGENTA = ffi::GST_DEBUG_BG_MAGENTA as _;
600        /// Use cyan as background color.
601        #[doc(alias = "GST_DEBUG_BG_CYAN")]
602        const BG_CYAN = ffi::GST_DEBUG_BG_CYAN as _;
603        /// Use white as background color.
604        #[doc(alias = "GST_DEBUG_BG_WHITE")]
605        const BG_WHITE = ffi::GST_DEBUG_BG_WHITE as _;
606        /// Make the output bold.
607        #[doc(alias = "GST_DEBUG_BOLD")]
608        const BOLD = ffi::GST_DEBUG_BOLD as _;
609        /// Underline the output.
610        #[doc(alias = "GST_DEBUG_UNDERLINE")]
611        const UNDERLINE = ffi::GST_DEBUG_UNDERLINE as _;
612    }
613}
614
615#[doc(hidden)]
616impl IntoGlib for DebugColorFlags {
617    type GlibType = ffi::GstDebugColorFlags;
618
619    #[inline]
620    fn into_glib(self) -> ffi::GstDebugColorFlags {
621        self.bits()
622    }
623}
624
625#[doc(hidden)]
626impl FromGlib<ffi::GstDebugColorFlags> for DebugColorFlags {
627    #[inline]
628    unsafe fn from_glib(value: ffi::GstDebugColorFlags) -> Self {
629        skip_assert_initialized!();
630        Self::from_bits_truncate(value)
631    }
632}
633
634impl StaticType for DebugColorFlags {
635    #[inline]
636    #[doc(alias = "gst_debug_color_flags_get_type")]
637    fn static_type() -> glib::Type {
638        unsafe { from_glib(ffi::gst_debug_color_flags_get_type()) }
639    }
640}
641
642impl glib::HasParamSpec for DebugColorFlags {
643    type ParamSpec = glib::ParamSpecFlags;
644    type SetValue = Self;
645    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
646
647    fn param_spec_builder() -> Self::BuilderFn {
648        Self::ParamSpec::builder
649    }
650}
651
652impl glib::value::ValueType for DebugColorFlags {
653    type Type = Self;
654}
655
656unsafe impl<'a> glib::value::FromValue<'a> for DebugColorFlags {
657    type Checker = glib::value::GenericValueTypeChecker<Self>;
658
659    #[inline]
660    unsafe fn from_value(value: &'a glib::Value) -> Self {
661        skip_assert_initialized!();
662        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
663    }
664}
665
666impl ToValue for DebugColorFlags {
667    #[inline]
668    fn to_value(&self) -> glib::Value {
669        let mut value = glib::Value::for_value_type::<Self>();
670        unsafe {
671            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
672        }
673        value
674    }
675
676    #[inline]
677    fn value_type(&self) -> glib::Type {
678        Self::static_type()
679    }
680}
681
682impl From<DebugColorFlags> for glib::Value {
683    #[inline]
684    fn from(v: DebugColorFlags) -> Self {
685        skip_assert_initialized!();
686        ToValue::to_value(&v)
687    }
688}
689
690bitflags! {
691    /// Available details for pipeline graphs produced by GST_DEBUG_BIN_TO_DOT_FILE()
692    /// and GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS().
693    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
694    #[doc(alias = "GstDebugGraphDetails")]
695    pub struct DebugGraphDetails: u32 {
696        /// show caps-name on edges
697        #[doc(alias = "GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE")]
698        const MEDIA_TYPE = ffi::GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE as _;
699        /// show caps-details on edges
700        #[doc(alias = "GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS")]
701        const CAPS_DETAILS = ffi::GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS as _;
702        /// show modified parameters on
703        ///  elements. When this flag is set
704        ///  without GST_DEBUG_GRAPH_SHOW_FULL_PARAMS,
705        ///  a tooltip with full parameter values
706        ///  is added to each element.
707        #[doc(alias = "GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS")]
708        const NON_DEFAULT_PARAMS = ffi::GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS as _;
709        /// show element states
710        #[doc(alias = "GST_DEBUG_GRAPH_SHOW_STATES")]
711        const STATES = ffi::GST_DEBUG_GRAPH_SHOW_STATES as _;
712        /// show full element parameter values even
713        ///  if they are very long. When this flag is
714        ///  set, no tooltip is added since the full
715        ///  values are already visible in the label.
716        #[doc(alias = "GST_DEBUG_GRAPH_SHOW_FULL_PARAMS")]
717        const FULL_PARAMS = ffi::GST_DEBUG_GRAPH_SHOW_FULL_PARAMS as _;
718        /// show all the typical details that one might want
719        #[doc(alias = "GST_DEBUG_GRAPH_SHOW_ALL")]
720        const ALL = ffi::GST_DEBUG_GRAPH_SHOW_ALL as _;
721        /// show all details regardless of how large or
722        ///  verbose they make the resulting output
723        #[doc(alias = "GST_DEBUG_GRAPH_SHOW_VERBOSE")]
724        const VERBOSE = ffi::GST_DEBUG_GRAPH_SHOW_VERBOSE as _;
725    }
726}
727
728#[doc(hidden)]
729impl IntoGlib for DebugGraphDetails {
730    type GlibType = ffi::GstDebugGraphDetails;
731
732    #[inline]
733    fn into_glib(self) -> ffi::GstDebugGraphDetails {
734        self.bits()
735    }
736}
737
738#[doc(hidden)]
739impl FromGlib<ffi::GstDebugGraphDetails> for DebugGraphDetails {
740    #[inline]
741    unsafe fn from_glib(value: ffi::GstDebugGraphDetails) -> Self {
742        skip_assert_initialized!();
743        Self::from_bits_truncate(value)
744    }
745}
746
747impl StaticType for DebugGraphDetails {
748    #[inline]
749    #[doc(alias = "gst_debug_graph_details_get_type")]
750    fn static_type() -> glib::Type {
751        unsafe { from_glib(ffi::gst_debug_graph_details_get_type()) }
752    }
753}
754
755impl glib::HasParamSpec for DebugGraphDetails {
756    type ParamSpec = glib::ParamSpecFlags;
757    type SetValue = Self;
758    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
759
760    fn param_spec_builder() -> Self::BuilderFn {
761        Self::ParamSpec::builder
762    }
763}
764
765impl glib::value::ValueType for DebugGraphDetails {
766    type Type = Self;
767}
768
769unsafe impl<'a> glib::value::FromValue<'a> for DebugGraphDetails {
770    type Checker = glib::value::GenericValueTypeChecker<Self>;
771
772    #[inline]
773    unsafe fn from_value(value: &'a glib::Value) -> Self {
774        skip_assert_initialized!();
775        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
776    }
777}
778
779impl ToValue for DebugGraphDetails {
780    #[inline]
781    fn to_value(&self) -> glib::Value {
782        let mut value = glib::Value::for_value_type::<Self>();
783        unsafe {
784            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
785        }
786        value
787    }
788
789    #[inline]
790    fn value_type(&self) -> glib::Type {
791        Self::static_type()
792    }
793}
794
795impl From<DebugGraphDetails> for glib::Value {
796    #[inline]
797    fn from(v: DebugGraphDetails) -> Self {
798        skip_assert_initialized!();
799        ToValue::to_value(&v)
800    }
801}
802
803bitflags! {
804    /// The standard flags that an element may have.
805    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
806    #[doc(alias = "GstElementFlags")]
807    pub struct ElementFlags: u32 {
808        /// ignore state changes from parent
809        #[doc(alias = "GST_ELEMENT_FLAG_LOCKED_STATE")]
810        const LOCKED_STATE = ffi::GST_ELEMENT_FLAG_LOCKED_STATE as _;
811        /// the element is a sink
812        #[doc(alias = "GST_ELEMENT_FLAG_SINK")]
813        const SINK = ffi::GST_ELEMENT_FLAG_SINK as _;
814        /// the element is a source.
815        #[doc(alias = "GST_ELEMENT_FLAG_SOURCE")]
816        const SOURCE = ffi::GST_ELEMENT_FLAG_SOURCE as _;
817        /// the element can provide a clock
818        #[doc(alias = "GST_ELEMENT_FLAG_PROVIDE_CLOCK")]
819        const PROVIDE_CLOCK = ffi::GST_ELEMENT_FLAG_PROVIDE_CLOCK as _;
820        /// the element requires a clock
821        #[doc(alias = "GST_ELEMENT_FLAG_REQUIRE_CLOCK")]
822        const REQUIRE_CLOCK = ffi::GST_ELEMENT_FLAG_REQUIRE_CLOCK as _;
823        /// the element can use an index
824        #[doc(alias = "GST_ELEMENT_FLAG_INDEXABLE")]
825        const INDEXABLE = ffi::GST_ELEMENT_FLAG_INDEXABLE as _;
826    }
827}
828
829#[doc(hidden)]
830impl IntoGlib for ElementFlags {
831    type GlibType = ffi::GstElementFlags;
832
833    #[inline]
834    fn into_glib(self) -> ffi::GstElementFlags {
835        self.bits()
836    }
837}
838
839#[doc(hidden)]
840impl FromGlib<ffi::GstElementFlags> for ElementFlags {
841    #[inline]
842    unsafe fn from_glib(value: ffi::GstElementFlags) -> Self {
843        skip_assert_initialized!();
844        Self::from_bits_truncate(value)
845    }
846}
847
848impl StaticType for ElementFlags {
849    #[inline]
850    #[doc(alias = "gst_element_flags_get_type")]
851    fn static_type() -> glib::Type {
852        unsafe { from_glib(ffi::gst_element_flags_get_type()) }
853    }
854}
855
856impl glib::HasParamSpec for ElementFlags {
857    type ParamSpec = glib::ParamSpecFlags;
858    type SetValue = Self;
859    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
860
861    fn param_spec_builder() -> Self::BuilderFn {
862        Self::ParamSpec::builder
863    }
864}
865
866impl glib::value::ValueType for ElementFlags {
867    type Type = Self;
868}
869
870unsafe impl<'a> glib::value::FromValue<'a> for ElementFlags {
871    type Checker = glib::value::GenericValueTypeChecker<Self>;
872
873    #[inline]
874    unsafe fn from_value(value: &'a glib::Value) -> Self {
875        skip_assert_initialized!();
876        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
877    }
878}
879
880impl ToValue for ElementFlags {
881    #[inline]
882    fn to_value(&self) -> glib::Value {
883        let mut value = glib::Value::for_value_type::<Self>();
884        unsafe {
885            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
886        }
887        value
888    }
889
890    #[inline]
891    fn value_type(&self) -> glib::Type {
892        Self::static_type()
893    }
894}
895
896impl From<ElementFlags> for glib::Value {
897    #[inline]
898    fn from(v: ElementFlags) -> Self {
899        skip_assert_initialized!();
900        ToValue::to_value(&v)
901    }
902}
903
904bitflags! {
905    /// [`EventTypeFlags`][crate::EventTypeFlags] indicate the aspects of the different [`EventType`][crate::EventType]
906    /// values. You can get the type flags of a [`EventType`][crate::EventType] with the
907    /// [`EventType::flags()`][crate::EventType::flags()] function.
908    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
909    #[doc(alias = "GstEventTypeFlags")]
910    pub struct EventTypeFlags: u32 {
911        /// Set if the event can travel upstream.
912        #[doc(alias = "GST_EVENT_TYPE_UPSTREAM")]
913        const UPSTREAM = ffi::GST_EVENT_TYPE_UPSTREAM as _;
914        /// Set if the event can travel downstream.
915        #[doc(alias = "GST_EVENT_TYPE_DOWNSTREAM")]
916        const DOWNSTREAM = ffi::GST_EVENT_TYPE_DOWNSTREAM as _;
917        /// Set if the event should be serialized with data
918        ///  flow.
919        #[doc(alias = "GST_EVENT_TYPE_SERIALIZED")]
920        const SERIALIZED = ffi::GST_EVENT_TYPE_SERIALIZED as _;
921        /// Set if the event is sticky on the pads.
922        #[doc(alias = "GST_EVENT_TYPE_STICKY")]
923        const STICKY = ffi::GST_EVENT_TYPE_STICKY as _;
924        /// Multiple sticky events can be on a pad, each
925        ///  identified by the event name.
926        #[doc(alias = "GST_EVENT_TYPE_STICKY_MULTI")]
927        const STICKY_MULTI = ffi::GST_EVENT_TYPE_STICKY_MULTI as _;
928    }
929}
930
931#[doc(hidden)]
932impl IntoGlib for EventTypeFlags {
933    type GlibType = ffi::GstEventTypeFlags;
934
935    #[inline]
936    fn into_glib(self) -> ffi::GstEventTypeFlags {
937        self.bits()
938    }
939}
940
941#[doc(hidden)]
942impl FromGlib<ffi::GstEventTypeFlags> for EventTypeFlags {
943    #[inline]
944    unsafe fn from_glib(value: ffi::GstEventTypeFlags) -> Self {
945        skip_assert_initialized!();
946        Self::from_bits_truncate(value)
947    }
948}
949
950impl StaticType for EventTypeFlags {
951    #[inline]
952    #[doc(alias = "gst_event_type_flags_get_type")]
953    fn static_type() -> glib::Type {
954        unsafe { from_glib(ffi::gst_event_type_flags_get_type()) }
955    }
956}
957
958impl glib::HasParamSpec for EventTypeFlags {
959    type ParamSpec = glib::ParamSpecFlags;
960    type SetValue = Self;
961    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
962
963    fn param_spec_builder() -> Self::BuilderFn {
964        Self::ParamSpec::builder
965    }
966}
967
968impl glib::value::ValueType for EventTypeFlags {
969    type Type = Self;
970}
971
972unsafe impl<'a> glib::value::FromValue<'a> for EventTypeFlags {
973    type Checker = glib::value::GenericValueTypeChecker<Self>;
974
975    #[inline]
976    unsafe fn from_value(value: &'a glib::Value) -> Self {
977        skip_assert_initialized!();
978        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
979    }
980}
981
982impl ToValue for EventTypeFlags {
983    #[inline]
984    fn to_value(&self) -> glib::Value {
985        let mut value = glib::Value::for_value_type::<Self>();
986        unsafe {
987            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
988        }
989        value
990    }
991
992    #[inline]
993    fn value_type(&self) -> glib::Type {
994        Self::static_type()
995    }
996}
997
998impl From<EventTypeFlags> for glib::Value {
999    #[inline]
1000    fn from(v: EventTypeFlags) -> Self {
1001        skip_assert_initialized!();
1002        ToValue::to_value(&v)
1003    }
1004}
1005
1006#[cfg(feature = "v1_20")]
1007bitflags! {
1008    /// The different flags that can be set on [`EventType::Gap`][crate::EventType::Gap] events. See
1009    /// [`Event::set_gap_flags()`][crate::Event::set_gap_flags()] for details.
1010    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
1011    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1012    #[doc(alias = "GstGapFlags")]
1013    pub struct GapFlags: u32 {
1014        /// The [`EventType::Gap`][crate::EventType::Gap] signals missing data,
1015        ///  for example because of packet loss.
1016        #[doc(alias = "GST_GAP_FLAG_MISSING_DATA")]
1017        const DATA = ffi::GST_GAP_FLAG_MISSING_DATA as _;
1018    }
1019}
1020
1021#[cfg(feature = "v1_20")]
1022#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
1023#[doc(hidden)]
1024impl IntoGlib for GapFlags {
1025    type GlibType = ffi::GstGapFlags;
1026
1027    #[inline]
1028    fn into_glib(self) -> ffi::GstGapFlags {
1029        self.bits()
1030    }
1031}
1032
1033#[cfg(feature = "v1_20")]
1034#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
1035#[doc(hidden)]
1036impl FromGlib<ffi::GstGapFlags> for GapFlags {
1037    #[inline]
1038    unsafe fn from_glib(value: ffi::GstGapFlags) -> Self {
1039        skip_assert_initialized!();
1040        Self::from_bits_truncate(value)
1041    }
1042}
1043
1044#[cfg(feature = "v1_20")]
1045#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
1046impl StaticType for GapFlags {
1047    #[inline]
1048    #[doc(alias = "gst_gap_flags_get_type")]
1049    fn static_type() -> glib::Type {
1050        unsafe { from_glib(ffi::gst_gap_flags_get_type()) }
1051    }
1052}
1053
1054#[cfg(feature = "v1_20")]
1055#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
1056impl glib::HasParamSpec for GapFlags {
1057    type ParamSpec = glib::ParamSpecFlags;
1058    type SetValue = Self;
1059    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1060
1061    fn param_spec_builder() -> Self::BuilderFn {
1062        Self::ParamSpec::builder
1063    }
1064}
1065
1066#[cfg(feature = "v1_20")]
1067#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
1068impl glib::value::ValueType for GapFlags {
1069    type Type = Self;
1070}
1071
1072#[cfg(feature = "v1_20")]
1073#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
1074unsafe impl<'a> glib::value::FromValue<'a> for GapFlags {
1075    type Checker = glib::value::GenericValueTypeChecker<Self>;
1076
1077    #[inline]
1078    unsafe fn from_value(value: &'a glib::Value) -> Self {
1079        skip_assert_initialized!();
1080        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
1081    }
1082}
1083
1084#[cfg(feature = "v1_20")]
1085#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
1086impl ToValue for GapFlags {
1087    #[inline]
1088    fn to_value(&self) -> glib::Value {
1089        let mut value = glib::Value::for_value_type::<Self>();
1090        unsafe {
1091            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1092        }
1093        value
1094    }
1095
1096    #[inline]
1097    fn value_type(&self) -> glib::Type {
1098        Self::static_type()
1099    }
1100}
1101
1102#[cfg(feature = "v1_20")]
1103#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
1104impl From<GapFlags> for glib::Value {
1105    #[inline]
1106    fn from(v: GapFlags) -> Self {
1107        skip_assert_initialized!();
1108        ToValue::to_value(&v)
1109    }
1110}
1111
1112#[cfg(feature = "v1_28")]
1113bitflags! {
1114    /// Flags to control the behavior of a [`LogContext`][crate::LogContext].
1115    #[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1116    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1117    #[doc(alias = "GstLogContextFlags")]
1118    pub struct LogContextFlags: u32 {
1119        /// Enable message throttling/deduplication. This
1120        ///  makes the context track which messages have been logged already based on
1121        ///  their message hash, and only log them once (or periodically if an
1122        ///  interval is set). Without this flag, all messages will be logged regardless
1123        ///  of whether they've been logged before.
1124        #[doc(alias = "GST_LOG_CONTEXT_FLAG_THROTTLE")]
1125        const THROTTLE = ffi::GST_LOG_CONTEXT_FLAG_THROTTLE as _;
1126    }
1127}
1128
1129#[cfg(feature = "v1_28")]
1130#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1131#[doc(hidden)]
1132impl IntoGlib for LogContextFlags {
1133    type GlibType = ffi::GstLogContextFlags;
1134
1135    #[inline]
1136    fn into_glib(self) -> ffi::GstLogContextFlags {
1137        self.bits()
1138    }
1139}
1140
1141#[cfg(feature = "v1_28")]
1142#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1143#[doc(hidden)]
1144impl FromGlib<ffi::GstLogContextFlags> for LogContextFlags {
1145    #[inline]
1146    unsafe fn from_glib(value: ffi::GstLogContextFlags) -> Self {
1147        skip_assert_initialized!();
1148        Self::from_bits_truncate(value)
1149    }
1150}
1151
1152#[cfg(feature = "v1_28")]
1153#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1154impl StaticType for LogContextFlags {
1155    #[inline]
1156    #[doc(alias = "gst_log_context_flags_get_type")]
1157    fn static_type() -> glib::Type {
1158        unsafe { from_glib(ffi::gst_log_context_flags_get_type()) }
1159    }
1160}
1161
1162#[cfg(feature = "v1_28")]
1163#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1164impl glib::HasParamSpec for LogContextFlags {
1165    type ParamSpec = glib::ParamSpecFlags;
1166    type SetValue = Self;
1167    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1168
1169    fn param_spec_builder() -> Self::BuilderFn {
1170        Self::ParamSpec::builder
1171    }
1172}
1173
1174#[cfg(feature = "v1_28")]
1175#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1176impl glib::value::ValueType for LogContextFlags {
1177    type Type = Self;
1178}
1179
1180#[cfg(feature = "v1_28")]
1181#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1182unsafe impl<'a> glib::value::FromValue<'a> for LogContextFlags {
1183    type Checker = glib::value::GenericValueTypeChecker<Self>;
1184
1185    #[inline]
1186    unsafe fn from_value(value: &'a glib::Value) -> Self {
1187        skip_assert_initialized!();
1188        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
1189    }
1190}
1191
1192#[cfg(feature = "v1_28")]
1193#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1194impl ToValue for LogContextFlags {
1195    #[inline]
1196    fn to_value(&self) -> glib::Value {
1197        let mut value = glib::Value::for_value_type::<Self>();
1198        unsafe {
1199            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1200        }
1201        value
1202    }
1203
1204    #[inline]
1205    fn value_type(&self) -> glib::Type {
1206        Self::static_type()
1207    }
1208}
1209
1210#[cfg(feature = "v1_28")]
1211#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1212impl From<LogContextFlags> for glib::Value {
1213    #[inline]
1214    fn from(v: LogContextFlags) -> Self {
1215        skip_assert_initialized!();
1216        ToValue::to_value(&v)
1217    }
1218}
1219
1220#[cfg(feature = "v1_28")]
1221bitflags! {
1222    /// Flags to control how the message hash is calculated in a [`LogContext`][crate::LogContext].
1223    /// The message hash is used to determine if a message is a duplicate of a previously
1224    /// logged message.
1225    #[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1226    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1227    #[doc(alias = "GstLogContextHashFlags")]
1228    pub struct LogContextHashFlags: u32 {
1229        /// Ignore object pointer or object ID when calculating message hash
1230        #[doc(alias = "GST_LOG_CONTEXT_IGNORE_OBJECT")]
1231        const IGNORE_OBJECT = ffi::GST_LOG_CONTEXT_IGNORE_OBJECT as _;
1232        /// Ignore the "format" part of the debug
1233        /// log message
1234        #[doc(alias = "GST_LOG_CONTEXT_IGNORE_FORMAT")]
1235        const IGNORE_FORMAT = ffi::GST_LOG_CONTEXT_IGNORE_FORMAT as _;
1236        /// Ignore file name when calculating message hash
1237        #[doc(alias = "GST_LOG_CONTEXT_IGNORE_FILE")]
1238        const IGNORE_FILE = ffi::GST_LOG_CONTEXT_IGNORE_FILE as _;
1239        /// Use line number when calculating message hash (not used by default)
1240        #[doc(alias = "GST_LOG_CONTEXT_USE_LINE_NUMBER")]
1241        const USE_LINE_NUMBER = ffi::GST_LOG_CONTEXT_USE_LINE_NUMBER as _;
1242        /// Use the arguments part of the string message (not used by default)
1243        #[doc(alias = "GST_LOG_CONTEXT_USE_STRING_ARGS")]
1244        const USE_STRING_ARGS = ffi::GST_LOG_CONTEXT_USE_STRING_ARGS as _;
1245    }
1246}
1247
1248#[cfg(feature = "v1_28")]
1249#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1250#[doc(hidden)]
1251impl IntoGlib for LogContextHashFlags {
1252    type GlibType = ffi::GstLogContextHashFlags;
1253
1254    #[inline]
1255    fn into_glib(self) -> ffi::GstLogContextHashFlags {
1256        self.bits()
1257    }
1258}
1259
1260#[cfg(feature = "v1_28")]
1261#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1262#[doc(hidden)]
1263impl FromGlib<ffi::GstLogContextHashFlags> for LogContextHashFlags {
1264    #[inline]
1265    unsafe fn from_glib(value: ffi::GstLogContextHashFlags) -> Self {
1266        skip_assert_initialized!();
1267        Self::from_bits_truncate(value)
1268    }
1269}
1270
1271#[cfg(feature = "v1_28")]
1272#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1273impl StaticType for LogContextHashFlags {
1274    #[inline]
1275    #[doc(alias = "gst_log_context_hash_flags_get_type")]
1276    fn static_type() -> glib::Type {
1277        unsafe { from_glib(ffi::gst_log_context_hash_flags_get_type()) }
1278    }
1279}
1280
1281#[cfg(feature = "v1_28")]
1282#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1283impl glib::HasParamSpec for LogContextHashFlags {
1284    type ParamSpec = glib::ParamSpecFlags;
1285    type SetValue = Self;
1286    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1287
1288    fn param_spec_builder() -> Self::BuilderFn {
1289        Self::ParamSpec::builder
1290    }
1291}
1292
1293#[cfg(feature = "v1_28")]
1294#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1295impl glib::value::ValueType for LogContextHashFlags {
1296    type Type = Self;
1297}
1298
1299#[cfg(feature = "v1_28")]
1300#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1301unsafe impl<'a> glib::value::FromValue<'a> for LogContextHashFlags {
1302    type Checker = glib::value::GenericValueTypeChecker<Self>;
1303
1304    #[inline]
1305    unsafe fn from_value(value: &'a glib::Value) -> Self {
1306        skip_assert_initialized!();
1307        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
1308    }
1309}
1310
1311#[cfg(feature = "v1_28")]
1312#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1313impl ToValue for LogContextHashFlags {
1314    #[inline]
1315    fn to_value(&self) -> glib::Value {
1316        let mut value = glib::Value::for_value_type::<Self>();
1317        unsafe {
1318            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1319        }
1320        value
1321    }
1322
1323    #[inline]
1324    fn value_type(&self) -> glib::Type {
1325        Self::static_type()
1326    }
1327}
1328
1329#[cfg(feature = "v1_28")]
1330#[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
1331impl From<LogContextHashFlags> for glib::Value {
1332    #[inline]
1333    fn from(v: LogContextHashFlags) -> Self {
1334        skip_assert_initialized!();
1335        ToValue::to_value(&v)
1336    }
1337}
1338
1339bitflags! {
1340    /// Flags for wrapped memory.
1341    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1342    #[doc(alias = "GstMemoryFlags")]
1343    pub struct MemoryFlags: u32 {
1344        /// memory is readonly. It is not allowed to map the
1345        /// memory with `GST_MAP_WRITE`.
1346        #[doc(alias = "GST_MEMORY_FLAG_READONLY")]
1347        const READONLY = ffi::GST_MEMORY_FLAG_READONLY as _;
1348        /// memory must not be shared. Copies will have to be
1349        /// made when this memory needs to be shared between buffers. (DEPRECATED:
1350        /// do not use in new code, instead you should create a custom GstAllocator for
1351        /// memory pooling instead of relying on the GstBuffer they were originally
1352        /// attached to.)
1353        #[doc(alias = "GST_MEMORY_FLAG_NO_SHARE")]
1354        const NO_SHARE = ffi::GST_MEMORY_FLAG_NO_SHARE as _;
1355        /// the memory prefix is filled with 0 bytes
1356        #[doc(alias = "GST_MEMORY_FLAG_ZERO_PREFIXED")]
1357        const ZERO_PREFIXED = ffi::GST_MEMORY_FLAG_ZERO_PREFIXED as _;
1358        /// the memory padding is filled with 0 bytes
1359        #[doc(alias = "GST_MEMORY_FLAG_ZERO_PADDED")]
1360        const ZERO_PADDED = ffi::GST_MEMORY_FLAG_ZERO_PADDED as _;
1361        /// the memory is physically
1362        /// contiguous. (Since: 1.2)
1363        #[doc(alias = "GST_MEMORY_FLAG_PHYSICALLY_CONTIGUOUS")]
1364        const PHYSICALLY_CONTIGUOUS = ffi::GST_MEMORY_FLAG_PHYSICALLY_CONTIGUOUS as _;
1365        /// the memory can't be mapped via
1366        /// [`Memory::into_mapped_memory_readable()`][crate::Memory::into_mapped_memory_readable()] without any preconditions. (Since: 1.2)
1367        #[doc(alias = "GST_MEMORY_FLAG_NOT_MAPPABLE")]
1368        const NOT_MAPPABLE = ffi::GST_MEMORY_FLAG_NOT_MAPPABLE as _;
1369    }
1370}
1371
1372#[doc(hidden)]
1373impl IntoGlib for MemoryFlags {
1374    type GlibType = ffi::GstMemoryFlags;
1375
1376    #[inline]
1377    fn into_glib(self) -> ffi::GstMemoryFlags {
1378        self.bits()
1379    }
1380}
1381
1382#[doc(hidden)]
1383impl FromGlib<ffi::GstMemoryFlags> for MemoryFlags {
1384    #[inline]
1385    unsafe fn from_glib(value: ffi::GstMemoryFlags) -> Self {
1386        skip_assert_initialized!();
1387        Self::from_bits_truncate(value)
1388    }
1389}
1390
1391impl StaticType for MemoryFlags {
1392    #[inline]
1393    #[doc(alias = "gst_memory_flags_get_type")]
1394    fn static_type() -> glib::Type {
1395        unsafe { from_glib(ffi::gst_memory_flags_get_type()) }
1396    }
1397}
1398
1399impl glib::HasParamSpec for MemoryFlags {
1400    type ParamSpec = glib::ParamSpecFlags;
1401    type SetValue = Self;
1402    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1403
1404    fn param_spec_builder() -> Self::BuilderFn {
1405        Self::ParamSpec::builder
1406    }
1407}
1408
1409impl glib::value::ValueType for MemoryFlags {
1410    type Type = Self;
1411}
1412
1413unsafe impl<'a> glib::value::FromValue<'a> for MemoryFlags {
1414    type Checker = glib::value::GenericValueTypeChecker<Self>;
1415
1416    #[inline]
1417    unsafe fn from_value(value: &'a glib::Value) -> Self {
1418        skip_assert_initialized!();
1419        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
1420    }
1421}
1422
1423impl ToValue for MemoryFlags {
1424    #[inline]
1425    fn to_value(&self) -> glib::Value {
1426        let mut value = glib::Value::for_value_type::<Self>();
1427        unsafe {
1428            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1429        }
1430        value
1431    }
1432
1433    #[inline]
1434    fn value_type(&self) -> glib::Type {
1435        Self::static_type()
1436    }
1437}
1438
1439impl From<MemoryFlags> for glib::Value {
1440    #[inline]
1441    fn from(v: MemoryFlags) -> Self {
1442        skip_assert_initialized!();
1443        ToValue::to_value(&v)
1444    }
1445}
1446
1447bitflags! {
1448    /// Extra metadata flags.
1449    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1450    #[doc(alias = "GstMetaFlags")]
1451    pub struct MetaFlags: u32 {
1452        /// metadata should not be modified
1453        #[doc(alias = "GST_META_FLAG_READONLY")]
1454        const READONLY = ffi::GST_META_FLAG_READONLY as _;
1455        /// metadata is managed by a bufferpool
1456        #[doc(alias = "GST_META_FLAG_POOLED")]
1457        const POOLED = ffi::GST_META_FLAG_POOLED as _;
1458        /// metadata should not be removed
1459        #[doc(alias = "GST_META_FLAG_LOCKED")]
1460        const LOCKED = ffi::GST_META_FLAG_LOCKED as _;
1461    }
1462}
1463
1464#[doc(hidden)]
1465impl IntoGlib for MetaFlags {
1466    type GlibType = ffi::GstMetaFlags;
1467
1468    #[inline]
1469    fn into_glib(self) -> ffi::GstMetaFlags {
1470        self.bits()
1471    }
1472}
1473
1474#[doc(hidden)]
1475impl FromGlib<ffi::GstMetaFlags> for MetaFlags {
1476    #[inline]
1477    unsafe fn from_glib(value: ffi::GstMetaFlags) -> Self {
1478        skip_assert_initialized!();
1479        Self::from_bits_truncate(value)
1480    }
1481}
1482
1483impl StaticType for MetaFlags {
1484    #[inline]
1485    #[doc(alias = "gst_meta_flags_get_type")]
1486    fn static_type() -> glib::Type {
1487        unsafe { from_glib(ffi::gst_meta_flags_get_type()) }
1488    }
1489}
1490
1491impl glib::HasParamSpec for MetaFlags {
1492    type ParamSpec = glib::ParamSpecFlags;
1493    type SetValue = Self;
1494    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1495
1496    fn param_spec_builder() -> Self::BuilderFn {
1497        Self::ParamSpec::builder
1498    }
1499}
1500
1501impl glib::value::ValueType for MetaFlags {
1502    type Type = Self;
1503}
1504
1505unsafe impl<'a> glib::value::FromValue<'a> for MetaFlags {
1506    type Checker = glib::value::GenericValueTypeChecker<Self>;
1507
1508    #[inline]
1509    unsafe fn from_value(value: &'a glib::Value) -> Self {
1510        skip_assert_initialized!();
1511        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
1512    }
1513}
1514
1515impl ToValue for MetaFlags {
1516    #[inline]
1517    fn to_value(&self) -> glib::Value {
1518        let mut value = glib::Value::for_value_type::<Self>();
1519        unsafe {
1520            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1521        }
1522        value
1523    }
1524
1525    #[inline]
1526    fn value_type(&self) -> glib::Type {
1527        Self::static_type()
1528    }
1529}
1530
1531impl From<MetaFlags> for glib::Value {
1532    #[inline]
1533    fn from(v: MetaFlags) -> Self {
1534        skip_assert_initialized!();
1535        ToValue::to_value(&v)
1536    }
1537}
1538
1539bitflags! {
1540    /// The standard flags that an gstobject may have.
1541    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1542    #[doc(alias = "GstObjectFlags")]
1543    pub struct ObjectFlags: u32 {
1544        /// the object is expected to stay alive even
1545        /// after `gst_deinit()` has been called and so should be ignored by leak
1546        /// detection tools. (Since: 1.10)
1547        #[doc(alias = "GST_OBJECT_FLAG_MAY_BE_LEAKED")]
1548        const MAY_BE_LEAKED = ffi::GST_OBJECT_FLAG_MAY_BE_LEAKED as _;
1549        /// Flag that's set when the object has been constructed. This can be used by
1550        /// API such as base class setters to differentiate between the case where
1551        /// they're called from a subclass's instance init function (and where the
1552        /// object isn't fully constructed yet, and so one shouldn't do anything but
1553        /// set values in the instance structure), and the case where the object is
1554        /// constructed.
1555        #[cfg(feature = "v1_24")]
1556        #[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
1557        #[doc(alias = "GST_OBJECT_FLAG_CONSTRUCTED")]
1558        const CONSTRUCTED = ffi::GST_OBJECT_FLAG_CONSTRUCTED as _;
1559    }
1560}
1561
1562#[doc(hidden)]
1563impl IntoGlib for ObjectFlags {
1564    type GlibType = ffi::GstObjectFlags;
1565
1566    #[inline]
1567    fn into_glib(self) -> ffi::GstObjectFlags {
1568        self.bits()
1569    }
1570}
1571
1572#[doc(hidden)]
1573impl FromGlib<ffi::GstObjectFlags> for ObjectFlags {
1574    #[inline]
1575    unsafe fn from_glib(value: ffi::GstObjectFlags) -> Self {
1576        skip_assert_initialized!();
1577        Self::from_bits_truncate(value)
1578    }
1579}
1580
1581impl StaticType for ObjectFlags {
1582    #[inline]
1583    #[doc(alias = "gst_object_flags_get_type")]
1584    fn static_type() -> glib::Type {
1585        unsafe { from_glib(ffi::gst_object_flags_get_type()) }
1586    }
1587}
1588
1589impl glib::HasParamSpec for ObjectFlags {
1590    type ParamSpec = glib::ParamSpecFlags;
1591    type SetValue = Self;
1592    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1593
1594    fn param_spec_builder() -> Self::BuilderFn {
1595        Self::ParamSpec::builder
1596    }
1597}
1598
1599impl glib::value::ValueType for ObjectFlags {
1600    type Type = Self;
1601}
1602
1603unsafe impl<'a> glib::value::FromValue<'a> for ObjectFlags {
1604    type Checker = glib::value::GenericValueTypeChecker<Self>;
1605
1606    #[inline]
1607    unsafe fn from_value(value: &'a glib::Value) -> Self {
1608        skip_assert_initialized!();
1609        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
1610    }
1611}
1612
1613impl ToValue for ObjectFlags {
1614    #[inline]
1615    fn to_value(&self) -> glib::Value {
1616        let mut value = glib::Value::for_value_type::<Self>();
1617        unsafe {
1618            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1619        }
1620        value
1621    }
1622
1623    #[inline]
1624    fn value_type(&self) -> glib::Type {
1625        Self::static_type()
1626    }
1627}
1628
1629impl From<ObjectFlags> for glib::Value {
1630    #[inline]
1631    fn from(v: ObjectFlags) -> Self {
1632        skip_assert_initialized!();
1633        ToValue::to_value(&v)
1634    }
1635}
1636
1637bitflags! {
1638    /// Pad state flags
1639    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1640    #[doc(alias = "GstPadFlags")]
1641    pub struct PadFlags: u32 {
1642        /// is dataflow on a pad blocked
1643        #[doc(alias = "GST_PAD_FLAG_BLOCKED")]
1644        const BLOCKED = ffi::GST_PAD_FLAG_BLOCKED as _;
1645        /// is pad flushing
1646        #[doc(alias = "GST_PAD_FLAG_FLUSHING")]
1647        const FLUSHING = ffi::GST_PAD_FLAG_FLUSHING as _;
1648        /// is pad in EOS state
1649        #[doc(alias = "GST_PAD_FLAG_EOS")]
1650        const EOS = ffi::GST_PAD_FLAG_EOS as _;
1651        /// is pad currently blocking on a buffer or event
1652        #[doc(alias = "GST_PAD_FLAG_BLOCKING")]
1653        const BLOCKING = ffi::GST_PAD_FLAG_BLOCKING as _;
1654        /// ensure that there is a parent object before calling
1655        ///  into the pad callbacks.
1656        #[doc(alias = "GST_PAD_FLAG_NEED_PARENT")]
1657        const NEED_PARENT = ffi::GST_PAD_FLAG_NEED_PARENT as _;
1658        /// the pad should be reconfigured/renegotiated.
1659        ///  The flag has to be unset manually after
1660        ///  reconfiguration happened.
1661        #[doc(alias = "GST_PAD_FLAG_NEED_RECONFIGURE")]
1662        const NEED_RECONFIGURE = ffi::GST_PAD_FLAG_NEED_RECONFIGURE as _;
1663        /// the pad has pending events
1664        #[doc(alias = "GST_PAD_FLAG_PENDING_EVENTS")]
1665        const PENDING_EVENTS = ffi::GST_PAD_FLAG_PENDING_EVENTS as _;
1666        /// the pad is using fixed caps. This means that
1667        ///  once the caps are set on the pad, the default caps query function
1668        ///  will only return those caps.
1669        #[doc(alias = "GST_PAD_FLAG_FIXED_CAPS")]
1670        const FIXED_CAPS = ffi::GST_PAD_FLAG_FIXED_CAPS as _;
1671        /// the default event and query handler will forward
1672        ///  all events and queries to the internally linked pads
1673        ///  instead of discarding them.
1674        #[doc(alias = "GST_PAD_FLAG_PROXY_CAPS")]
1675        const PROXY_CAPS = ffi::GST_PAD_FLAG_PROXY_CAPS as _;
1676        /// the default query handler will forward
1677        ///  allocation queries to the internally linked pads
1678        ///  instead of discarding them.
1679        #[doc(alias = "GST_PAD_FLAG_PROXY_ALLOCATION")]
1680        const PROXY_ALLOCATION = ffi::GST_PAD_FLAG_PROXY_ALLOCATION as _;
1681        /// the default query handler will forward
1682        ///  scheduling queries to the internally linked pads
1683        ///  instead of discarding them.
1684        #[doc(alias = "GST_PAD_FLAG_PROXY_SCHEDULING")]
1685        const PROXY_SCHEDULING = ffi::GST_PAD_FLAG_PROXY_SCHEDULING as _;
1686        /// the default accept-caps handler will check
1687        ///  it the caps intersect the query-caps result instead
1688        ///  of checking for a subset. This is interesting for
1689        ///  parsers that can accept incompletely specified caps.
1690        #[doc(alias = "GST_PAD_FLAG_ACCEPT_INTERSECT")]
1691        const ACCEPT_INTERSECT = ffi::GST_PAD_FLAG_ACCEPT_INTERSECT as _;
1692        /// the default accept-caps handler will use
1693        ///  the template pad caps instead of query caps to
1694        ///  compare with the accept caps. Use this in combination
1695        ///  with [`ACCEPT_INTERSECT`][Self::ACCEPT_INTERSECT]. (Since: 1.6)
1696        #[doc(alias = "GST_PAD_FLAG_ACCEPT_TEMPLATE")]
1697        const ACCEPT_TEMPLATE = ffi::GST_PAD_FLAG_ACCEPT_TEMPLATE as _;
1698    }
1699}
1700
1701#[doc(hidden)]
1702impl IntoGlib for PadFlags {
1703    type GlibType = ffi::GstPadFlags;
1704
1705    #[inline]
1706    fn into_glib(self) -> ffi::GstPadFlags {
1707        self.bits()
1708    }
1709}
1710
1711#[doc(hidden)]
1712impl FromGlib<ffi::GstPadFlags> for PadFlags {
1713    #[inline]
1714    unsafe fn from_glib(value: ffi::GstPadFlags) -> Self {
1715        skip_assert_initialized!();
1716        Self::from_bits_truncate(value)
1717    }
1718}
1719
1720impl StaticType for PadFlags {
1721    #[inline]
1722    #[doc(alias = "gst_pad_flags_get_type")]
1723    fn static_type() -> glib::Type {
1724        unsafe { from_glib(ffi::gst_pad_flags_get_type()) }
1725    }
1726}
1727
1728impl glib::HasParamSpec for PadFlags {
1729    type ParamSpec = glib::ParamSpecFlags;
1730    type SetValue = Self;
1731    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1732
1733    fn param_spec_builder() -> Self::BuilderFn {
1734        Self::ParamSpec::builder
1735    }
1736}
1737
1738impl glib::value::ValueType for PadFlags {
1739    type Type = Self;
1740}
1741
1742unsafe impl<'a> glib::value::FromValue<'a> for PadFlags {
1743    type Checker = glib::value::GenericValueTypeChecker<Self>;
1744
1745    #[inline]
1746    unsafe fn from_value(value: &'a glib::Value) -> Self {
1747        skip_assert_initialized!();
1748        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
1749    }
1750}
1751
1752impl ToValue for PadFlags {
1753    #[inline]
1754    fn to_value(&self) -> glib::Value {
1755        let mut value = glib::Value::for_value_type::<Self>();
1756        unsafe {
1757            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1758        }
1759        value
1760    }
1761
1762    #[inline]
1763    fn value_type(&self) -> glib::Type {
1764        Self::static_type()
1765    }
1766}
1767
1768impl From<PadFlags> for glib::Value {
1769    #[inline]
1770    fn from(v: PadFlags) -> Self {
1771        skip_assert_initialized!();
1772        ToValue::to_value(&v)
1773    }
1774}
1775
1776bitflags! {
1777    ///  for linking the pads.
1778    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1779    #[doc(alias = "GstPadLinkCheck")]
1780    pub struct PadLinkCheck: u32 {
1781        /// Check the pads have same parents/grandparents.
1782        ///  Could be omitted if it is already known that the two elements that own the
1783        ///  pads are in the same bin.
1784        #[doc(alias = "GST_PAD_LINK_CHECK_HIERARCHY")]
1785        const HIERARCHY = ffi::GST_PAD_LINK_CHECK_HIERARCHY as _;
1786        /// Check if the pads are compatible by using
1787        ///  their template caps. This is much faster than [`CAPS`][Self::CAPS], but
1788        ///  would be unsafe e.g. if one pad has `GST_CAPS_ANY`.
1789        #[doc(alias = "GST_PAD_LINK_CHECK_TEMPLATE_CAPS")]
1790        const TEMPLATE_CAPS = ffi::GST_PAD_LINK_CHECK_TEMPLATE_CAPS as _;
1791        /// Check if the pads are compatible by comparing the
1792        ///  caps returned by [`PadExt::query_caps()`][crate::prelude::PadExt::query_caps()].
1793        #[doc(alias = "GST_PAD_LINK_CHECK_CAPS")]
1794        const CAPS = ffi::GST_PAD_LINK_CHECK_CAPS as _;
1795        /// Disables pushing a reconfigure event when pads are
1796        ///  linked.
1797        #[doc(alias = "GST_PAD_LINK_CHECK_NO_RECONFIGURE")]
1798        const NO_RECONFIGURE = ffi::GST_PAD_LINK_CHECK_NO_RECONFIGURE as _;
1799        /// The default checks done when linking
1800        ///  pads (i.e. the ones used by [`PadExt::link()`][crate::prelude::PadExt::link()]).
1801        #[doc(alias = "GST_PAD_LINK_CHECK_DEFAULT")]
1802        const DEFAULT = ffi::GST_PAD_LINK_CHECK_DEFAULT as _;
1803    }
1804}
1805
1806#[doc(hidden)]
1807impl IntoGlib for PadLinkCheck {
1808    type GlibType = ffi::GstPadLinkCheck;
1809
1810    #[inline]
1811    fn into_glib(self) -> ffi::GstPadLinkCheck {
1812        self.bits()
1813    }
1814}
1815
1816#[doc(hidden)]
1817impl FromGlib<ffi::GstPadLinkCheck> for PadLinkCheck {
1818    #[inline]
1819    unsafe fn from_glib(value: ffi::GstPadLinkCheck) -> Self {
1820        skip_assert_initialized!();
1821        Self::from_bits_truncate(value)
1822    }
1823}
1824
1825impl StaticType for PadLinkCheck {
1826    #[inline]
1827    #[doc(alias = "gst_pad_link_check_get_type")]
1828    fn static_type() -> glib::Type {
1829        unsafe { from_glib(ffi::gst_pad_link_check_get_type()) }
1830    }
1831}
1832
1833impl glib::HasParamSpec for PadLinkCheck {
1834    type ParamSpec = glib::ParamSpecFlags;
1835    type SetValue = Self;
1836    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1837
1838    fn param_spec_builder() -> Self::BuilderFn {
1839        Self::ParamSpec::builder
1840    }
1841}
1842
1843impl glib::value::ValueType for PadLinkCheck {
1844    type Type = Self;
1845}
1846
1847unsafe impl<'a> glib::value::FromValue<'a> for PadLinkCheck {
1848    type Checker = glib::value::GenericValueTypeChecker<Self>;
1849
1850    #[inline]
1851    unsafe fn from_value(value: &'a glib::Value) -> Self {
1852        skip_assert_initialized!();
1853        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
1854    }
1855}
1856
1857impl ToValue for PadLinkCheck {
1858    #[inline]
1859    fn to_value(&self) -> glib::Value {
1860        let mut value = glib::Value::for_value_type::<Self>();
1861        unsafe {
1862            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1863        }
1864        value
1865    }
1866
1867    #[inline]
1868    fn value_type(&self) -> glib::Type {
1869        Self::static_type()
1870    }
1871}
1872
1873impl From<PadLinkCheck> for glib::Value {
1874    #[inline]
1875    fn from(v: PadLinkCheck) -> Self {
1876        skip_assert_initialized!();
1877        ToValue::to_value(&v)
1878    }
1879}
1880
1881bitflags! {
1882    /// The different probing types that can occur. When either one of
1883    /// [`IDLE`][Self::IDLE] or [`BLOCK`][Self::BLOCK] is used, the probe will be a
1884    /// blocking probe.
1885    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1886    #[doc(alias = "GstPadProbeType")]
1887    pub struct PadProbeType: u32 {
1888        /// probe idle pads and block while the callback is called
1889        #[doc(alias = "GST_PAD_PROBE_TYPE_IDLE")]
1890        const IDLE = ffi::GST_PAD_PROBE_TYPE_IDLE as _;
1891        /// probe and block pads
1892        #[doc(alias = "GST_PAD_PROBE_TYPE_BLOCK")]
1893        const BLOCK = ffi::GST_PAD_PROBE_TYPE_BLOCK as _;
1894        /// probe buffers
1895        #[doc(alias = "GST_PAD_PROBE_TYPE_BUFFER")]
1896        const BUFFER = ffi::GST_PAD_PROBE_TYPE_BUFFER as _;
1897        /// probe buffer lists
1898        #[doc(alias = "GST_PAD_PROBE_TYPE_BUFFER_LIST")]
1899        const BUFFER_LIST = ffi::GST_PAD_PROBE_TYPE_BUFFER_LIST as _;
1900        /// probe downstream events
1901        #[doc(alias = "GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM")]
1902        const EVENT_DOWNSTREAM = ffi::GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM as _;
1903        /// probe upstream events
1904        #[doc(alias = "GST_PAD_PROBE_TYPE_EVENT_UPSTREAM")]
1905        const EVENT_UPSTREAM = ffi::GST_PAD_PROBE_TYPE_EVENT_UPSTREAM as _;
1906        /// probe flush events. This probe has to be
1907        ///  explicitly enabled and is not included in the
1908        ///  @[`EVENT_DOWNSTREAM`][Self::EVENT_DOWNSTREAM] or
1909        ///  @[`EVENT_UPSTREAM`][Self::EVENT_UPSTREAM] probe types.
1910        #[doc(alias = "GST_PAD_PROBE_TYPE_EVENT_FLUSH")]
1911        const EVENT_FLUSH = ffi::GST_PAD_PROBE_TYPE_EVENT_FLUSH as _;
1912        /// probe downstream queries
1913        #[doc(alias = "GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM")]
1914        const QUERY_DOWNSTREAM = ffi::GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM as _;
1915        /// probe upstream queries
1916        #[doc(alias = "GST_PAD_PROBE_TYPE_QUERY_UPSTREAM")]
1917        const QUERY_UPSTREAM = ffi::GST_PAD_PROBE_TYPE_QUERY_UPSTREAM as _;
1918        /// probe push
1919        #[doc(alias = "GST_PAD_PROBE_TYPE_PUSH")]
1920        const PUSH = ffi::GST_PAD_PROBE_TYPE_PUSH as _;
1921        /// probe pull
1922        #[doc(alias = "GST_PAD_PROBE_TYPE_PULL")]
1923        const PULL = ffi::GST_PAD_PROBE_TYPE_PULL as _;
1924        /// probe and block at the next opportunity, at data flow or when idle
1925        #[doc(alias = "GST_PAD_PROBE_TYPE_BLOCKING")]
1926        const BLOCKING = ffi::GST_PAD_PROBE_TYPE_BLOCKING as _;
1927        /// probe downstream data (buffers, buffer lists, and events)
1928        #[doc(alias = "GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM")]
1929        const DATA_DOWNSTREAM = ffi::GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM as _;
1930        /// probe upstream data (events)
1931        #[doc(alias = "GST_PAD_PROBE_TYPE_DATA_UPSTREAM")]
1932        const DATA_UPSTREAM = ffi::GST_PAD_PROBE_TYPE_DATA_UPSTREAM as _;
1933        /// probe upstream and downstream data (buffers, buffer lists, and events)
1934        #[doc(alias = "GST_PAD_PROBE_TYPE_DATA_BOTH")]
1935        const DATA_BOTH = ffi::GST_PAD_PROBE_TYPE_DATA_BOTH as _;
1936        /// probe and block downstream data (buffers, buffer lists, and events)
1937        #[doc(alias = "GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM")]
1938        const BLOCK_DOWNSTREAM = ffi::GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM as _;
1939        /// probe and block upstream data (events)
1940        #[doc(alias = "GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM")]
1941        const BLOCK_UPSTREAM = ffi::GST_PAD_PROBE_TYPE_BLOCK_UPSTREAM as _;
1942        /// probe upstream and downstream events
1943        #[doc(alias = "GST_PAD_PROBE_TYPE_EVENT_BOTH")]
1944        const EVENT_BOTH = ffi::GST_PAD_PROBE_TYPE_EVENT_BOTH as _;
1945        /// probe upstream and downstream queries
1946        #[doc(alias = "GST_PAD_PROBE_TYPE_QUERY_BOTH")]
1947        const QUERY_BOTH = ffi::GST_PAD_PROBE_TYPE_QUERY_BOTH as _;
1948        /// probe upstream events and queries and downstream buffers, buffer lists, events and queries
1949        #[doc(alias = "GST_PAD_PROBE_TYPE_ALL_BOTH")]
1950        const ALL_BOTH = ffi::GST_PAD_PROBE_TYPE_ALL_BOTH as _;
1951        /// probe push and pull
1952        #[doc(alias = "GST_PAD_PROBE_TYPE_SCHEDULING")]
1953        const SCHEDULING = ffi::GST_PAD_PROBE_TYPE_SCHEDULING as _;
1954    }
1955}
1956
1957#[doc(hidden)]
1958impl IntoGlib for PadProbeType {
1959    type GlibType = ffi::GstPadProbeType;
1960
1961    #[inline]
1962    fn into_glib(self) -> ffi::GstPadProbeType {
1963        self.bits()
1964    }
1965}
1966
1967#[doc(hidden)]
1968impl FromGlib<ffi::GstPadProbeType> for PadProbeType {
1969    #[inline]
1970    unsafe fn from_glib(value: ffi::GstPadProbeType) -> Self {
1971        skip_assert_initialized!();
1972        Self::from_bits_truncate(value)
1973    }
1974}
1975
1976impl StaticType for PadProbeType {
1977    #[inline]
1978    #[doc(alias = "gst_pad_probe_type_get_type")]
1979    fn static_type() -> glib::Type {
1980        unsafe { from_glib(ffi::gst_pad_probe_type_get_type()) }
1981    }
1982}
1983
1984impl glib::HasParamSpec for PadProbeType {
1985    type ParamSpec = glib::ParamSpecFlags;
1986    type SetValue = Self;
1987    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1988
1989    fn param_spec_builder() -> Self::BuilderFn {
1990        Self::ParamSpec::builder
1991    }
1992}
1993
1994impl glib::value::ValueType for PadProbeType {
1995    type Type = Self;
1996}
1997
1998unsafe impl<'a> glib::value::FromValue<'a> for PadProbeType {
1999    type Checker = glib::value::GenericValueTypeChecker<Self>;
2000
2001    #[inline]
2002    unsafe fn from_value(value: &'a glib::Value) -> Self {
2003        skip_assert_initialized!();
2004        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
2005    }
2006}
2007
2008impl ToValue for PadProbeType {
2009    #[inline]
2010    fn to_value(&self) -> glib::Value {
2011        let mut value = glib::Value::for_value_type::<Self>();
2012        unsafe {
2013            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2014        }
2015        value
2016    }
2017
2018    #[inline]
2019    fn value_type(&self) -> glib::Type {
2020        Self::static_type()
2021    }
2022}
2023
2024impl From<PadProbeType> for glib::Value {
2025    #[inline]
2026    fn from(v: PadProbeType) -> Self {
2027        skip_assert_initialized!();
2028        ToValue::to_value(&v)
2029    }
2030}
2031
2032bitflags! {
2033    /// Parsing options.
2034    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2035    #[doc(alias = "GstParseFlags")]
2036    pub struct ParseFlags: u32 {
2037        /// Always return [`None`] when an error occurs
2038        ///  (default behaviour is to return partially constructed bins or elements
2039        ///  in some cases)
2040        #[doc(alias = "GST_PARSE_FLAG_FATAL_ERRORS")]
2041        const FATAL_ERRORS = ffi::GST_PARSE_FLAG_FATAL_ERRORS as _;
2042        /// If a bin only has a single element,
2043        ///  just return the element.
2044        #[doc(alias = "GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS")]
2045        const NO_SINGLE_ELEMENT_BINS = ffi::GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS as _;
2046        /// If more than one toplevel element is described
2047        ///  by the pipeline description string, put them in a [`Bin`][crate::Bin] instead of a
2048        ///  [`Pipeline`][crate::Pipeline]. (Since: 1.10)
2049        #[doc(alias = "GST_PARSE_FLAG_PLACE_IN_BIN")]
2050        const PLACE_IN_BIN = ffi::GST_PARSE_FLAG_PLACE_IN_BIN as _;
2051    }
2052}
2053
2054#[doc(hidden)]
2055impl IntoGlib for ParseFlags {
2056    type GlibType = ffi::GstParseFlags;
2057
2058    #[inline]
2059    fn into_glib(self) -> ffi::GstParseFlags {
2060        self.bits()
2061    }
2062}
2063
2064#[doc(hidden)]
2065impl FromGlib<ffi::GstParseFlags> for ParseFlags {
2066    #[inline]
2067    unsafe fn from_glib(value: ffi::GstParseFlags) -> Self {
2068        skip_assert_initialized!();
2069        Self::from_bits_truncate(value)
2070    }
2071}
2072
2073impl StaticType for ParseFlags {
2074    #[inline]
2075    #[doc(alias = "gst_parse_flags_get_type")]
2076    fn static_type() -> glib::Type {
2077        unsafe { from_glib(ffi::gst_parse_flags_get_type()) }
2078    }
2079}
2080
2081impl glib::HasParamSpec for ParseFlags {
2082    type ParamSpec = glib::ParamSpecFlags;
2083    type SetValue = Self;
2084    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2085
2086    fn param_spec_builder() -> Self::BuilderFn {
2087        Self::ParamSpec::builder
2088    }
2089}
2090
2091impl glib::value::ValueType for ParseFlags {
2092    type Type = Self;
2093}
2094
2095unsafe impl<'a> glib::value::FromValue<'a> for ParseFlags {
2096    type Checker = glib::value::GenericValueTypeChecker<Self>;
2097
2098    #[inline]
2099    unsafe fn from_value(value: &'a glib::Value) -> Self {
2100        skip_assert_initialized!();
2101        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
2102    }
2103}
2104
2105impl ToValue for ParseFlags {
2106    #[inline]
2107    fn to_value(&self) -> glib::Value {
2108        let mut value = glib::Value::for_value_type::<Self>();
2109        unsafe {
2110            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2111        }
2112        value
2113    }
2114
2115    #[inline]
2116    fn value_type(&self) -> glib::Type {
2117        Self::static_type()
2118    }
2119}
2120
2121impl From<ParseFlags> for glib::Value {
2122    #[inline]
2123    fn from(v: ParseFlags) -> Self {
2124        skip_assert_initialized!();
2125        ToValue::to_value(&v)
2126    }
2127}
2128
2129bitflags! {
2130    /// Pipeline flags
2131    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2132    #[doc(alias = "GstPipelineFlags")]
2133    pub struct PipelineFlags: u32 {
2134        /// this pipeline works with a fixed clock
2135        #[doc(alias = "GST_PIPELINE_FLAG_FIXED_CLOCK")]
2136        const FIXED_CLOCK = ffi::GST_PIPELINE_FLAG_FIXED_CLOCK as _;
2137    }
2138}
2139
2140#[doc(hidden)]
2141impl IntoGlib for PipelineFlags {
2142    type GlibType = ffi::GstPipelineFlags;
2143
2144    #[inline]
2145    fn into_glib(self) -> ffi::GstPipelineFlags {
2146        self.bits()
2147    }
2148}
2149
2150#[doc(hidden)]
2151impl FromGlib<ffi::GstPipelineFlags> for PipelineFlags {
2152    #[inline]
2153    unsafe fn from_glib(value: ffi::GstPipelineFlags) -> Self {
2154        skip_assert_initialized!();
2155        Self::from_bits_truncate(value)
2156    }
2157}
2158
2159impl StaticType for PipelineFlags {
2160    #[inline]
2161    #[doc(alias = "gst_pipeline_flags_get_type")]
2162    fn static_type() -> glib::Type {
2163        unsafe { from_glib(ffi::gst_pipeline_flags_get_type()) }
2164    }
2165}
2166
2167impl glib::HasParamSpec for PipelineFlags {
2168    type ParamSpec = glib::ParamSpecFlags;
2169    type SetValue = Self;
2170    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2171
2172    fn param_spec_builder() -> Self::BuilderFn {
2173        Self::ParamSpec::builder
2174    }
2175}
2176
2177impl glib::value::ValueType for PipelineFlags {
2178    type Type = Self;
2179}
2180
2181unsafe impl<'a> glib::value::FromValue<'a> for PipelineFlags {
2182    type Checker = glib::value::GenericValueTypeChecker<Self>;
2183
2184    #[inline]
2185    unsafe fn from_value(value: &'a glib::Value) -> Self {
2186        skip_assert_initialized!();
2187        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
2188    }
2189}
2190
2191impl ToValue for PipelineFlags {
2192    #[inline]
2193    fn to_value(&self) -> glib::Value {
2194        let mut value = glib::Value::for_value_type::<Self>();
2195        unsafe {
2196            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2197        }
2198        value
2199    }
2200
2201    #[inline]
2202    fn value_type(&self) -> glib::Type {
2203        Self::static_type()
2204    }
2205}
2206
2207impl From<PipelineFlags> for glib::Value {
2208    #[inline]
2209    fn from(v: PipelineFlags) -> Self {
2210        skip_assert_initialized!();
2211        ToValue::to_value(&v)
2212    }
2213}
2214
2215#[cfg(feature = "v1_18")]
2216bitflags! {
2217    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2218    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2219    #[doc(alias = "GstPluginAPIFlags")]
2220    pub struct PluginAPIFlags: u32 {
2221        /// Ignore enum members when generating
2222        ///  the plugins cache. This is useful if the members of the enum are generated
2223        ///  dynamically, in order not to expose incorrect documentation to the end user.
2224        #[doc(alias = "GST_PLUGIN_API_FLAG_IGNORE_ENUM_MEMBERS")]
2225        const MEMBERS = ffi::GST_PLUGIN_API_FLAG_IGNORE_ENUM_MEMBERS as _;
2226    }
2227}
2228
2229#[cfg(feature = "v1_18")]
2230#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2231#[doc(hidden)]
2232impl IntoGlib for PluginAPIFlags {
2233    type GlibType = ffi::GstPluginAPIFlags;
2234
2235    #[inline]
2236    fn into_glib(self) -> ffi::GstPluginAPIFlags {
2237        self.bits()
2238    }
2239}
2240
2241#[cfg(feature = "v1_18")]
2242#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2243#[doc(hidden)]
2244impl FromGlib<ffi::GstPluginAPIFlags> for PluginAPIFlags {
2245    #[inline]
2246    unsafe fn from_glib(value: ffi::GstPluginAPIFlags) -> Self {
2247        skip_assert_initialized!();
2248        Self::from_bits_truncate(value)
2249    }
2250}
2251
2252#[cfg(feature = "v1_18")]
2253#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2254impl StaticType for PluginAPIFlags {
2255    #[inline]
2256    #[doc(alias = "gst_plugin_api_flags_get_type")]
2257    fn static_type() -> glib::Type {
2258        unsafe { from_glib(ffi::gst_plugin_api_flags_get_type()) }
2259    }
2260}
2261
2262#[cfg(feature = "v1_18")]
2263#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2264impl glib::HasParamSpec for PluginAPIFlags {
2265    type ParamSpec = glib::ParamSpecFlags;
2266    type SetValue = Self;
2267    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2268
2269    fn param_spec_builder() -> Self::BuilderFn {
2270        Self::ParamSpec::builder
2271    }
2272}
2273
2274#[cfg(feature = "v1_18")]
2275#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2276impl glib::value::ValueType for PluginAPIFlags {
2277    type Type = Self;
2278}
2279
2280#[cfg(feature = "v1_18")]
2281#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2282unsafe impl<'a> glib::value::FromValue<'a> for PluginAPIFlags {
2283    type Checker = glib::value::GenericValueTypeChecker<Self>;
2284
2285    #[inline]
2286    unsafe fn from_value(value: &'a glib::Value) -> Self {
2287        skip_assert_initialized!();
2288        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
2289    }
2290}
2291
2292#[cfg(feature = "v1_18")]
2293#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2294impl ToValue for PluginAPIFlags {
2295    #[inline]
2296    fn to_value(&self) -> glib::Value {
2297        let mut value = glib::Value::for_value_type::<Self>();
2298        unsafe {
2299            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2300        }
2301        value
2302    }
2303
2304    #[inline]
2305    fn value_type(&self) -> glib::Type {
2306        Self::static_type()
2307    }
2308}
2309
2310#[cfg(feature = "v1_18")]
2311#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2312impl From<PluginAPIFlags> for glib::Value {
2313    #[inline]
2314    fn from(v: PluginAPIFlags) -> Self {
2315        skip_assert_initialized!();
2316        ToValue::to_value(&v)
2317    }
2318}
2319
2320bitflags! {
2321    /// Flags used in connection with [`Plugin::add_dependency()`][crate::Plugin::add_dependency()].
2322    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2323    #[doc(alias = "GstPluginDependencyFlags")]
2324    pub struct PluginDependencyFlags: u32 {
2325        /// recurse into subdirectories
2326        #[doc(alias = "GST_PLUGIN_DEPENDENCY_FLAG_RECURSE")]
2327        const RECURSE = ffi::GST_PLUGIN_DEPENDENCY_FLAG_RECURSE as _;
2328        /// use paths
2329        ///  argument only if none of the environment variables is set
2330        #[doc(alias = "GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY")]
2331        const PATHS_ARE_DEFAULT_ONLY = ffi::GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY as _;
2332        /// interpret
2333        ///  filename argument as filter suffix and check all matching files in
2334        ///  the directory
2335        #[doc(alias = "GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX")]
2336        const FILE_NAME_IS_SUFFIX = ffi::GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX as _;
2337        /// interpret
2338        ///  filename argument as filter prefix and check all matching files in
2339        ///  the directory. Since: 1.8.
2340        #[doc(alias = "GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX")]
2341        const FILE_NAME_IS_PREFIX = ffi::GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX as _;
2342        /// interpret
2343        ///  non-absolute paths as relative to the main executable directory. Since
2344        ///  1.14.
2345        #[doc(alias = "GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE")]
2346        const PATHS_ARE_RELATIVE_TO_EXE = ffi::GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_RELATIVE_TO_EXE as _;
2347    }
2348}
2349
2350#[doc(hidden)]
2351impl IntoGlib for PluginDependencyFlags {
2352    type GlibType = ffi::GstPluginDependencyFlags;
2353
2354    #[inline]
2355    fn into_glib(self) -> ffi::GstPluginDependencyFlags {
2356        self.bits()
2357    }
2358}
2359
2360#[doc(hidden)]
2361impl FromGlib<ffi::GstPluginDependencyFlags> for PluginDependencyFlags {
2362    #[inline]
2363    unsafe fn from_glib(value: ffi::GstPluginDependencyFlags) -> Self {
2364        skip_assert_initialized!();
2365        Self::from_bits_truncate(value)
2366    }
2367}
2368
2369impl StaticType for PluginDependencyFlags {
2370    #[inline]
2371    #[doc(alias = "gst_plugin_dependency_flags_get_type")]
2372    fn static_type() -> glib::Type {
2373        unsafe { from_glib(ffi::gst_plugin_dependency_flags_get_type()) }
2374    }
2375}
2376
2377impl glib::HasParamSpec for PluginDependencyFlags {
2378    type ParamSpec = glib::ParamSpecFlags;
2379    type SetValue = Self;
2380    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2381
2382    fn param_spec_builder() -> Self::BuilderFn {
2383        Self::ParamSpec::builder
2384    }
2385}
2386
2387impl glib::value::ValueType for PluginDependencyFlags {
2388    type Type = Self;
2389}
2390
2391unsafe impl<'a> glib::value::FromValue<'a> for PluginDependencyFlags {
2392    type Checker = glib::value::GenericValueTypeChecker<Self>;
2393
2394    #[inline]
2395    unsafe fn from_value(value: &'a glib::Value) -> Self {
2396        skip_assert_initialized!();
2397        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
2398    }
2399}
2400
2401impl ToValue for PluginDependencyFlags {
2402    #[inline]
2403    fn to_value(&self) -> glib::Value {
2404        let mut value = glib::Value::for_value_type::<Self>();
2405        unsafe {
2406            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2407        }
2408        value
2409    }
2410
2411    #[inline]
2412    fn value_type(&self) -> glib::Type {
2413        Self::static_type()
2414    }
2415}
2416
2417impl From<PluginDependencyFlags> for glib::Value {
2418    #[inline]
2419    fn from(v: PluginDependencyFlags) -> Self {
2420        skip_assert_initialized!();
2421        ToValue::to_value(&v)
2422    }
2423}
2424
2425bitflags! {
2426    /// The plugin loading state and registry flags.
2427    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2428    #[doc(alias = "GstPluginFlags")]
2429    pub struct PluginFlags: u32 {
2430        /// Temporarily loaded plugins
2431        #[doc(alias = "GST_PLUGIN_FLAG_CACHED")]
2432        const CACHED = ffi::GST_PLUGIN_FLAG_CACHED as _;
2433        /// The plugin won't be scanned (again)
2434        #[doc(alias = "GST_PLUGIN_FLAG_BLACKLISTED")]
2435        const BLACKLISTED = ffi::GST_PLUGIN_FLAG_BLACKLISTED as _;
2436        /// The plugin has no external dependencies and a static set of features,
2437        /// rendering it suitable for storing in a static build-time registry.
2438        #[cfg(feature = "v1_30")]
2439        #[cfg_attr(docsrs, doc(cfg(feature = "v1_30")))]
2440        #[doc(alias = "GST_PLUGIN_FLAG_STATIC_FEATURES")]
2441        const STATIC_FEATURES = ffi::GST_PLUGIN_FLAG_STATIC_FEATURES as _;
2442    }
2443}
2444
2445#[doc(hidden)]
2446impl IntoGlib for PluginFlags {
2447    type GlibType = ffi::GstPluginFlags;
2448
2449    #[inline]
2450    fn into_glib(self) -> ffi::GstPluginFlags {
2451        self.bits()
2452    }
2453}
2454
2455#[doc(hidden)]
2456impl FromGlib<ffi::GstPluginFlags> for PluginFlags {
2457    #[inline]
2458    unsafe fn from_glib(value: ffi::GstPluginFlags) -> Self {
2459        skip_assert_initialized!();
2460        Self::from_bits_truncate(value)
2461    }
2462}
2463
2464impl StaticType for PluginFlags {
2465    #[inline]
2466    #[doc(alias = "gst_plugin_flags_get_type")]
2467    fn static_type() -> glib::Type {
2468        unsafe { from_glib(ffi::gst_plugin_flags_get_type()) }
2469    }
2470}
2471
2472impl glib::HasParamSpec for PluginFlags {
2473    type ParamSpec = glib::ParamSpecFlags;
2474    type SetValue = Self;
2475    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2476
2477    fn param_spec_builder() -> Self::BuilderFn {
2478        Self::ParamSpec::builder
2479    }
2480}
2481
2482impl glib::value::ValueType for PluginFlags {
2483    type Type = Self;
2484}
2485
2486unsafe impl<'a> glib::value::FromValue<'a> for PluginFlags {
2487    type Checker = glib::value::GenericValueTypeChecker<Self>;
2488
2489    #[inline]
2490    unsafe fn from_value(value: &'a glib::Value) -> Self {
2491        skip_assert_initialized!();
2492        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
2493    }
2494}
2495
2496impl ToValue for PluginFlags {
2497    #[inline]
2498    fn to_value(&self) -> glib::Value {
2499        let mut value = glib::Value::for_value_type::<Self>();
2500        unsafe {
2501            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2502        }
2503        value
2504    }
2505
2506    #[inline]
2507    fn value_type(&self) -> glib::Type {
2508        Self::static_type()
2509    }
2510}
2511
2512impl From<PluginFlags> for glib::Value {
2513    #[inline]
2514    fn from(v: PluginFlags) -> Self {
2515        skip_assert_initialized!();
2516        ToValue::to_value(&v)
2517    }
2518}
2519
2520bitflags! {
2521    /// The different scheduling flags.
2522    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2523    #[doc(alias = "GstSchedulingFlags")]
2524    pub struct SchedulingFlags: u32 {
2525        /// if seeking is possible
2526        #[doc(alias = "GST_SCHEDULING_FLAG_SEEKABLE")]
2527        const SEEKABLE = ffi::GST_SCHEDULING_FLAG_SEEKABLE as _;
2528        /// if sequential access is recommended
2529        #[doc(alias = "GST_SCHEDULING_FLAG_SEQUENTIAL")]
2530        const SEQUENTIAL = ffi::GST_SCHEDULING_FLAG_SEQUENTIAL as _;
2531        /// if bandwidth is limited and buffering possible (since 1.2)
2532        #[doc(alias = "GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED")]
2533        const BANDWIDTH_LIMITED = ffi::GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED as _;
2534    }
2535}
2536
2537#[doc(hidden)]
2538impl IntoGlib for SchedulingFlags {
2539    type GlibType = ffi::GstSchedulingFlags;
2540
2541    #[inline]
2542    fn into_glib(self) -> ffi::GstSchedulingFlags {
2543        self.bits()
2544    }
2545}
2546
2547#[doc(hidden)]
2548impl FromGlib<ffi::GstSchedulingFlags> for SchedulingFlags {
2549    #[inline]
2550    unsafe fn from_glib(value: ffi::GstSchedulingFlags) -> Self {
2551        skip_assert_initialized!();
2552        Self::from_bits_truncate(value)
2553    }
2554}
2555
2556impl StaticType for SchedulingFlags {
2557    #[inline]
2558    #[doc(alias = "gst_scheduling_flags_get_type")]
2559    fn static_type() -> glib::Type {
2560        unsafe { from_glib(ffi::gst_scheduling_flags_get_type()) }
2561    }
2562}
2563
2564impl glib::HasParamSpec for SchedulingFlags {
2565    type ParamSpec = glib::ParamSpecFlags;
2566    type SetValue = Self;
2567    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2568
2569    fn param_spec_builder() -> Self::BuilderFn {
2570        Self::ParamSpec::builder
2571    }
2572}
2573
2574impl glib::value::ValueType for SchedulingFlags {
2575    type Type = Self;
2576}
2577
2578unsafe impl<'a> glib::value::FromValue<'a> for SchedulingFlags {
2579    type Checker = glib::value::GenericValueTypeChecker<Self>;
2580
2581    #[inline]
2582    unsafe fn from_value(value: &'a glib::Value) -> Self {
2583        skip_assert_initialized!();
2584        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
2585    }
2586}
2587
2588impl ToValue for SchedulingFlags {
2589    #[inline]
2590    fn to_value(&self) -> glib::Value {
2591        let mut value = glib::Value::for_value_type::<Self>();
2592        unsafe {
2593            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2594        }
2595        value
2596    }
2597
2598    #[inline]
2599    fn value_type(&self) -> glib::Type {
2600        Self::static_type()
2601    }
2602}
2603
2604impl From<SchedulingFlags> for glib::Value {
2605    #[inline]
2606    fn from(v: SchedulingFlags) -> Self {
2607        skip_assert_initialized!();
2608        ToValue::to_value(&v)
2609    }
2610}
2611
2612bitflags! {
2613    ///  -1.0) trickmode
2614    /// playback, the [`TRICKMODE`][Self::TRICKMODE] flag can be used to instruct decoders
2615    /// and demuxers to adjust the playback rate by skipping frames. This can improve
2616    /// performance and decrease CPU usage because not all frames need to be decoded.
2617    ///
2618    /// Beyond that, the [`TRICKMODE_KEY_UNITS`][Self::TRICKMODE_KEY_UNITS] flag can be used to
2619    /// request that decoders skip all frames except key units, and
2620    /// [`TRICKMODE_NO_AUDIO`][Self::TRICKMODE_NO_AUDIO] flags can be used to request that audio
2621    /// decoders do no decoding at all, and simple output silence.
2622    ///
2623    /// The [`SNAP_BEFORE`][Self::SNAP_BEFORE] flag can be used to snap to the previous
2624    /// relevant location, and the [`SNAP_AFTER`][Self::SNAP_AFTER] flag can be used to
2625    /// select the next relevant location. If [`KEY_UNIT`][Self::KEY_UNIT] is specified,
2626    /// the relevant location is a keyframe. If both flags are specified, the nearest
2627    /// of these locations will be selected. If none are specified, the implementation is
2628    /// free to select whichever it wants.
2629    ///
2630    /// The before and after here are in running time, so when playing backwards,
2631    /// the next location refers to the one that will played in next, and not the
2632    /// one that is located after in the actual source stream.
2633    ///
2634    /// Also see part-seeking.txt in the GStreamer design documentation for more
2635    /// details on the meaning of these flags and the behaviour expected of
2636    /// elements that handle them.
2637    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2638    #[doc(alias = "GstSeekFlags")]
2639    pub struct SeekFlags: u32 {
2640        /// flush pipeline
2641        #[doc(alias = "GST_SEEK_FLAG_FLUSH")]
2642        const FLUSH = ffi::GST_SEEK_FLAG_FLUSH as _;
2643        /// accurate position is requested, this might
2644        ///  be considerably slower for some formats.
2645        #[doc(alias = "GST_SEEK_FLAG_ACCURATE")]
2646        const ACCURATE = ffi::GST_SEEK_FLAG_ACCURATE as _;
2647        /// seek to the nearest keyframe. This might be
2648        ///  faster but less accurate.
2649        #[doc(alias = "GST_SEEK_FLAG_KEY_UNIT")]
2650        const KEY_UNIT = ffi::GST_SEEK_FLAG_KEY_UNIT as _;
2651        /// perform a segment seek.
2652        #[doc(alias = "GST_SEEK_FLAG_SEGMENT")]
2653        const SEGMENT = ffi::GST_SEEK_FLAG_SEGMENT as _;
2654        /// when doing fast forward or fast reverse playback, allow
2655        ///  elements to skip frames instead of generating all
2656        ///  frames. (Since: 1.6)
2657        #[doc(alias = "GST_SEEK_FLAG_TRICKMODE")]
2658        const TRICKMODE = ffi::GST_SEEK_FLAG_TRICKMODE as _;
2659        /// Deprecated backward compatibility flag, replaced
2660        ///  by [`TRICKMODE`][Self::TRICKMODE]
2661        #[doc(alias = "GST_SEEK_FLAG_SKIP")]
2662        const SKIP = ffi::GST_SEEK_FLAG_SKIP as _;
2663        /// go to a location before the requested position,
2664        ///  if [`KEY_UNIT`][Self::KEY_UNIT] this means the keyframe at or before
2665        ///  the requested position the one at or before the seek target.
2666        #[doc(alias = "GST_SEEK_FLAG_SNAP_BEFORE")]
2667        const SNAP_BEFORE = ffi::GST_SEEK_FLAG_SNAP_BEFORE as _;
2668        /// go to a location after the requested position,
2669        ///  if [`KEY_UNIT`][Self::KEY_UNIT] this means the keyframe at of after the
2670        ///  requested position.
2671        #[doc(alias = "GST_SEEK_FLAG_SNAP_AFTER")]
2672        const SNAP_AFTER = ffi::GST_SEEK_FLAG_SNAP_AFTER as _;
2673        /// go to a position near the requested position,
2674        ///  if [`KEY_UNIT`][Self::KEY_UNIT] this means the keyframe closest
2675        ///  to the requested position, if both keyframes are at an equal
2676        ///  distance, behaves like [`SNAP_BEFORE`][Self::SNAP_BEFORE].
2677        #[doc(alias = "GST_SEEK_FLAG_SNAP_NEAREST")]
2678        const SNAP_NEAREST = ffi::GST_SEEK_FLAG_SNAP_NEAREST as _;
2679        /// when doing fast forward or fast reverse
2680        ///  playback, request that elements only decode keyframes
2681        ///  and skip all other content, for formats that have
2682        ///  keyframes. (Since: 1.6)
2683        #[doc(alias = "GST_SEEK_FLAG_TRICKMODE_KEY_UNITS")]
2684        const TRICKMODE_KEY_UNITS = ffi::GST_SEEK_FLAG_TRICKMODE_KEY_UNITS as _;
2685        /// when doing fast forward or fast reverse
2686        ///  playback, request that audio decoder elements skip
2687        ///  decoding and output only gap events or silence. (Since: 1.6)
2688        #[doc(alias = "GST_SEEK_FLAG_TRICKMODE_NO_AUDIO")]
2689        const TRICKMODE_NO_AUDIO = ffi::GST_SEEK_FLAG_TRICKMODE_NO_AUDIO as _;
2690        /// When doing fast forward or fast reverse
2691        ///  playback, request that elements only decode keyframes and
2692        ///  forward predicted frames and skip all other content (for example
2693        ///  B-Frames), for formats that have keyframes and forward predicted
2694        ///  frames. (Since: 1.18)
2695        #[cfg(feature = "v1_18")]
2696        #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2697        #[doc(alias = "GST_SEEK_FLAG_TRICKMODE_FORWARD_PREDICTED")]
2698        const TRICKMODE_FORWARD_PREDICTED = ffi::GST_SEEK_FLAG_TRICKMODE_FORWARD_PREDICTED as _;
2699        /// Signals that a rate change should be
2700        ///  applied immediately. Only valid if start/stop position
2701        ///  are GST_CLOCK_TIME_NONE, the playback direction does not change
2702        ///  and the seek is not flushing. (Since: 1.18)
2703        #[cfg(feature = "v1_18")]
2704        #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2705        #[doc(alias = "GST_SEEK_FLAG_INSTANT_RATE_CHANGE")]
2706        const INSTANT_RATE_CHANGE = ffi::GST_SEEK_FLAG_INSTANT_RATE_CHANGE as _;
2707    }
2708}
2709
2710#[doc(hidden)]
2711impl IntoGlib for SeekFlags {
2712    type GlibType = ffi::GstSeekFlags;
2713
2714    #[inline]
2715    fn into_glib(self) -> ffi::GstSeekFlags {
2716        self.bits()
2717    }
2718}
2719
2720#[doc(hidden)]
2721impl FromGlib<ffi::GstSeekFlags> for SeekFlags {
2722    #[inline]
2723    unsafe fn from_glib(value: ffi::GstSeekFlags) -> Self {
2724        skip_assert_initialized!();
2725        Self::from_bits_truncate(value)
2726    }
2727}
2728
2729impl StaticType for SeekFlags {
2730    #[inline]
2731    #[doc(alias = "gst_seek_flags_get_type")]
2732    fn static_type() -> glib::Type {
2733        unsafe { from_glib(ffi::gst_seek_flags_get_type()) }
2734    }
2735}
2736
2737impl glib::HasParamSpec for SeekFlags {
2738    type ParamSpec = glib::ParamSpecFlags;
2739    type SetValue = Self;
2740    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2741
2742    fn param_spec_builder() -> Self::BuilderFn {
2743        Self::ParamSpec::builder
2744    }
2745}
2746
2747impl glib::value::ValueType for SeekFlags {
2748    type Type = Self;
2749}
2750
2751unsafe impl<'a> glib::value::FromValue<'a> for SeekFlags {
2752    type Checker = glib::value::GenericValueTypeChecker<Self>;
2753
2754    #[inline]
2755    unsafe fn from_value(value: &'a glib::Value) -> Self {
2756        skip_assert_initialized!();
2757        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
2758    }
2759}
2760
2761impl ToValue for SeekFlags {
2762    #[inline]
2763    fn to_value(&self) -> glib::Value {
2764        let mut value = glib::Value::for_value_type::<Self>();
2765        unsafe {
2766            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2767        }
2768        value
2769    }
2770
2771    #[inline]
2772    fn value_type(&self) -> glib::Type {
2773        Self::static_type()
2774    }
2775}
2776
2777impl From<SeekFlags> for glib::Value {
2778    #[inline]
2779    fn from(v: SeekFlags) -> Self {
2780        skip_assert_initialized!();
2781        ToValue::to_value(&v)
2782    }
2783}
2784
2785bitflags! {
2786    /// Flags for the GstSegment structure. Currently mapped to the corresponding
2787    /// values of the seek flags.
2788    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2789    #[doc(alias = "GstSegmentFlags")]
2790    pub struct SegmentFlags: u32 {
2791        /// reset the pipeline running_time to the segment
2792        ///  running_time
2793        #[doc(alias = "GST_SEGMENT_FLAG_RESET")]
2794        const RESET = ffi::GST_SEGMENT_FLAG_RESET as _;
2795        /// perform skip playback (Since: 1.6)
2796        #[doc(alias = "GST_SEGMENT_FLAG_TRICKMODE")]
2797        const TRICKMODE = ffi::GST_SEGMENT_FLAG_TRICKMODE as _;
2798        /// Deprecated backward compatibility flag, replaced
2799        ///  by [`TRICKMODE`][Self::TRICKMODE]
2800        #[doc(alias = "GST_SEGMENT_FLAG_SKIP")]
2801        const SKIP = ffi::GST_SEGMENT_FLAG_SKIP as _;
2802        /// send SEGMENT_DONE instead of EOS
2803        #[doc(alias = "GST_SEGMENT_FLAG_SEGMENT")]
2804        const SEGMENT = ffi::GST_SEGMENT_FLAG_SEGMENT as _;
2805        /// Decode only keyframes, where
2806        ///  possible (Since: 1.6)
2807        #[doc(alias = "GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS")]
2808        const TRICKMODE_KEY_UNITS = ffi::GST_SEGMENT_FLAG_TRICKMODE_KEY_UNITS as _;
2809        /// Decode only keyframes or forward
2810        ///  predicted frames, where possible (Since: 1.18)
2811        #[cfg(feature = "v1_18")]
2812        #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2813        #[doc(alias = "GST_SEGMENT_FLAG_TRICKMODE_FORWARD_PREDICTED")]
2814        const TRICKMODE_FORWARD_PREDICTED = ffi::GST_SEGMENT_FLAG_TRICKMODE_FORWARD_PREDICTED as _;
2815        /// Do not decode any audio, where
2816        ///  possible (Since: 1.6)
2817        #[doc(alias = "GST_SEGMENT_FLAG_TRICKMODE_NO_AUDIO")]
2818        const TRICKMODE_NO_AUDIO = ffi::GST_SEGMENT_FLAG_TRICKMODE_NO_AUDIO as _;
2819    }
2820}
2821
2822#[doc(hidden)]
2823impl IntoGlib for SegmentFlags {
2824    type GlibType = ffi::GstSegmentFlags;
2825
2826    #[inline]
2827    fn into_glib(self) -> ffi::GstSegmentFlags {
2828        self.bits()
2829    }
2830}
2831
2832#[doc(hidden)]
2833impl FromGlib<ffi::GstSegmentFlags> for SegmentFlags {
2834    #[inline]
2835    unsafe fn from_glib(value: ffi::GstSegmentFlags) -> Self {
2836        skip_assert_initialized!();
2837        Self::from_bits_truncate(value)
2838    }
2839}
2840
2841impl StaticType for SegmentFlags {
2842    #[inline]
2843    #[doc(alias = "gst_segment_flags_get_type")]
2844    fn static_type() -> glib::Type {
2845        unsafe { from_glib(ffi::gst_segment_flags_get_type()) }
2846    }
2847}
2848
2849impl glib::HasParamSpec for SegmentFlags {
2850    type ParamSpec = glib::ParamSpecFlags;
2851    type SetValue = Self;
2852    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2853
2854    fn param_spec_builder() -> Self::BuilderFn {
2855        Self::ParamSpec::builder
2856    }
2857}
2858
2859impl glib::value::ValueType for SegmentFlags {
2860    type Type = Self;
2861}
2862
2863unsafe impl<'a> glib::value::FromValue<'a> for SegmentFlags {
2864    type Checker = glib::value::GenericValueTypeChecker<Self>;
2865
2866    #[inline]
2867    unsafe fn from_value(value: &'a glib::Value) -> Self {
2868        skip_assert_initialized!();
2869        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
2870    }
2871}
2872
2873impl ToValue for SegmentFlags {
2874    #[inline]
2875    fn to_value(&self) -> glib::Value {
2876        let mut value = glib::Value::for_value_type::<Self>();
2877        unsafe {
2878            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2879        }
2880        value
2881    }
2882
2883    #[inline]
2884    fn value_type(&self) -> glib::Type {
2885        Self::static_type()
2886    }
2887}
2888
2889impl From<SegmentFlags> for glib::Value {
2890    #[inline]
2891    fn from(v: SegmentFlags) -> Self {
2892        skip_assert_initialized!();
2893        ToValue::to_value(&v)
2894    }
2895}
2896
2897#[cfg(feature = "v1_20")]
2898bitflags! {
2899    #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
2900    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
2901    #[doc(alias = "GstSerializeFlags")]
2902    pub struct SerializeFlags: u32 {
2903        /// No special flags specified.
2904        #[doc(alias = "GST_SERIALIZE_FLAG_NONE")]
2905        const NONE = ffi::GST_SERIALIZE_FLAG_NONE as _;
2906        /// Serialize using the old format for
2907        ///  nested structures.
2908        #[doc(alias = "GST_SERIALIZE_FLAG_BACKWARD_COMPAT")]
2909        const BACKWARD_COMPAT = ffi::GST_SERIALIZE_FLAG_BACKWARD_COMPAT as _;
2910    }
2911}
2912
2913#[cfg(feature = "v1_20")]
2914#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
2915#[doc(hidden)]
2916impl IntoGlib for SerializeFlags {
2917    type GlibType = ffi::GstSerializeFlags;
2918
2919    #[inline]
2920    fn into_glib(self) -> ffi::GstSerializeFlags {
2921        self.bits()
2922    }
2923}
2924
2925#[cfg(feature = "v1_20")]
2926#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
2927#[doc(hidden)]
2928impl FromGlib<ffi::GstSerializeFlags> for SerializeFlags {
2929    #[inline]
2930    unsafe fn from_glib(value: ffi::GstSerializeFlags) -> Self {
2931        skip_assert_initialized!();
2932        Self::from_bits_truncate(value)
2933    }
2934}
2935
2936#[cfg(feature = "v1_20")]
2937#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
2938impl StaticType for SerializeFlags {
2939    #[inline]
2940    #[doc(alias = "gst_serialize_flags_get_type")]
2941    fn static_type() -> glib::Type {
2942        unsafe { from_glib(ffi::gst_serialize_flags_get_type()) }
2943    }
2944}
2945
2946#[cfg(feature = "v1_20")]
2947#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
2948impl glib::HasParamSpec for SerializeFlags {
2949    type ParamSpec = glib::ParamSpecFlags;
2950    type SetValue = Self;
2951    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
2952
2953    fn param_spec_builder() -> Self::BuilderFn {
2954        Self::ParamSpec::builder
2955    }
2956}
2957
2958#[cfg(feature = "v1_20")]
2959#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
2960impl glib::value::ValueType for SerializeFlags {
2961    type Type = Self;
2962}
2963
2964#[cfg(feature = "v1_20")]
2965#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
2966unsafe impl<'a> glib::value::FromValue<'a> for SerializeFlags {
2967    type Checker = glib::value::GenericValueTypeChecker<Self>;
2968
2969    #[inline]
2970    unsafe fn from_value(value: &'a glib::Value) -> Self {
2971        skip_assert_initialized!();
2972        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
2973    }
2974}
2975
2976#[cfg(feature = "v1_20")]
2977#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
2978impl ToValue for SerializeFlags {
2979    #[inline]
2980    fn to_value(&self) -> glib::Value {
2981        let mut value = glib::Value::for_value_type::<Self>();
2982        unsafe {
2983            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
2984        }
2985        value
2986    }
2987
2988    #[inline]
2989    fn value_type(&self) -> glib::Type {
2990        Self::static_type()
2991    }
2992}
2993
2994#[cfg(feature = "v1_20")]
2995#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
2996impl From<SerializeFlags> for glib::Value {
2997    #[inline]
2998    fn from(v: SerializeFlags) -> Self {
2999        skip_assert_initialized!();
3000        ToValue::to_value(&v)
3001    }
3002}
3003
3004bitflags! {
3005    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
3006    #[doc(alias = "GstStackTraceFlags")]
3007    pub struct StackTraceFlags: u32 {
3008        /// Try to retrieve as much information as possible,
3009        ///  including source information when getting the
3010        ///  stack trace
3011        #[doc(alias = "GST_STACK_TRACE_SHOW_FULL")]
3012        const FULL = ffi::GST_STACK_TRACE_SHOW_FULL as _;
3013    }
3014}
3015
3016#[doc(hidden)]
3017impl IntoGlib for StackTraceFlags {
3018    type GlibType = ffi::GstStackTraceFlags;
3019
3020    #[inline]
3021    fn into_glib(self) -> ffi::GstStackTraceFlags {
3022        self.bits()
3023    }
3024}
3025
3026#[doc(hidden)]
3027impl FromGlib<ffi::GstStackTraceFlags> for StackTraceFlags {
3028    #[inline]
3029    unsafe fn from_glib(value: ffi::GstStackTraceFlags) -> Self {
3030        skip_assert_initialized!();
3031        Self::from_bits_truncate(value)
3032    }
3033}
3034
3035impl StaticType for StackTraceFlags {
3036    #[inline]
3037    #[doc(alias = "gst_stack_trace_flags_get_type")]
3038    fn static_type() -> glib::Type {
3039        unsafe { from_glib(ffi::gst_stack_trace_flags_get_type()) }
3040    }
3041}
3042
3043impl glib::HasParamSpec for StackTraceFlags {
3044    type ParamSpec = glib::ParamSpecFlags;
3045    type SetValue = Self;
3046    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
3047
3048    fn param_spec_builder() -> Self::BuilderFn {
3049        Self::ParamSpec::builder
3050    }
3051}
3052
3053impl glib::value::ValueType for StackTraceFlags {
3054    type Type = Self;
3055}
3056
3057unsafe impl<'a> glib::value::FromValue<'a> for StackTraceFlags {
3058    type Checker = glib::value::GenericValueTypeChecker<Self>;
3059
3060    #[inline]
3061    unsafe fn from_value(value: &'a glib::Value) -> Self {
3062        skip_assert_initialized!();
3063        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
3064    }
3065}
3066
3067impl ToValue for StackTraceFlags {
3068    #[inline]
3069    fn to_value(&self) -> glib::Value {
3070        let mut value = glib::Value::for_value_type::<Self>();
3071        unsafe {
3072            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
3073        }
3074        value
3075    }
3076
3077    #[inline]
3078    fn value_type(&self) -> glib::Type {
3079        Self::static_type()
3080    }
3081}
3082
3083impl From<StackTraceFlags> for glib::Value {
3084    #[inline]
3085    fn from(v: StackTraceFlags) -> Self {
3086        skip_assert_initialized!();
3087        ToValue::to_value(&v)
3088    }
3089}
3090
3091bitflags! {
3092    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
3093    #[doc(alias = "GstStreamFlags")]
3094    pub struct StreamFlags: u32 {
3095        /// This stream is a sparse stream (e.g. a subtitle
3096        ///  stream), data may flow only in irregular intervals with large gaps in
3097        ///  between.
3098        #[doc(alias = "GST_STREAM_FLAG_SPARSE")]
3099        const SPARSE = ffi::GST_STREAM_FLAG_SPARSE as _;
3100        /// This stream should be selected by default. This
3101        ///  flag may be used by demuxers to signal that a stream should be selected
3102        ///  by default in a playback scenario.
3103        #[doc(alias = "GST_STREAM_FLAG_SELECT")]
3104        const SELECT = ffi::GST_STREAM_FLAG_SELECT as _;
3105        /// This stream should not be selected by default.
3106        ///  This flag may be used by demuxers to signal that a stream should not
3107        ///  be selected by default in a playback scenario, but only if explicitly
3108        ///  selected by the user (e.g. an audio track for the hard of hearing or
3109        ///  a director's commentary track).
3110        #[doc(alias = "GST_STREAM_FLAG_UNSELECT")]
3111        const UNSELECT = ffi::GST_STREAM_FLAG_UNSELECT as _;
3112    }
3113}
3114
3115#[doc(hidden)]
3116impl IntoGlib for StreamFlags {
3117    type GlibType = ffi::GstStreamFlags;
3118
3119    #[inline]
3120    fn into_glib(self) -> ffi::GstStreamFlags {
3121        self.bits()
3122    }
3123}
3124
3125#[doc(hidden)]
3126impl FromGlib<ffi::GstStreamFlags> for StreamFlags {
3127    #[inline]
3128    unsafe fn from_glib(value: ffi::GstStreamFlags) -> Self {
3129        skip_assert_initialized!();
3130        Self::from_bits_truncate(value)
3131    }
3132}
3133
3134impl StaticType for StreamFlags {
3135    #[inline]
3136    #[doc(alias = "gst_stream_flags_get_type")]
3137    fn static_type() -> glib::Type {
3138        unsafe { from_glib(ffi::gst_stream_flags_get_type()) }
3139    }
3140}
3141
3142impl glib::HasParamSpec for StreamFlags {
3143    type ParamSpec = glib::ParamSpecFlags;
3144    type SetValue = Self;
3145    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
3146
3147    fn param_spec_builder() -> Self::BuilderFn {
3148        Self::ParamSpec::builder
3149    }
3150}
3151
3152impl glib::value::ValueType for StreamFlags {
3153    type Type = Self;
3154}
3155
3156unsafe impl<'a> glib::value::FromValue<'a> for StreamFlags {
3157    type Checker = glib::value::GenericValueTypeChecker<Self>;
3158
3159    #[inline]
3160    unsafe fn from_value(value: &'a glib::Value) -> Self {
3161        skip_assert_initialized!();
3162        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
3163    }
3164}
3165
3166impl ToValue for StreamFlags {
3167    #[inline]
3168    fn to_value(&self) -> glib::Value {
3169        let mut value = glib::Value::for_value_type::<Self>();
3170        unsafe {
3171            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
3172        }
3173        value
3174    }
3175
3176    #[inline]
3177    fn value_type(&self) -> glib::Type {
3178        Self::static_type()
3179    }
3180}
3181
3182impl From<StreamFlags> for glib::Value {
3183    #[inline]
3184    fn from(v: StreamFlags) -> Self {
3185        skip_assert_initialized!();
3186        ToValue::to_value(&v)
3187    }
3188}
3189
3190bitflags! {
3191    /// [`StreamType`][crate::StreamType] describes a high level classification set for
3192    /// flows of data in [`Stream`][crate::Stream] objects.
3193    ///
3194    /// Note that this is a flag, and therefore users should not assume it
3195    /// will be a single value. Do not use the equality operator for checking
3196    /// whether a stream is of a certain type.
3197    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
3198    #[doc(alias = "GstStreamType")]
3199    pub struct StreamType: u32 {
3200        /// The stream is of unknown (unclassified) type.
3201        #[doc(alias = "GST_STREAM_TYPE_UNKNOWN")]
3202        const UNKNOWN = ffi::GST_STREAM_TYPE_UNKNOWN as _;
3203        /// The stream is of audio data
3204        #[doc(alias = "GST_STREAM_TYPE_AUDIO")]
3205        const AUDIO = ffi::GST_STREAM_TYPE_AUDIO as _;
3206        /// The stream carries video data
3207        #[doc(alias = "GST_STREAM_TYPE_VIDEO")]
3208        const VIDEO = ffi::GST_STREAM_TYPE_VIDEO as _;
3209        /// The stream is a muxed container type
3210        #[doc(alias = "GST_STREAM_TYPE_CONTAINER")]
3211        const CONTAINER = ffi::GST_STREAM_TYPE_CONTAINER as _;
3212        /// The stream contains subtitle / subpicture data.
3213        #[doc(alias = "GST_STREAM_TYPE_TEXT")]
3214        const TEXT = ffi::GST_STREAM_TYPE_TEXT as _;
3215        /// The stream contains metadata.
3216        #[cfg(feature = "v1_28")]
3217        #[cfg_attr(docsrs, doc(cfg(feature = "v1_28")))]
3218        #[doc(alias = "GST_STREAM_TYPE_METADATA")]
3219        const METADATA = ffi::GST_STREAM_TYPE_METADATA as _;
3220    }
3221}
3222
3223impl StreamType {
3224    pub fn name<'a>(self) -> &'a GStr {
3225        unsafe {
3226            GStr::from_ptr(
3227                ffi::gst_stream_type_get_name(self.into_glib())
3228                    .as_ref()
3229                    .expect("gst_stream_type_get_name returned NULL"),
3230            )
3231        }
3232    }
3233}
3234
3235impl std::fmt::Display for StreamType {
3236    #[inline]
3237    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
3238        f.write_str(&self.name())
3239    }
3240}
3241
3242#[doc(hidden)]
3243impl IntoGlib for StreamType {
3244    type GlibType = ffi::GstStreamType;
3245
3246    #[inline]
3247    fn into_glib(self) -> ffi::GstStreamType {
3248        self.bits()
3249    }
3250}
3251
3252#[doc(hidden)]
3253impl FromGlib<ffi::GstStreamType> for StreamType {
3254    #[inline]
3255    unsafe fn from_glib(value: ffi::GstStreamType) -> Self {
3256        skip_assert_initialized!();
3257        Self::from_bits_truncate(value)
3258    }
3259}
3260
3261impl StaticType for StreamType {
3262    #[inline]
3263    #[doc(alias = "gst_stream_type_get_type")]
3264    fn static_type() -> glib::Type {
3265        unsafe { from_glib(ffi::gst_stream_type_get_type()) }
3266    }
3267}
3268
3269impl glib::HasParamSpec for StreamType {
3270    type ParamSpec = glib::ParamSpecFlags;
3271    type SetValue = Self;
3272    type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
3273
3274    fn param_spec_builder() -> Self::BuilderFn {
3275        Self::ParamSpec::builder
3276    }
3277}
3278
3279impl glib::value::ValueType for StreamType {
3280    type Type = Self;
3281}
3282
3283unsafe impl<'a> glib::value::FromValue<'a> for StreamType {
3284    type Checker = glib::value::GenericValueTypeChecker<Self>;
3285
3286    #[inline]
3287    unsafe fn from_value(value: &'a glib::Value) -> Self {
3288        skip_assert_initialized!();
3289        unsafe { from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) }
3290    }
3291}
3292
3293impl ToValue for StreamType {
3294    #[inline]
3295    fn to_value(&self) -> glib::Value {
3296        let mut value = glib::Value::for_value_type::<Self>();
3297        unsafe {
3298            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
3299        }
3300        value
3301    }
3302
3303    #[inline]
3304    fn value_type(&self) -> glib::Type {
3305        Self::static_type()
3306    }
3307}
3308
3309impl From<StreamType> for glib::Value {
3310    #[inline]
3311    fn from(v: StreamType) -> Self {
3312        skip_assert_initialized!();
3313        ToValue::to_value(&v)
3314    }
3315}