1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use glib::translate::*;
use glib::value::FromValue;
use glib::value::FromValueOptional;
use glib::value::SetValue;
use glib::value::Value;
use glib::StaticType;
use glib::Type;
use gobject_sys;
use gst_video_sys;

bitflags! {
    pub struct VideoBufferFlags: u32 {
        const INTERLACED = 1048576;
        const TFF = 2097152;
        const RFF = 4194304;
        const ONEFIELD = 8388608;
        const MULTIPLE_VIEW = 16777216;
        const FIRST_IN_BUNDLE = 33554432;
        const TOP_FIELD = 10485760;
        const BOTTOM_FIELD = 8388608;
        const LAST = 268435456;
    }
}

#[doc(hidden)]
impl ToGlib for VideoBufferFlags {
    type GlibType = gst_video_sys::GstVideoBufferFlags;

    fn to_glib(&self) -> gst_video_sys::GstVideoBufferFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoBufferFlags> for VideoBufferFlags {
    fn from_glib(value: gst_video_sys::GstVideoBufferFlags) -> VideoBufferFlags {
        skip_assert_initialized!();
        VideoBufferFlags::from_bits_truncate(value)
    }
}

impl StaticType for VideoBufferFlags {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_buffer_flags_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoBufferFlags {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoBufferFlags {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
    }
}

impl SetValue for VideoBufferFlags {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
    }
}

bitflags! {
    pub struct VideoChromaSite: u32 {
        const UNKNOWN = 0;
        const NONE = 1;
        const H_COSITED = 2;
        const V_COSITED = 4;
        const ALT_LINE = 8;
        const COSITED = 6;
        const JPEG = 1;
        const MPEG2 = 2;
        const DV = 14;
    }
}

#[doc(hidden)]
impl ToGlib for VideoChromaSite {
    type GlibType = gst_video_sys::GstVideoChromaSite;

