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 glib::{bitflags::bitflags, prelude::*, translate::*};
7use std::fmt;
8
9#[cfg(feature = "v1_22")]
10bitflags! {
11 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
12 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
13 #[doc(alias = "GstNavigationModifierType")]
14 pub struct NavigationModifierType: u32 {
15 #[doc(alias = "GST_NAVIGATION_MODIFIER_SHIFT_MASK")]
16 const SHIFT_MASK = ffi::GST_NAVIGATION_MODIFIER_SHIFT_MASK as _;
17 #[doc(alias = "GST_NAVIGATION_MODIFIER_LOCK_MASK")]
18 const LOCK_MASK = ffi::GST_NAVIGATION_MODIFIER_LOCK_MASK as _;
19 #[doc(alias = "GST_NAVIGATION_MODIFIER_CONTROL_MASK")]
20 const CONTROL_MASK = ffi::GST_NAVIGATION_MODIFIER_CONTROL_MASK as _;
21 #[doc(alias = "GST_NAVIGATION_MODIFIER_MOD1_MASK")]
22 const MOD1_MASK = ffi::GST_NAVIGATION_MODIFIER_MOD1_MASK as _;
23 #[doc(alias = "GST_NAVIGATION_MODIFIER_MOD2_MASK")]
24 const MOD2_MASK = ffi::GST_NAVIGATION_MODIFIER_MOD2_MASK as _;
25 #[doc(alias = "GST_NAVIGATION_MODIFIER_MOD3_MASK")]
26 const MOD3_MASK = ffi::GST_NAVIGATION_MODIFIER_MOD3_MASK as _;
27 #[doc(alias = "GST_NAVIGATION_MODIFIER_MOD4_MASK")]
28 const MOD4_MASK = ffi::GST_NAVIGATION_MODIFIER_MOD4_MASK as _;
29 #[doc(alias = "GST_NAVIGATION_MODIFIER_MOD5_MASK")]
30 const MOD5_MASK = ffi::GST_NAVIGATION_MODIFIER_MOD5_MASK as _;
31 #[doc(alias = "GST_NAVIGATION_MODIFIER_BUTTON1_MASK")]
32 const BUTTON1_MASK = ffi::GST_NAVIGATION_MODIFIER_BUTTON1_MASK as _;
33 #[doc(alias = "GST_NAVIGATION_MODIFIER_BUTTON2_MASK")]
34 const BUTTON2_MASK = ffi::GST_NAVIGATION_MODIFIER_BUTTON2_MASK as _;
35 #[doc(alias = "GST_NAVIGATION_MODIFIER_BUTTON3_MASK")]
36 const BUTTON3_MASK = ffi::GST_NAVIGATION_MODIFIER_BUTTON3_MASK as _;
37 #[doc(alias = "GST_NAVIGATION_MODIFIER_BUTTON4_MASK")]
38 const BUTTON4_MASK = ffi::GST_NAVIGATION_MODIFIER_BUTTON4_MASK as _;
39 #[doc(alias = "GST_NAVIGATION_MODIFIER_BUTTON5_MASK")]
40 const BUTTON5_MASK = ffi::GST_NAVIGATION_MODIFIER_BUTTON5_MASK as _;
41 #[doc(alias = "GST_NAVIGATION_MODIFIER_SUPER_MASK")]
42 const SUPER_MASK = ffi::GST_NAVIGATION_MODIFIER_SUPER_MASK as _;
43 #[doc(alias = "GST_NAVIGATION_MODIFIER_HYPER_MASK")]
44 const HYPER_MASK = ffi::GST_NAVIGATION_MODIFIER_HYPER_MASK as _;
45 #[doc(alias = "GST_NAVIGATION_MODIFIER_META_MASK")]
46 const META_MASK = ffi::GST_NAVIGATION_MODIFIER_META_MASK as _;
47 }
48}
49
50#[cfg(feature = "v1_22")]
51#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
52#[doc(hidden)]
53impl IntoGlib for NavigationModifierType {
54 type GlibType = ffi::GstNavigationModifierType;
55
56 #[inline]
57 fn into_glib(self) -> ffi::GstNavigationModifierType {
58 self.bits()
59 }
60}
61
62#[cfg(feature = "v1_22")]
63#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
64#[doc(hidden)]
65impl FromGlib<ffi::GstNavigationModifierType> for NavigationModifierType {
66 #[inline]
67 unsafe fn from_glib(value: ffi::GstNavigationModifierType) -> Self {
68 skip_assert_initialized!();
69 Self::from_bits_truncate(value)
70 }
71}
72
73#[cfg(feature = "v1_22")]
74#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
75impl StaticType for NavigationModifierType {
76 #[inline]
77 #[doc(alias = "gst_navigation_modifier_type_get_type")]
78 fn static_type() -> glib::Type {
79 unsafe { from_glib(ffi::gst_navigation_modifier_type_get_type()) }
80 }
81}
82
83#[cfg(feature = "v1_22")]
84#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
85impl glib::HasParamSpec for NavigationModifierType {
86 type ParamSpec = glib::ParamSpecFlags;
87 type SetValue = Self;
88 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
89
90 fn param_spec_builder() -> Self::BuilderFn {
91 Self::ParamSpec::builder
92 }
93}
94
95#[cfg(feature = "v1_22")]
96#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
97impl glib::value::ValueType for NavigationModifierType {
98 type Type = Self;
99}
100
101#[cfg(feature = "v1_22")]
102#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
103unsafe impl<'a> glib::value::FromValue<'a> for NavigationModifierType {
104 type Checker = glib::value::GenericValueTypeChecker<Self>;
105
106 #[inline]
107 unsafe fn from_value(value: &'a glib::Value) -> Self {
108 skip_assert_initialized!();
109 from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
110 }
111}
112
113#[cfg(feature = "v1_22")]
114#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
115impl ToValue for NavigationModifierType {
116 #[inline]
117 fn to_value(&self) -> glib::Value {
118 let mut value = glib::Value::for_value_type::<Self>();
119 unsafe {
120 glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
121 }
122 value
123 }
124
125 #[inline]
126 fn value_type(&self) -> glib::Type {
127 Self::static_type()
128 }
129}
130
131#[cfg(feature = "v1_22")]
132#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
133impl From<NavigationModifierType> for glib::Value {
134 #[inline]
135 fn from(v: NavigationModifierType) -> Self {
136 skip_assert_initialized!();
137 ToValue::to_value(&v)
138 }
139}
140
141bitflags! {
142 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
143 #[doc(alias = "GstVideoBufferFlags")]
144 pub struct VideoBufferFlags: u32 {
145 #[doc(alias = "GST_VIDEO_BUFFER_FLAG_INTERLACED")]
146 const INTERLACED = ffi::GST_VIDEO_BUFFER_FLAG_INTERLACED as _;
147 #[doc(alias = "GST_VIDEO_BUFFER_FLAG_TFF")]
148 const TFF = ffi::GST_VIDEO_BUFFER_FLAG_TFF as _;
149 #[doc(alias = "GST_VIDEO_BUFFER_FLAG_RFF")]
150 const RFF = ffi::GST_VIDEO_BUFFER_FLAG_RFF as _;
151 #[doc(alias = "GST_VIDEO_BUFFER_FLAG_ONEFIELD")]
152 const ONEFIELD = ffi::GST_VIDEO_BUFFER_FLAG_ONEFIELD as _;
153 #[doc(alias = "GST_VIDEO_BUFFER_FLAG_MULTIPLE_VIEW")]
154 const MULTIPLE_VIEW = ffi::GST_VIDEO_BUFFER_FLAG_MULTIPLE_VIEW as _;
155 #[doc(alias = "GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE")]
156 const FIRST_IN_BUNDLE = ffi::GST_VIDEO_BUFFER_FLAG_FIRST_IN_BUNDLE as _;
157 #[cfg(feature = "v1_16")]
158 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
159 #[doc(alias = "GST_VIDEO_BUFFER_FLAG_TOP_FIELD")]
160 const TOP_FIELD = ffi::GST_VIDEO_BUFFER_FLAG_TOP_FIELD as _;
161 #[cfg(feature = "v1_16")]
162 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
163 #[doc(alias = "GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD")]
164 const BOTTOM_FIELD = ffi::GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD as _;
165 #[cfg(feature = "v1_18")]
166 #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
167 #[doc(alias = "GST_VIDEO_BUFFER_FLAG_MARKER")]
168 const MARKER = ffi::GST_VIDEO_BUFFER_FLAG_MARKER as _;
169 }
170}
171
172#[doc(hidden)]
173impl IntoGlib for VideoBufferFlags {
174 type GlibType = ffi::GstVideoBufferFlags;
175
176 #[inline]
177 fn into_glib(self) -> ffi::GstVideoBufferFlags {
178 self.bits()
179 }
180}
181
182#[doc(hidden)]
183impl FromGlib<ffi::GstVideoBufferFlags> for VideoBufferFlags {
184 #[inline]
185 unsafe fn from_glib(value: ffi::GstVideoBufferFlags) -> Self {
186 skip_assert_initialized!();
187 Self::from_bits_truncate(bits:value)
188 }
189}
190
191impl StaticType for VideoBufferFlags {
192 #[inline]
193 #[doc(alias = "gst_video_buffer_flags_get_type")]
194 fn static_type() -> glib::Type {
195 unsafe { from_glib(val:ffi::gst_video_buffer_flags_get_type()) }
196 }
197}
198
199impl glib::HasParamSpec for VideoBufferFlags {
200 type ParamSpec = glib::ParamSpecFlags;
201 type SetValue = Self;
202 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
203
204 fn param_spec_builder() -> Self::BuilderFn {
205 Self::ParamSpec::builder
206 }
207}
208
209impl glib::value::ValueType for VideoBufferFlags {
210 type Type = Self;
211}
212
213unsafe impl<'a> glib::value::FromValue<'a> for VideoBufferFlags {
214 type Checker = glib::value::GenericValueTypeChecker<Self>;
215
216 #[inline]
217 unsafe fn from_value(value: &'a glib::Value) -> Self {
218 skip_assert_initialized!();
219 from_glib(val:glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
220 }
221}
222
223impl ToValue for VideoBufferFlags {
224 #[inline]
225 fn to_value(&self) -> glib::Value {
226 let mut value: Value = glib::Value::for_value_type::<Self>();
227 unsafe {
228 glib::gobject_ffi::g_value_set_flags(value:value.to_glib_none_mut().0, self.into_glib());
229 }
230 value
231 }
232
233 #[inline]
234 fn value_type(&self) -> glib::Type {
235 Self::static_type()
236 }
237}
238
239impl From<VideoBufferFlags> for glib::Value {
240 #[inline]
241 fn from(v: VideoBufferFlags) -> Self {
242 skip_assert_initialized!();
243 ToValue::to_value(&v)
244 }
245}
246
247bitflags! {
248 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
249 #[doc(alias = "GstVideoChromaSite")]
250 pub struct VideoChromaSite: u32 {
251 #[doc(alias = "GST_VIDEO_CHROMA_SITE_NONE")]
252 const NONE = ffi::GST_VIDEO_CHROMA_SITE_NONE as _;
253 #[doc(alias = "GST_VIDEO_CHROMA_SITE_H_COSITED")]
254 const H_COSITED = ffi::GST_VIDEO_CHROMA_SITE_H_COSITED as _;
255 #[doc(alias = "GST_VIDEO_CHROMA_SITE_V_COSITED")]
256 const V_COSITED = ffi::GST_VIDEO_CHROMA_SITE_V_COSITED as _;
257 #[doc(alias = "GST_VIDEO_CHROMA_SITE_ALT_LINE")]
258 const ALT_LINE = ffi::GST_VIDEO_CHROMA_SITE_ALT_LINE as _;
259 #[doc(alias = "GST_VIDEO_CHROMA_SITE_COSITED")]
260 const COSITED = ffi::GST_VIDEO_CHROMA_SITE_COSITED as _;
261 #[doc(alias = "GST_VIDEO_CHROMA_SITE_JPEG")]
262 const JPEG = ffi::GST_VIDEO_CHROMA_SITE_JPEG as _;
263 #[doc(alias = "GST_VIDEO_CHROMA_SITE_MPEG2")]
264 const MPEG2 = ffi::GST_VIDEO_CHROMA_SITE_MPEG2 as _;
265 #[doc(alias = "GST_VIDEO_CHROMA_SITE_DV")]
266 const DV = ffi::GST_VIDEO_CHROMA_SITE_DV as _;
267 }
268}
269
270impl VideoChromaSite {
271 #[cfg(feature = "v1_20")]
272 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
273 #[doc(alias = "gst_video_chroma_site_from_string")]
274 pub fn from_string(s: &str) -> VideoChromaSite {
275 assert_initialized_main_thread!();
276 unsafe { from_glib(ffi::gst_video_chroma_site_from_string(s.to_glib_none().0)) }
277 }
278}
279
280impl fmt::Display for VideoChromaSite {
281 #[inline]
282 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
283 f.write_str(&self.to_str())
284 }
285}
286
287#[doc(hidden)]
288impl IntoGlib for VideoChromaSite {
289 type GlibType = ffi::GstVideoChromaSite;
290
291 #[inline]
292 fn into_glib(self) -> ffi::GstVideoChromaSite {
293 self.bits()
294 }
295}
296
297#[doc(hidden)]
298impl FromGlib<ffi::GstVideoChromaSite> for VideoChromaSite {
299 #[inline]
300 unsafe fn from_glib(value: ffi::GstVideoChromaSite) -> Self {
301 skip_assert_initialized!();
302 Self::from_bits_truncate(bits:value)
303 }
304}
305
306impl StaticType for VideoChromaSite {
307 #[inline]
308 #[doc(alias = "gst_video_chroma_site_get_type")]
309 fn static_type() -> glib::Type {
310 unsafe { from_glib(val:ffi::gst_video_chroma_site_get_type()) }
311 }
312}
313
314impl glib::HasParamSpec for VideoChromaSite {
315 type ParamSpec = glib::ParamSpecFlags;
316 type SetValue = Self;
317 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
318
319 fn param_spec_builder() -> Self::BuilderFn {
320 Self::ParamSpec::builder
321 }
322}
323
324impl glib::value::ValueType for VideoChromaSite {
325 type Type = Self;
326}
327
328unsafe impl<'a> glib::value::FromValue<'a> for VideoChromaSite {
329 type Checker = glib::value::GenericValueTypeChecker<Self>;
330
331 #[inline]
332 unsafe fn from_value(value: &'a glib::Value) -> Self {
333 skip_assert_initialized!();
334 from_glib(val:glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
335 }
336}
337
338impl ToValue for VideoChromaSite {
339 #[inline]
340 fn to_value(&self) -> glib::Value {
341 let mut value: Value = glib::Value::for_value_type::<Self>();
342 unsafe {
343 glib::gobject_ffi::g_value_set_flags(value:value.to_glib_none_mut().0, self.into_glib());
344 }
345 value
346 }
347
348 #[inline]
349 fn value_type(&self) -> glib::Type {
350 Self::static_type()
351 }
352}
353
354impl From<VideoChromaSite> for glib::Value {
355 #[inline]
356 fn from(v: VideoChromaSite) -> Self {
357 skip_assert_initialized!();
358 ToValue::to_value(&v)
359 }
360}
361
362bitflags! {
363 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
364 #[doc(alias = "GstVideoCodecFrameFlags")]
365 pub struct VideoCodecFrameFlags: u32 {
366 #[doc(alias = "GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY")]
367 const DECODE_ONLY = ffi::GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY as _;
368 #[doc(alias = "GST_VIDEO_CODEC_FRAME_FLAG_SYNC_POINT")]
369 const SYNC_POINT = ffi::GST_VIDEO_CODEC_FRAME_FLAG_SYNC_POINT as _;
370 #[doc(alias = "GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME")]
371 const FORCE_KEYFRAME = ffi::GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME as _;
372 #[doc(alias = "GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME_HEADERS")]
373 const FORCE_KEYFRAME_HEADERS = ffi::GST_VIDEO_CODEC_FRAME_FLAG_FORCE_KEYFRAME_HEADERS as _;
374 #[cfg(feature = "v1_20")]
375 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
376 #[doc(alias = "GST_VIDEO_CODEC_FRAME_FLAG_CORRUPTED")]
377 const CORRUPTED = ffi::GST_VIDEO_CODEC_FRAME_FLAG_CORRUPTED as _;
378 }
379}
380
381#[doc(hidden)]
382impl IntoGlib for VideoCodecFrameFlags {
383 type GlibType = ffi::GstVideoCodecFrameFlags;
384
385 #[inline]
386 fn into_glib(self) -> ffi::GstVideoCodecFrameFlags {
387 self.bits()
388 }
389}
390
391#[doc(hidden)]
392impl FromGlib<ffi::GstVideoCodecFrameFlags> for VideoCodecFrameFlags {
393 #[inline]
394 unsafe fn from_glib(value: ffi::GstVideoCodecFrameFlags) -> Self {
395 skip_assert_initialized!();
396 Self::from_bits_truncate(bits:value)
397 }
398}
399
400#[cfg(feature = "v1_20")]
401#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
402impl StaticType for VideoCodecFrameFlags {
403 #[inline]
404 #[doc(alias = "gst_video_codec_frame_flags_get_type")]
405 fn static_type() -> glib::Type {
406 unsafe { from_glib(ffi::gst_video_codec_frame_flags_get_type()) }
407 }
408}
409
410#[cfg(feature = "v1_20")]
411#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
412impl glib::HasParamSpec for VideoCodecFrameFlags {
413 type ParamSpec = glib::ParamSpecFlags;
414 type SetValue = Self;
415 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
416
417 fn param_spec_builder() -> Self::BuilderFn {
418 Self::ParamSpec::builder
419 }
420}
421
422#[cfg(feature = "v1_20")]
423#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
424impl glib::value::ValueType for VideoCodecFrameFlags {
425 type Type = Self;
426}
427
428#[cfg(feature = "v1_20")]
429#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
430unsafe impl<'a> glib::value::FromValue<'a> for VideoCodecFrameFlags {
431 type Checker = glib::value::GenericValueTypeChecker<Self>;
432
433 #[inline]
434 unsafe fn from_value(value: &'a glib::Value) -> Self {
435 skip_assert_initialized!();
436 from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
437 }
438}
439
440#[cfg(feature = "v1_20")]
441#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
442impl ToValue for VideoCodecFrameFlags {
443 #[inline]
444 fn to_value(&self) -> glib::Value {
445 let mut value = glib::Value::for_value_type::<Self>();
446 unsafe {
447 glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
448 }
449 value
450 }
451
452 #[inline]
453 fn value_type(&self) -> glib::Type {
454 Self::static_type()
455 }
456}
457
458#[cfg(feature = "v1_20")]
459#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
460impl From<VideoCodecFrameFlags> for glib::Value {
461 #[inline]
462 fn from(v: VideoCodecFrameFlags) -> Self {
463 skip_assert_initialized!();
464 ToValue::to_value(&v)
465 }
466}
467
468#[cfg(feature = "v1_20")]
469bitflags! {
470 #[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
471 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
472 #[doc(alias = "GstVideoDecoderRequestSyncPointFlags")]
473 pub struct VideoDecoderRequestSyncPointFlags: u32 {
474 #[doc(alias = "GST_VIDEO_DECODER_REQUEST_SYNC_POINT_DISCARD_INPUT")]
475 const DISCARD_INPUT = ffi::GST_VIDEO_DECODER_REQUEST_SYNC_POINT_DISCARD_INPUT as _;
476 #[doc(alias = "GST_VIDEO_DECODER_REQUEST_SYNC_POINT_CORRUPT_OUTPUT")]
477 const CORRUPT_OUTPUT = ffi::GST_VIDEO_DECODER_REQUEST_SYNC_POINT_CORRUPT_OUTPUT as _;
478 }
479}
480
481#[cfg(feature = "v1_20")]
482#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
483#[doc(hidden)]
484impl IntoGlib for VideoDecoderRequestSyncPointFlags {
485 type GlibType = ffi::GstVideoDecoderRequestSyncPointFlags;
486
487 #[inline]
488 fn into_glib(self) -> ffi::GstVideoDecoderRequestSyncPointFlags {
489 self.bits()
490 }
491}
492
493#[cfg(feature = "v1_20")]
494#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
495#[doc(hidden)]
496impl FromGlib<ffi::GstVideoDecoderRequestSyncPointFlags> for VideoDecoderRequestSyncPointFlags {
497 #[inline]
498 unsafe fn from_glib(value: ffi::GstVideoDecoderRequestSyncPointFlags) -> Self {
499 skip_assert_initialized!();
500 Self::from_bits_truncate(value)
501 }
502}
503
504#[cfg(feature = "v1_20")]
505#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
506impl StaticType for VideoDecoderRequestSyncPointFlags {
507 #[inline]
508 #[doc(alias = "gst_video_decoder_request_sync_point_flags_get_type")]
509 fn static_type() -> glib::Type {
510 unsafe { from_glib(ffi::gst_video_decoder_request_sync_point_flags_get_type()) }
511 }
512}
513
514#[cfg(feature = "v1_20")]
515#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
516impl glib::HasParamSpec for VideoDecoderRequestSyncPointFlags {
517 type ParamSpec = glib::ParamSpecFlags;
518 type SetValue = Self;
519 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
520
521 fn param_spec_builder() -> Self::BuilderFn {
522 Self::ParamSpec::builder
523 }
524}
525
526#[cfg(feature = "v1_20")]
527#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
528impl glib::value::ValueType for VideoDecoderRequestSyncPointFlags {
529 type Type = Self;
530}
531
532#[cfg(feature = "v1_20")]
533#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
534unsafe impl<'a> glib::value::FromValue<'a> for VideoDecoderRequestSyncPointFlags {
535 type Checker = glib::value::GenericValueTypeChecker<Self>;
536
537 #[inline]
538 unsafe fn from_value(value: &'a glib::Value) -> Self {
539 skip_assert_initialized!();
540 from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
541 }
542}
543
544#[cfg(feature = "v1_20")]
545#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
546impl ToValue for VideoDecoderRequestSyncPointFlags {
547 #[inline]
548 fn to_value(&self) -> glib::Value {
549 let mut value = glib::Value::for_value_type::<Self>();
550 unsafe {
551 glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
552 }
553 value
554 }
555
556 #[inline]
557 fn value_type(&self) -> glib::Type {
558 Self::static_type()
559 }
560}
561
562#[cfg(feature = "v1_20")]
563#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
564impl From<VideoDecoderRequestSyncPointFlags> for glib::Value {
565 #[inline]
566 fn from(v: VideoDecoderRequestSyncPointFlags) -> Self {
567 skip_assert_initialized!();
568 ToValue::to_value(&v)
569 }
570}
571
572bitflags! {
573 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
574 #[doc(alias = "GstVideoFlags")]
575 pub struct VideoFlags: u32 {
576 #[doc(alias = "GST_VIDEO_FLAG_VARIABLE_FPS")]
577 const VARIABLE_FPS = ffi::GST_VIDEO_FLAG_VARIABLE_FPS as _;
578 #[doc(alias = "GST_VIDEO_FLAG_PREMULTIPLIED_ALPHA")]
579 const PREMULTIPLIED_ALPHA = ffi::GST_VIDEO_FLAG_PREMULTIPLIED_ALPHA as _;
580 }
581}
582
583#[doc(hidden)]
584impl IntoGlib for VideoFlags {
585 type GlibType = ffi::GstVideoFlags;
586
587 #[inline]
588 fn into_glib(self) -> ffi::GstVideoFlags {
589 self.bits()
590 }
591}
592
593#[doc(hidden)]
594impl FromGlib<ffi::GstVideoFlags> for VideoFlags {
595 #[inline]
596 unsafe fn from_glib(value: ffi::GstVideoFlags) -> Self {
597 skip_assert_initialized!();
598 Self::from_bits_truncate(bits:value)
599 }
600}
601
602impl StaticType for VideoFlags {
603 #[inline]
604 #[doc(alias = "gst_video_flags_get_type")]
605 fn static_type() -> glib::Type {
606 unsafe { from_glib(val:ffi::gst_video_flags_get_type()) }
607 }
608}
609
610impl glib::HasParamSpec for VideoFlags {
611 type ParamSpec = glib::ParamSpecFlags;
612 type SetValue = Self;
613 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
614
615 fn param_spec_builder() -> Self::BuilderFn {
616 Self::ParamSpec::builder
617 }
618}
619
620impl glib::value::ValueType for VideoFlags {
621 type Type = Self;
622}
623
624unsafe impl<'a> glib::value::FromValue<'a> for VideoFlags {
625 type Checker = glib::value::GenericValueTypeChecker<Self>;
626
627 #[inline]
628 unsafe fn from_value(value: &'a glib::Value) -> Self {
629 skip_assert_initialized!();
630 from_glib(val:glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
631 }
632}
633
634impl ToValue for VideoFlags {
635 #[inline]
636 fn to_value(&self) -> glib::Value {
637 let mut value: Value = glib::Value::for_value_type::<Self>();
638 unsafe {
639 glib::gobject_ffi::g_value_set_flags(value:value.to_glib_none_mut().0, self.into_glib());
640 }
641 value
642 }
643
644 #[inline]
645 fn value_type(&self) -> glib::Type {
646 Self::static_type()
647 }
648}
649
650impl From<VideoFlags> for glib::Value {
651 #[inline]
652 fn from(v: VideoFlags) -> Self {
653 skip_assert_initialized!();
654 ToValue::to_value(&v)
655 }
656}
657
658bitflags! {
659 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
660 #[doc(alias = "GstVideoFormatFlags")]
661 pub struct VideoFormatFlags: u32 {
662 #[doc(alias = "GST_VIDEO_FORMAT_FLAG_YUV")]
663 const YUV = ffi::GST_VIDEO_FORMAT_FLAG_YUV as _;
664 #[doc(alias = "GST_VIDEO_FORMAT_FLAG_RGB")]
665 const RGB = ffi::GST_VIDEO_FORMAT_FLAG_RGB as _;
666 #[doc(alias = "GST_VIDEO_FORMAT_FLAG_GRAY")]
667 const GRAY = ffi::GST_VIDEO_FORMAT_FLAG_GRAY as _;
668 #[doc(alias = "GST_VIDEO_FORMAT_FLAG_ALPHA")]
669 const ALPHA = ffi::GST_VIDEO_FORMAT_FLAG_ALPHA as _;
670 #[doc(alias = "GST_VIDEO_FORMAT_FLAG_LE")]
671 const LE = ffi::GST_VIDEO_FORMAT_FLAG_LE as _;
672 #[doc(alias = "GST_VIDEO_FORMAT_FLAG_PALETTE")]
673 const PALETTE = ffi::GST_VIDEO_FORMAT_FLAG_PALETTE as _;
674 #[doc(alias = "GST_VIDEO_FORMAT_FLAG_COMPLEX")]
675 const COMPLEX = ffi::GST_VIDEO_FORMAT_FLAG_COMPLEX as _;
676 #[doc(alias = "GST_VIDEO_FORMAT_FLAG_UNPACK")]
677 const UNPACK = ffi::GST_VIDEO_FORMAT_FLAG_UNPACK as _;
678 #[doc(alias = "GST_VIDEO_FORMAT_FLAG_TILED")]
679 const TILED = ffi::GST_VIDEO_FORMAT_FLAG_TILED as _;
680 #[cfg(feature = "v1_22")]
681 #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
682 #[doc(alias = "GST_VIDEO_FORMAT_FLAG_SUBTILES")]
683 const SUBTILES = ffi::GST_VIDEO_FORMAT_FLAG_SUBTILES as _;
684 }
685}
686
687#[doc(hidden)]
688impl IntoGlib for VideoFormatFlags {
689 type GlibType = ffi::GstVideoFormatFlags;
690
691 #[inline]
692 fn into_glib(self) -> ffi::GstVideoFormatFlags {
693 self.bits()
694 }
695}
696
697#[doc(hidden)]
698impl FromGlib<ffi::GstVideoFormatFlags> for VideoFormatFlags {
699 #[inline]
700 unsafe fn from_glib(value: ffi::GstVideoFormatFlags) -> Self {
701 skip_assert_initialized!();
702 Self::from_bits_truncate(bits:value)
703 }
704}
705
706impl StaticType for VideoFormatFlags {
707 #[inline]
708 #[doc(alias = "gst_video_format_flags_get_type")]
709 fn static_type() -> glib::Type {
710 unsafe { from_glib(val:ffi::gst_video_format_flags_get_type()) }
711 }
712}
713
714impl glib::HasParamSpec for VideoFormatFlags {
715 type ParamSpec = glib::ParamSpecFlags;
716 type SetValue = Self;
717 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
718
719 fn param_spec_builder() -> Self::BuilderFn {
720 Self::ParamSpec::builder
721 }
722}
723
724impl glib::value::ValueType for VideoFormatFlags {
725 type Type = Self;
726}
727
728unsafe impl<'a> glib::value::FromValue<'a> for VideoFormatFlags {
729 type Checker = glib::value::GenericValueTypeChecker<Self>;
730
731 #[inline]
732 unsafe fn from_value(value: &'a glib::Value) -> Self {
733 skip_assert_initialized!();
734 from_glib(val:glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
735 }
736}
737
738impl ToValue for VideoFormatFlags {
739 #[inline]
740 fn to_value(&self) -> glib::Value {
741 let mut value: Value = glib::Value::for_value_type::<Self>();
742 unsafe {
743 glib::gobject_ffi::g_value_set_flags(value:value.to_glib_none_mut().0, self.into_glib());
744 }
745 value
746 }
747
748 #[inline]
749 fn value_type(&self) -> glib::Type {
750 Self::static_type()
751 }
752}
753
754impl From<VideoFormatFlags> for glib::Value {
755 #[inline]
756 fn from(v: VideoFormatFlags) -> Self {
757 skip_assert_initialized!();
758 ToValue::to_value(&v)
759 }
760}
761
762bitflags! {
763 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
764 #[doc(alias = "GstVideoFrameFlags")]
765 pub struct VideoFrameFlags: u32 {
766 #[doc(alias = "GST_VIDEO_FRAME_FLAG_INTERLACED")]
767 const INTERLACED = ffi::GST_VIDEO_FRAME_FLAG_INTERLACED as _;
768 #[doc(alias = "GST_VIDEO_FRAME_FLAG_TFF")]
769 const TFF = ffi::GST_VIDEO_FRAME_FLAG_TFF as _;
770 #[doc(alias = "GST_VIDEO_FRAME_FLAG_RFF")]
771 const RFF = ffi::GST_VIDEO_FRAME_FLAG_RFF as _;
772 #[doc(alias = "GST_VIDEO_FRAME_FLAG_ONEFIELD")]
773 const ONEFIELD = ffi::GST_VIDEO_FRAME_FLAG_ONEFIELD as _;
774 #[doc(alias = "GST_VIDEO_FRAME_FLAG_MULTIPLE_VIEW")]
775 const MULTIPLE_VIEW = ffi::GST_VIDEO_FRAME_FLAG_MULTIPLE_VIEW as _;
776 #[doc(alias = "GST_VIDEO_FRAME_FLAG_FIRST_IN_BUNDLE")]
777 const FIRST_IN_BUNDLE = ffi::GST_VIDEO_FRAME_FLAG_FIRST_IN_BUNDLE as _;
778 #[cfg(feature = "v1_16")]
779 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
780 #[doc(alias = "GST_VIDEO_FRAME_FLAG_TOP_FIELD")]
781 const TOP_FIELD = ffi::GST_VIDEO_FRAME_FLAG_TOP_FIELD as _;
782 #[cfg(feature = "v1_16")]
783 #[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
784 #[doc(alias = "GST_VIDEO_FRAME_FLAG_BOTTOM_FIELD")]
785 const BOTTOM_FIELD = ffi::GST_VIDEO_FRAME_FLAG_BOTTOM_FIELD as _;
786 }
787}
788
789#[doc(hidden)]
790impl IntoGlib for VideoFrameFlags {
791 type GlibType = ffi::GstVideoFrameFlags;
792
793 #[inline]
794 fn into_glib(self) -> ffi::GstVideoFrameFlags {
795 self.bits()
796 }
797}
798
799#[doc(hidden)]
800impl FromGlib<ffi::GstVideoFrameFlags> for VideoFrameFlags {
801 #[inline]
802 unsafe fn from_glib(value: ffi::GstVideoFrameFlags) -> Self {
803 skip_assert_initialized!();
804 Self::from_bits_truncate(bits:value)
805 }
806}
807
808impl StaticType for VideoFrameFlags {
809 #[inline]
810 #[doc(alias = "gst_video_frame_flags_get_type")]
811 fn static_type() -> glib::Type {
812 unsafe { from_glib(val:ffi::gst_video_frame_flags_get_type()) }
813 }
814}
815
816impl glib::HasParamSpec for VideoFrameFlags {
817 type ParamSpec = glib::ParamSpecFlags;
818 type SetValue = Self;
819 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
820
821 fn param_spec_builder() -> Self::BuilderFn {
822 Self::ParamSpec::builder
823 }
824}
825
826impl glib::value::ValueType for VideoFrameFlags {
827 type Type = Self;
828}
829
830unsafe impl<'a> glib::value::FromValue<'a> for VideoFrameFlags {
831 type Checker = glib::value::GenericValueTypeChecker<Self>;
832
833 #[inline]
834 unsafe fn from_value(value: &'a glib::Value) -> Self {
835 skip_assert_initialized!();
836 from_glib(val:glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
837 }
838}
839
840impl ToValue for VideoFrameFlags {
841 #[inline]
842 fn to_value(&self) -> glib::Value {
843 let mut value: Value = glib::Value::for_value_type::<Self>();
844 unsafe {
845 glib::gobject_ffi::g_value_set_flags(value:value.to_glib_none_mut().0, self.into_glib());
846 }
847 value
848 }
849
850 #[inline]
851 fn value_type(&self) -> glib::Type {
852 Self::static_type()
853 }
854}
855
856impl From<VideoFrameFlags> for glib::Value {
857 #[inline]
858 fn from(v: VideoFrameFlags) -> Self {
859 skip_assert_initialized!();
860 ToValue::to_value(&v)
861 }
862}
863
864bitflags! {
865 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
866 #[doc(alias = "GstVideoMultiviewFlags")]
867 pub struct VideoMultiviewFlags: u32 {
868 #[doc(alias = "GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST")]
869 const RIGHT_VIEW_FIRST = ffi::GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_VIEW_FIRST as _;
870 #[doc(alias = "GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED")]
871 const LEFT_FLIPPED = ffi::GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLIPPED as _;
872 #[doc(alias = "GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED")]
873 const LEFT_FLOPPED = ffi::GST_VIDEO_MULTIVIEW_FLAGS_LEFT_FLOPPED as _;
874 #[doc(alias = "GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED")]
875 const RIGHT_FLIPPED = ffi::GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLIPPED as _;
876 #[doc(alias = "GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED")]
877 const RIGHT_FLOPPED = ffi::GST_VIDEO_MULTIVIEW_FLAGS_RIGHT_FLOPPED as _;
878 #[doc(alias = "GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT")]
879 const HALF_ASPECT = ffi::GST_VIDEO_MULTIVIEW_FLAGS_HALF_ASPECT as _;
880 #[doc(alias = "GST_VIDEO_MULTIVIEW_FLAGS_MIXED_MONO")]
881 const MIXED_MONO = ffi::GST_VIDEO_MULTIVIEW_FLAGS_MIXED_MONO as _;
882 }
883}
884
885#[doc(hidden)]
886impl IntoGlib for VideoMultiviewFlags {
887 type GlibType = ffi::GstVideoMultiviewFlags;
888
889 #[inline]
890 fn into_glib(self) -> ffi::GstVideoMultiviewFlags {
891 self.bits()
892 }
893}
894
895#[doc(hidden)]
896impl FromGlib<ffi::GstVideoMultiviewFlags> for VideoMultiviewFlags {
897 #[inline]
898 unsafe fn from_glib(value: ffi::GstVideoMultiviewFlags) -> Self {
899 skip_assert_initialized!();
900 Self::from_bits_truncate(bits:value)
901 }
902}
903
904impl StaticType for VideoMultiviewFlags {
905 #[inline]
906 #[doc(alias = "gst_video_multiview_flags_get_type")]
907 fn static_type() -> glib::Type {
908 unsafe { from_glib(val:ffi::gst_video_multiview_flags_get_type()) }
909 }
910}
911
912impl glib::HasParamSpec for VideoMultiviewFlags {
913 type ParamSpec = glib::ParamSpecFlags;
914 type SetValue = Self;
915 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
916
917 fn param_spec_builder() -> Self::BuilderFn {
918 Self::ParamSpec::builder
919 }
920}
921
922impl glib::value::ValueType for VideoMultiviewFlags {
923 type Type = Self;
924}
925
926unsafe impl<'a> glib::value::FromValue<'a> for VideoMultiviewFlags {
927 type Checker = glib::value::GenericValueTypeChecker<Self>;
928
929 #[inline]
930 unsafe fn from_value(value: &'a glib::Value) -> Self {
931 skip_assert_initialized!();
932 from_glib(val:glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
933 }
934}
935
936impl ToValue for VideoMultiviewFlags {
937 #[inline]
938 fn to_value(&self) -> glib::Value {
939 let mut value: Value = glib::Value::for_value_type::<Self>();
940 unsafe {
941 glib::gobject_ffi::g_value_set_flags(value:value.to_glib_none_mut().0, self.into_glib());
942 }
943 value
944 }
945
946 #[inline]
947 fn value_type(&self) -> glib::Type {
948 Self::static_type()
949 }
950}
951
952impl From<VideoMultiviewFlags> for glib::Value {
953 #[inline]
954 fn from(v: VideoMultiviewFlags) -> Self {
955 skip_assert_initialized!();
956 ToValue::to_value(&v)
957 }
958}
959
960bitflags! {
961 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
962 #[doc(alias = "GstVideoOverlayFormatFlags")]
963 pub struct VideoOverlayFormatFlags: u32 {
964 #[doc(alias = "GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA")]
965 const PREMULTIPLIED_ALPHA = ffi::GST_VIDEO_OVERLAY_FORMAT_FLAG_PREMULTIPLIED_ALPHA as _;
966 #[doc(alias = "GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA")]
967 const GLOBAL_ALPHA = ffi::GST_VIDEO_OVERLAY_FORMAT_FLAG_GLOBAL_ALPHA as _;
968 }
969}
970
971#[doc(hidden)]
972impl IntoGlib for VideoOverlayFormatFlags {
973 type GlibType = ffi::GstVideoOverlayFormatFlags;
974
975 #[inline]
976 fn into_glib(self) -> ffi::GstVideoOverlayFormatFlags {
977 self.bits()
978 }
979}
980
981#[doc(hidden)]
982impl FromGlib<ffi::GstVideoOverlayFormatFlags> for VideoOverlayFormatFlags {
983 #[inline]
984 unsafe fn from_glib(value: ffi::GstVideoOverlayFormatFlags) -> Self {
985 skip_assert_initialized!();
986 Self::from_bits_truncate(bits:value)
987 }
988}
989
990#[cfg(feature = "v1_16")]
991#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
992impl StaticType for VideoOverlayFormatFlags {
993 #[inline]
994 #[doc(alias = "gst_video_overlay_format_flags_get_type")]
995 fn static_type() -> glib::Type {
996 unsafe { from_glib(ffi::gst_video_overlay_format_flags_get_type()) }
997 }
998}
999
1000#[cfg(feature = "v1_16")]
1001#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1002impl glib::HasParamSpec for VideoOverlayFormatFlags {
1003 type ParamSpec = glib::ParamSpecFlags;
1004 type SetValue = Self;
1005 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1006
1007 fn param_spec_builder() -> Self::BuilderFn {
1008 Self::ParamSpec::builder
1009 }
1010}
1011
1012#[cfg(feature = "v1_16")]
1013#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1014impl glib::value::ValueType for VideoOverlayFormatFlags {
1015 type Type = Self;
1016}
1017
1018#[cfg(feature = "v1_16")]
1019#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1020unsafe impl<'a> glib::value::FromValue<'a> for VideoOverlayFormatFlags {
1021 type Checker = glib::value::GenericValueTypeChecker<Self>;
1022
1023 #[inline]
1024 unsafe fn from_value(value: &'a glib::Value) -> Self {
1025 skip_assert_initialized!();
1026 from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1027 }
1028}
1029
1030#[cfg(feature = "v1_16")]
1031#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1032impl ToValue for VideoOverlayFormatFlags {
1033 #[inline]
1034 fn to_value(&self) -> glib::Value {
1035 let mut value = glib::Value::for_value_type::<Self>();
1036 unsafe {
1037 glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1038 }
1039 value
1040 }
1041
1042 #[inline]
1043 fn value_type(&self) -> glib::Type {
1044 Self::static_type()
1045 }
1046}
1047
1048#[cfg(feature = "v1_16")]
1049#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
1050impl From<VideoOverlayFormatFlags> for glib::Value {
1051 #[inline]
1052 fn from(v: VideoOverlayFormatFlags) -> Self {
1053 skip_assert_initialized!();
1054 ToValue::to_value(&v)
1055 }
1056}
1057
1058bitflags! {
1059 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1060 #[doc(alias = "GstVideoPackFlags")]
1061 pub struct VideoPackFlags: u32 {
1062 #[doc(alias = "GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE")]
1063 const TRUNCATE_RANGE = ffi::GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE as _;
1064 #[doc(alias = "GST_VIDEO_PACK_FLAG_INTERLACED")]
1065 const INTERLACED = ffi::GST_VIDEO_PACK_FLAG_INTERLACED as _;
1066 }
1067}
1068
1069#[doc(hidden)]
1070impl IntoGlib for VideoPackFlags {
1071 type GlibType = ffi::GstVideoPackFlags;
1072
1073 #[inline]
1074 fn into_glib(self) -> ffi::GstVideoPackFlags {
1075 self.bits()
1076 }
1077}
1078
1079#[doc(hidden)]
1080impl FromGlib<ffi::GstVideoPackFlags> for VideoPackFlags {
1081 #[inline]
1082 unsafe fn from_glib(value: ffi::GstVideoPackFlags) -> Self {
1083 skip_assert_initialized!();
1084 Self::from_bits_truncate(bits:value)
1085 }
1086}
1087
1088impl StaticType for VideoPackFlags {
1089 #[inline]
1090 #[doc(alias = "gst_video_pack_flags_get_type")]
1091 fn static_type() -> glib::Type {
1092 unsafe { from_glib(val:ffi::gst_video_pack_flags_get_type()) }
1093 }
1094}
1095
1096impl glib::HasParamSpec for VideoPackFlags {
1097 type ParamSpec = glib::ParamSpecFlags;
1098 type SetValue = Self;
1099 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1100
1101 fn param_spec_builder() -> Self::BuilderFn {
1102 Self::ParamSpec::builder
1103 }
1104}
1105
1106impl glib::value::ValueType for VideoPackFlags {
1107 type Type = Self;
1108}
1109
1110unsafe impl<'a> glib::value::FromValue<'a> for VideoPackFlags {
1111 type Checker = glib::value::GenericValueTypeChecker<Self>;
1112
1113 #[inline]
1114 unsafe fn from_value(value: &'a glib::Value) -> Self {
1115 skip_assert_initialized!();
1116 from_glib(val:glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1117 }
1118}
1119
1120impl ToValue for VideoPackFlags {
1121 #[inline]
1122 fn to_value(&self) -> glib::Value {
1123 let mut value: Value = glib::Value::for_value_type::<Self>();
1124 unsafe {
1125 glib::gobject_ffi::g_value_set_flags(value:value.to_glib_none_mut().0, self.into_glib());
1126 }
1127 value
1128 }
1129
1130 #[inline]
1131 fn value_type(&self) -> glib::Type {
1132 Self::static_type()
1133 }
1134}
1135
1136impl From<VideoPackFlags> for glib::Value {
1137 #[inline]
1138 fn from(v: VideoPackFlags) -> Self {
1139 skip_assert_initialized!();
1140 ToValue::to_value(&v)
1141 }
1142}
1143
1144bitflags! {
1145 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
1146 #[doc(alias = "GstVideoTimeCodeFlags")]
1147 pub struct VideoTimeCodeFlags: u32 {
1148 #[doc(alias = "GST_VIDEO_TIME_CODE_FLAGS_DROP_FRAME")]
1149 const DROP_FRAME = ffi::GST_VIDEO_TIME_CODE_FLAGS_DROP_FRAME as _;
1150 #[doc(alias = "GST_VIDEO_TIME_CODE_FLAGS_INTERLACED")]
1151 const INTERLACED = ffi::GST_VIDEO_TIME_CODE_FLAGS_INTERLACED as _;
1152 }
1153}
1154
1155#[doc(hidden)]
1156impl IntoGlib for VideoTimeCodeFlags {
1157 type GlibType = ffi::GstVideoTimeCodeFlags;
1158
1159 #[inline]
1160 fn into_glib(self) -> ffi::GstVideoTimeCodeFlags {
1161 self.bits()
1162 }
1163}
1164
1165#[doc(hidden)]
1166impl FromGlib<ffi::GstVideoTimeCodeFlags> for VideoTimeCodeFlags {
1167 #[inline]
1168 unsafe fn from_glib(value: ffi::GstVideoTimeCodeFlags) -> Self {
1169 skip_assert_initialized!();
1170 Self::from_bits_truncate(bits:value)
1171 }
1172}
1173
1174#[cfg(feature = "v1_18")]
1175#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1176impl StaticType for VideoTimeCodeFlags {
1177 #[inline]
1178 #[doc(alias = "gst_video_time_code_flags_get_type")]
1179 fn static_type() -> glib::Type {
1180 unsafe { from_glib(ffi::gst_video_time_code_flags_get_type()) }
1181 }
1182}
1183
1184#[cfg(feature = "v1_18")]
1185#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1186impl glib::HasParamSpec for VideoTimeCodeFlags {
1187 type ParamSpec = glib::ParamSpecFlags;
1188 type SetValue = Self;
1189 type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
1190
1191 fn param_spec_builder() -> Self::BuilderFn {
1192 Self::ParamSpec::builder
1193 }
1194}
1195
1196#[cfg(feature = "v1_18")]
1197#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1198impl glib::value::ValueType for VideoTimeCodeFlags {
1199 type Type = Self;
1200}
1201
1202#[cfg(feature = "v1_18")]
1203#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1204unsafe impl<'a> glib::value::FromValue<'a> for VideoTimeCodeFlags {
1205 type Checker = glib::value::GenericValueTypeChecker<Self>;
1206
1207 #[inline]
1208 unsafe fn from_value(value: &'a glib::Value) -> Self {
1209 skip_assert_initialized!();
1210 from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
1211 }
1212}
1213
1214#[cfg(feature = "v1_18")]
1215#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1216impl ToValue for VideoTimeCodeFlags {
1217 #[inline]
1218 fn to_value(&self) -> glib::Value {
1219 let mut value = glib::Value::for_value_type::<Self>();
1220 unsafe {
1221 glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
1222 }
1223 value
1224 }
1225
1226 #[inline]
1227 fn value_type(&self) -> glib::Type {
1228 Self::static_type()
1229 }
1230}
1231
1232#[cfg(feature = "v1_18")]
1233#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
1234impl From<VideoTimeCodeFlags> for glib::Value {
1235 #[inline]
1236 fn from(v: VideoTimeCodeFlags) -> Self {
1237 skip_assert_initialized!();
1238 ToValue::to_value(&v)
1239 }
1240}
1241