    fn to_glib(&self) -> gst_video_sys::GstVideoChromaSite {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoChromaSite> for VideoChromaSite {
    fn from_glib(value: gst_video_sys::GstVideoChromaSite) -> VideoChromaSite {
        skip_assert_initialized!();
        VideoChromaSite::from_bits_truncate(value)
    }
}

impl StaticType for VideoChromaSite {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_chroma_site_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoChromaSite {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoChromaSite {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
    }
}

impl SetValue for VideoChromaSite {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
    }
}

bitflags! {
    pub struct VideoCodecFrameFlags: u32 {
        const DECODE_ONLY = 1;
        const SYNC_POINT = 2;
        const FORCE_KEYFRAME = 4;
        const FORCE_KEYFRAME_HEADERS = 8;
    }
}

#[doc(hidden)]
impl ToGlib for VideoCodecFrameFlags {
    type GlibType = gst_video_sys::GstVideoCodecFrameFlags;

    fn to_glib(&self) -> gst_video_sys::GstVideoCodecFrameFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoCodecFrameFlags> for VideoCodecFrameFlags {
    fn from_glib(value: gst_video_sys::GstVideoCodecFrameFlags) -> VideoCodecFrameFlags {
        skip_assert_initialized!();
        VideoCodecFrameFlags::from_bits_truncate(value)
    }
}

bitflags! {
    pub struct VideoFlags: u32 {
        const NONE = 0;
        const VARIABLE_FPS = 1;
        const PREMULTIPLIED_ALPHA = 2;
    }
}

#[doc(hidden)]
impl ToGlib for VideoFlags {
    type GlibType = gst_video_sys::GstVideoFlags;

    fn to_glib(&self) -> gst_video_sys::GstVideoFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoFlags> for VideoFlags {
    fn from_glib(value: gst_video_sys::GstVideoFlags) -> VideoFlags {
        skip_assert_initialized!();
        VideoFlags::from_bits_truncate(value)
    }
}

impl StaticType for VideoFlags {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_flags_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoFlags {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoFlags {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
    }
}

impl SetValue for VideoFlags {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
    }
}

bitflags! {
    pub struct VideoFormatFlags: u32 {
        const YUV = 1;
        const RGB = 2;
        const GRAY = 4;
        const ALPHA = 8;
        const LE = 16;
        const PALETTE = 32;
        const COMPLEX = 64;
        const UNPACK = 128;
        const TILED = 256;
    }
}

#[doc(hidden)]
impl ToGlib for VideoFormatFlags {
    type GlibType = gst_video_sys::GstVideoFormatFlags;

    fn to_glib(&self) -> gst_video_sys::GstVideoFormatFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoFormatFlags> for VideoFormatFlags {
    fn from_glib(value: gst_video_sys::GstVideoFormatFlags) -> VideoFormatFlags {
        skip_assert_initialized!();
        VideoFormatFlags::from_bits_truncate(value)
    }
}

impl StaticType for VideoFormatFlags {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_format_flags_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoFormatFlags {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoFormatFlags {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
    }
}

impl SetValue for VideoFormatFlags {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
    }
}

bitflags! {
    pub struct VideoFrameFlags: u32 {
        const NONE = 0;
        const INTERLACED = 1;
        const TFF = 2;
        const RFF = 4;
        const ONEFIELD = 8;
        const MULTIPLE_VIEW = 16;
        const FIRST_IN_BUNDLE = 32;
        const TOP_FIELD = 10;
        const BOTTOM_FIELD = 8;
    }
}

#[doc(hidden)]
impl ToGlib for VideoFrameFlags {
    type GlibType = gst_video_sys::GstVideoFrameFlags;

    fn to_glib(&self) -> gst_video_sys::GstVideoFrameFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoFrameFlags> for VideoFrameFlags {
    fn from_glib(value: gst_video_sys::GstVideoFrameFlags) -> VideoFrameFlags {
        skip_assert_initialized!();
        VideoFrameFlags::from_bits_truncate(value)
    }
}

impl StaticType for VideoFrameFlags {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_frame_flags_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoFrameFlags {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoFrameFlags {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
    }
}

impl SetValue for VideoFrameFlags {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
    }
}

bitflags! {
    pub struct VideoMultiviewFlags: u32 {
        const NONE = 0;
        const RIGHT_VIEW_FIRST = 1;
        const LEFT_FLIPPED = 2;
        const LEFT_FLOPPED = 4;
        const RIGHT_FLIPPED = 8;
        const RIGHT_FLOPPED = 16;
        const HALF_ASPECT = 16384;
        const MIXED_MONO = 32768;
    }
}

#[doc(hidden)]
impl ToGlib for VideoMultiviewFlags {
    type GlibType = gst_video_sys::GstVideoMultiviewFlags;

    fn to_glib(&self) -> gst_video_sys::GstVideoMultiviewFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoMultiviewFlags> for VideoMultiviewFlags {
    fn from_glib(value: gst_video_sys::GstVideoMultiviewFlags) -> VideoMultiviewFlags {
        skip_assert_initialized!();
        VideoMultiviewFlags::from_bits_truncate(value)
    }
}

impl StaticType for VideoMultiviewFlags {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_multiview_flags_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoMultiviewFlags {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoMultiviewFlags {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
    }
}

impl SetValue for VideoMultiviewFlags {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
    }
}

bitflags! {
    pub struct VideoOverlayFormatFlags: u32 {
        const NONE = 0;
        const PREMULTIPLIED_ALPHA = 1;
        const GLOBAL_ALPHA = 2;
    }
}

#[doc(hidden)]
impl ToGlib for VideoOverlayFormatFlags {
    type GlibType = gst_video_sys::GstVideoOverlayFormatFlags;

    fn to_glib(&self) -> gst_video_sys::GstVideoOverlayFormatFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoOverlayFormatFlags> for VideoOverlayFormatFlags {
    fn from_glib(value: gst_video_sys::GstVideoOverlayFormatFlags) -> VideoOverlayFormatFlags {
        skip_assert_initialized!();
        VideoOverlayFormatFlags::from_bits_truncate(value)
    }
}

impl StaticType for VideoOverlayFormatFlags {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_overlay_format_flags_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoOverlayFormatFlags {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoOverlayFormatFlags {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
    }
}

impl SetValue for VideoOverlayFormatFlags {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
    }
}

bitflags! {
    pub struct VideoPackFlags: u32 {
        const NONE = 0;
        const TRUNCATE_RANGE = 1;
        const INTERLACED = 2;
    }
}

#[doc(hidden)]
impl ToGlib for VideoPackFlags {
    type GlibType = gst_video_sys::GstVideoPackFlags;

    fn to_glib(&self) -> gst_video_sys::GstVideoPackFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoPackFlags> for VideoPackFlags {
    fn from_glib(value: gst_video_sys::GstVideoPackFlags) -> VideoPackFlags {
        skip_assert_initialized!();
        VideoPackFlags::from_bits_truncate(value)
    }
}

impl StaticType for VideoPackFlags {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_pack_flags_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoPackFlags {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoPackFlags {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
    }
}

impl SetValue for VideoPackFlags {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[cfg(any(feature = "v1_10", feature = "dox"))]
bitflags! {
    pub struct VideoTimeCodeFlags: u32 {
        const NONE = 0;
        const DROP_FRAME = 1;
        const INTERLACED = 2;
    }
}

#[cfg(any(feature = "v1_10", feature = "dox"))]
#[doc(hidden)]
impl ToGlib for VideoTimeCodeFlags {
    type GlibType = gst_video_sys::GstVideoTimeCodeFlags;

    fn to_glib(&self) -> gst_video_sys::GstVideoTimeCodeFlags {
        self.bits()
    }
}

#[cfg(any(feature = "v1_10", feature = "dox"))]
#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoTimeCodeFlags> for VideoTimeCodeFlags {
    fn from_glib(value: gst_video_sys::GstVideoTimeCodeFlags) -> VideoTimeCodeFlags {
        skip_assert_initialized!();
        VideoTimeCodeFlags::from_bits_truncate(value)
    }
}