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 | |
6 | use glib::{prelude::*, translate::*, GStr}; |
7 | use std::fmt; |
8 | |
9 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
10 | #[non_exhaustive ] |
11 | #[doc (alias = "GstColorBalanceType" )] |
12 | pub enum ColorBalanceType { |
13 | #[doc (alias = "GST_COLOR_BALANCE_HARDWARE" )] |
14 | Hardware, |
15 | #[doc (alias = "GST_COLOR_BALANCE_SOFTWARE" )] |
16 | Software, |
17 | #[doc (hidden)] |
18 | __Unknown(i32), |
19 | } |
20 | |
21 | #[doc (hidden)] |
22 | impl IntoGlib for ColorBalanceType { |
23 | type GlibType = ffi::GstColorBalanceType; |
24 | |
25 | #[inline ] |
26 | fn into_glib(self) -> ffi::GstColorBalanceType { |
27 | match self { |
28 | Self::Hardware => ffi::GST_COLOR_BALANCE_HARDWARE, |
29 | Self::Software => ffi::GST_COLOR_BALANCE_SOFTWARE, |
30 | Self::__Unknown(value: i32) => value, |
31 | } |
32 | } |
33 | } |
34 | |
35 | #[doc (hidden)] |
36 | impl FromGlib<ffi::GstColorBalanceType> for ColorBalanceType { |
37 | #[inline ] |
38 | unsafe fn from_glib(value: ffi::GstColorBalanceType) -> Self { |
39 | skip_assert_initialized!(); |
40 | |
41 | match value { |
42 | ffi::GST_COLOR_BALANCE_HARDWARE => Self::Hardware, |
43 | ffi::GST_COLOR_BALANCE_SOFTWARE => Self::Software, |
44 | value: i32 => Self::__Unknown(value), |
45 | } |
46 | } |
47 | } |
48 | |
49 | impl StaticType for ColorBalanceType { |
50 | #[inline ] |
51 | #[doc (alias = "gst_color_balance_type_get_type" )] |
52 | fn static_type() -> glib::Type { |
53 | unsafe { from_glib(val:ffi::gst_color_balance_type_get_type()) } |
54 | } |
55 | } |
56 | |
57 | impl glib::HasParamSpec for ColorBalanceType { |
58 | type ParamSpec = glib::ParamSpecEnum; |
59 | type SetValue = Self; |
60 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
61 | |
62 | fn param_spec_builder() -> Self::BuilderFn { |
63 | Self::ParamSpec::builder_with_default |
64 | } |
65 | } |
66 | |
67 | impl glib::value::ValueType for ColorBalanceType { |
68 | type Type = Self; |
69 | } |
70 | |
71 | unsafe impl<'a> glib::value::FromValue<'a> for ColorBalanceType { |
72 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
73 | |
74 | #[inline ] |
75 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
76 | skip_assert_initialized!(); |
77 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
78 | } |
79 | } |
80 | |
81 | impl ToValue for ColorBalanceType { |
82 | #[inline ] |
83 | fn to_value(&self) -> glib::Value { |
84 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
85 | unsafe { |
86 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
87 | } |
88 | value |
89 | } |
90 | |
91 | #[inline ] |
92 | fn value_type(&self) -> glib::Type { |
93 | Self::static_type() |
94 | } |
95 | } |
96 | |
97 | impl From<ColorBalanceType> for glib::Value { |
98 | #[inline ] |
99 | fn from(v: ColorBalanceType) -> Self { |
100 | skip_assert_initialized!(); |
101 | ToValue::to_value(&v) |
102 | } |
103 | } |
104 | |
105 | #[cfg_attr (feature = "serde" , derive(serde::Serialize, serde::Deserialize))] |
106 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
107 | #[non_exhaustive ] |
108 | #[doc (alias = "GstNavigationCommand" )] |
109 | pub enum NavigationCommand { |
110 | #[doc (alias = "GST_NAVIGATION_COMMAND_INVALID" )] |
111 | Invalid, |
112 | #[doc (alias = "GST_NAVIGATION_COMMAND_MENU1" )] |
113 | Menu1, |
114 | #[doc (alias = "GST_NAVIGATION_COMMAND_MENU2" )] |
115 | Menu2, |
116 | #[doc (alias = "GST_NAVIGATION_COMMAND_MENU3" )] |
117 | Menu3, |
118 | #[doc (alias = "GST_NAVIGATION_COMMAND_MENU4" )] |
119 | Menu4, |
120 | #[doc (alias = "GST_NAVIGATION_COMMAND_MENU5" )] |
121 | Menu5, |
122 | #[doc (alias = "GST_NAVIGATION_COMMAND_MENU6" )] |
123 | Menu6, |
124 | #[doc (alias = "GST_NAVIGATION_COMMAND_MENU7" )] |
125 | Menu7, |
126 | #[doc (alias = "GST_NAVIGATION_COMMAND_LEFT" )] |
127 | Left, |
128 | #[doc (alias = "GST_NAVIGATION_COMMAND_RIGHT" )] |
129 | Right, |
130 | #[doc (alias = "GST_NAVIGATION_COMMAND_UP" )] |
131 | Up, |
132 | #[doc (alias = "GST_NAVIGATION_COMMAND_DOWN" )] |
133 | Down, |
134 | #[doc (alias = "GST_NAVIGATION_COMMAND_ACTIVATE" )] |
135 | Activate, |
136 | #[doc (alias = "GST_NAVIGATION_COMMAND_PREV_ANGLE" )] |
137 | PrevAngle, |
138 | #[doc (alias = "GST_NAVIGATION_COMMAND_NEXT_ANGLE" )] |
139 | NextAngle, |
140 | #[doc (hidden)] |
141 | __Unknown(i32), |
142 | } |
143 | |
144 | #[doc (hidden)] |
145 | impl IntoGlib for NavigationCommand { |
146 | type GlibType = ffi::GstNavigationCommand; |
147 | |
148 | fn into_glib(self) -> ffi::GstNavigationCommand { |
149 | match self { |
150 | Self::Invalid => ffi::GST_NAVIGATION_COMMAND_INVALID, |
151 | Self::Menu1 => ffi::GST_NAVIGATION_COMMAND_MENU1, |
152 | Self::Menu2 => ffi::GST_NAVIGATION_COMMAND_MENU2, |
153 | Self::Menu3 => ffi::GST_NAVIGATION_COMMAND_MENU3, |
154 | Self::Menu4 => ffi::GST_NAVIGATION_COMMAND_MENU4, |
155 | Self::Menu5 => ffi::GST_NAVIGATION_COMMAND_MENU5, |
156 | Self::Menu6 => ffi::GST_NAVIGATION_COMMAND_MENU6, |
157 | Self::Menu7 => ffi::GST_NAVIGATION_COMMAND_MENU7, |
158 | Self::Left => ffi::GST_NAVIGATION_COMMAND_LEFT, |
159 | Self::Right => ffi::GST_NAVIGATION_COMMAND_RIGHT, |
160 | Self::Up => ffi::GST_NAVIGATION_COMMAND_UP, |
161 | Self::Down => ffi::GST_NAVIGATION_COMMAND_DOWN, |
162 | Self::Activate => ffi::GST_NAVIGATION_COMMAND_ACTIVATE, |
163 | Self::PrevAngle => ffi::GST_NAVIGATION_COMMAND_PREV_ANGLE, |
164 | Self::NextAngle => ffi::GST_NAVIGATION_COMMAND_NEXT_ANGLE, |
165 | Self::__Unknown(value: i32) => value, |
166 | } |
167 | } |
168 | } |
169 | |
170 | #[doc (hidden)] |
171 | impl FromGlib<ffi::GstNavigationCommand> for NavigationCommand { |
172 | unsafe fn from_glib(value: ffi::GstNavigationCommand) -> Self { |
173 | skip_assert_initialized!(); |
174 | |
175 | match value { |
176 | ffi::GST_NAVIGATION_COMMAND_INVALID => Self::Invalid, |
177 | ffi::GST_NAVIGATION_COMMAND_MENU1 => Self::Menu1, |
178 | ffi::GST_NAVIGATION_COMMAND_MENU2 => Self::Menu2, |
179 | ffi::GST_NAVIGATION_COMMAND_MENU3 => Self::Menu3, |
180 | ffi::GST_NAVIGATION_COMMAND_MENU4 => Self::Menu4, |
181 | ffi::GST_NAVIGATION_COMMAND_MENU5 => Self::Menu5, |
182 | ffi::GST_NAVIGATION_COMMAND_MENU6 => Self::Menu6, |
183 | ffi::GST_NAVIGATION_COMMAND_MENU7 => Self::Menu7, |
184 | ffi::GST_NAVIGATION_COMMAND_LEFT => Self::Left, |
185 | ffi::GST_NAVIGATION_COMMAND_RIGHT => Self::Right, |
186 | ffi::GST_NAVIGATION_COMMAND_UP => Self::Up, |
187 | ffi::GST_NAVIGATION_COMMAND_DOWN => Self::Down, |
188 | ffi::GST_NAVIGATION_COMMAND_ACTIVATE => Self::Activate, |
189 | ffi::GST_NAVIGATION_COMMAND_PREV_ANGLE => Self::PrevAngle, |
190 | ffi::GST_NAVIGATION_COMMAND_NEXT_ANGLE => Self::NextAngle, |
191 | value: i32 => Self::__Unknown(value), |
192 | } |
193 | } |
194 | } |
195 | |
196 | impl StaticType for NavigationCommand { |
197 | #[inline ] |
198 | #[doc (alias = "gst_navigation_command_get_type" )] |
199 | fn static_type() -> glib::Type { |
200 | unsafe { from_glib(val:ffi::gst_navigation_command_get_type()) } |
201 | } |
202 | } |
203 | |
204 | impl glib::HasParamSpec for NavigationCommand { |
205 | type ParamSpec = glib::ParamSpecEnum; |
206 | type SetValue = Self; |
207 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
208 | |
209 | fn param_spec_builder() -> Self::BuilderFn { |
210 | Self::ParamSpec::builder_with_default |
211 | } |
212 | } |
213 | |
214 | impl glib::value::ValueType for NavigationCommand { |
215 | type Type = Self; |
216 | } |
217 | |
218 | unsafe impl<'a> glib::value::FromValue<'a> for NavigationCommand { |
219 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
220 | |
221 | #[inline ] |
222 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
223 | skip_assert_initialized!(); |
224 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
225 | } |
226 | } |
227 | |
228 | impl ToValue for NavigationCommand { |
229 | #[inline ] |
230 | fn to_value(&self) -> glib::Value { |
231 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
232 | unsafe { |
233 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
234 | } |
235 | value |
236 | } |
237 | |
238 | #[inline ] |
239 | fn value_type(&self) -> glib::Type { |
240 | Self::static_type() |
241 | } |
242 | } |
243 | |
244 | impl From<NavigationCommand> for glib::Value { |
245 | #[inline ] |
246 | fn from(v: NavigationCommand) -> Self { |
247 | skip_assert_initialized!(); |
248 | ToValue::to_value(&v) |
249 | } |
250 | } |
251 | |
252 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
253 | #[non_exhaustive ] |
254 | #[doc (alias = "GstNavigationEventType" )] |
255 | pub enum NavigationEventType { |
256 | #[doc (alias = "GST_NAVIGATION_EVENT_INVALID" )] |
257 | Invalid, |
258 | #[doc (alias = "GST_NAVIGATION_EVENT_KEY_PRESS" )] |
259 | KeyPress, |
260 | #[doc (alias = "GST_NAVIGATION_EVENT_KEY_RELEASE" )] |
261 | KeyRelease, |
262 | #[doc (alias = "GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS" )] |
263 | MouseButtonPress, |
264 | #[doc (alias = "GST_NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE" )] |
265 | MouseButtonRelease, |
266 | #[doc (alias = "GST_NAVIGATION_EVENT_MOUSE_MOVE" )] |
267 | MouseMove, |
268 | #[doc (alias = "GST_NAVIGATION_EVENT_COMMAND" )] |
269 | Command, |
270 | #[cfg (feature = "v1_18" )] |
271 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
272 | #[doc (alias = "GST_NAVIGATION_EVENT_MOUSE_SCROLL" )] |
273 | MouseScroll, |
274 | #[cfg (feature = "v1_22" )] |
275 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_22" )))] |
276 | #[doc (alias = "GST_NAVIGATION_EVENT_TOUCH_DOWN" )] |
277 | TouchDown, |
278 | #[cfg (feature = "v1_22" )] |
279 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_22" )))] |
280 | #[doc (alias = "GST_NAVIGATION_EVENT_TOUCH_MOTION" )] |
281 | TouchMotion, |
282 | #[cfg (feature = "v1_22" )] |
283 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_22" )))] |
284 | #[doc (alias = "GST_NAVIGATION_EVENT_TOUCH_UP" )] |
285 | TouchUp, |
286 | #[cfg (feature = "v1_22" )] |
287 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_22" )))] |
288 | #[doc (alias = "GST_NAVIGATION_EVENT_TOUCH_FRAME" )] |
289 | TouchFrame, |
290 | #[cfg (feature = "v1_22" )] |
291 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_22" )))] |
292 | #[doc (alias = "GST_NAVIGATION_EVENT_TOUCH_CANCEL" )] |
293 | TouchCancel, |
294 | #[doc (hidden)] |
295 | __Unknown(i32), |
296 | } |
297 | |
298 | #[doc (hidden)] |
299 | impl IntoGlib for NavigationEventType { |
300 | type GlibType = ffi::GstNavigationEventType; |
301 | |
302 | fn into_glib(self) -> ffi::GstNavigationEventType { |
303 | match self { |
304 | Self::Invalid => ffi::GST_NAVIGATION_EVENT_INVALID, |
305 | Self::KeyPress => ffi::GST_NAVIGATION_EVENT_KEY_PRESS, |
306 | Self::KeyRelease => ffi::GST_NAVIGATION_EVENT_KEY_RELEASE, |
307 | Self::MouseButtonPress => ffi::GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS, |
308 | Self::MouseButtonRelease => ffi::GST_NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE, |
309 | Self::MouseMove => ffi::GST_NAVIGATION_EVENT_MOUSE_MOVE, |
310 | Self::Command => ffi::GST_NAVIGATION_EVENT_COMMAND, |
311 | #[cfg (feature = "v1_18" )] |
312 | Self::MouseScroll => ffi::GST_NAVIGATION_EVENT_MOUSE_SCROLL, |
313 | #[cfg (feature = "v1_22" )] |
314 | Self::TouchDown => ffi::GST_NAVIGATION_EVENT_TOUCH_DOWN, |
315 | #[cfg (feature = "v1_22" )] |
316 | Self::TouchMotion => ffi::GST_NAVIGATION_EVENT_TOUCH_MOTION, |
317 | #[cfg (feature = "v1_22" )] |
318 | Self::TouchUp => ffi::GST_NAVIGATION_EVENT_TOUCH_UP, |
319 | #[cfg (feature = "v1_22" )] |
320 | Self::TouchFrame => ffi::GST_NAVIGATION_EVENT_TOUCH_FRAME, |
321 | #[cfg (feature = "v1_22" )] |
322 | Self::TouchCancel => ffi::GST_NAVIGATION_EVENT_TOUCH_CANCEL, |
323 | Self::__Unknown(value) => value, |
324 | } |
325 | } |
326 | } |
327 | |
328 | #[doc (hidden)] |
329 | impl FromGlib<ffi::GstNavigationEventType> for NavigationEventType { |
330 | unsafe fn from_glib(value: ffi::GstNavigationEventType) -> Self { |
331 | skip_assert_initialized!(); |
332 | |
333 | match value { |
334 | ffi::GST_NAVIGATION_EVENT_INVALID => Self::Invalid, |
335 | ffi::GST_NAVIGATION_EVENT_KEY_PRESS => Self::KeyPress, |
336 | ffi::GST_NAVIGATION_EVENT_KEY_RELEASE => Self::KeyRelease, |
337 | ffi::GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS => Self::MouseButtonPress, |
338 | ffi::GST_NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE => Self::MouseButtonRelease, |
339 | ffi::GST_NAVIGATION_EVENT_MOUSE_MOVE => Self::MouseMove, |
340 | ffi::GST_NAVIGATION_EVENT_COMMAND => Self::Command, |
341 | #[cfg (feature = "v1_18" )] |
342 | ffi::GST_NAVIGATION_EVENT_MOUSE_SCROLL => Self::MouseScroll, |
343 | #[cfg (feature = "v1_22" )] |
344 | ffi::GST_NAVIGATION_EVENT_TOUCH_DOWN => Self::TouchDown, |
345 | #[cfg (feature = "v1_22" )] |
346 | ffi::GST_NAVIGATION_EVENT_TOUCH_MOTION => Self::TouchMotion, |
347 | #[cfg (feature = "v1_22" )] |
348 | ffi::GST_NAVIGATION_EVENT_TOUCH_UP => Self::TouchUp, |
349 | #[cfg (feature = "v1_22" )] |
350 | ffi::GST_NAVIGATION_EVENT_TOUCH_FRAME => Self::TouchFrame, |
351 | #[cfg (feature = "v1_22" )] |
352 | ffi::GST_NAVIGATION_EVENT_TOUCH_CANCEL => Self::TouchCancel, |
353 | value => Self::__Unknown(value), |
354 | } |
355 | } |
356 | } |
357 | |
358 | impl StaticType for NavigationEventType { |
359 | #[inline ] |
360 | #[doc (alias = "gst_navigation_event_type_get_type" )] |
361 | fn static_type() -> glib::Type { |
362 | unsafe { from_glib(val:ffi::gst_navigation_event_type_get_type()) } |
363 | } |
364 | } |
365 | |
366 | impl glib::HasParamSpec for NavigationEventType { |
367 | type ParamSpec = glib::ParamSpecEnum; |
368 | type SetValue = Self; |
369 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
370 | |
371 | fn param_spec_builder() -> Self::BuilderFn { |
372 | Self::ParamSpec::builder_with_default |
373 | } |
374 | } |
375 | |
376 | impl glib::value::ValueType for NavigationEventType { |
377 | type Type = Self; |
378 | } |
379 | |
380 | unsafe impl<'a> glib::value::FromValue<'a> for NavigationEventType { |
381 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
382 | |
383 | #[inline ] |
384 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
385 | skip_assert_initialized!(); |
386 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
387 | } |
388 | } |
389 | |
390 | impl ToValue for NavigationEventType { |
391 | #[inline ] |
392 | fn to_value(&self) -> glib::Value { |
393 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
394 | unsafe { |
395 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
396 | } |
397 | value |
398 | } |
399 | |
400 | #[inline ] |
401 | fn value_type(&self) -> glib::Type { |
402 | Self::static_type() |
403 | } |
404 | } |
405 | |
406 | impl From<NavigationEventType> for glib::Value { |
407 | #[inline ] |
408 | fn from(v: NavigationEventType) -> Self { |
409 | skip_assert_initialized!(); |
410 | ToValue::to_value(&v) |
411 | } |
412 | } |
413 | |
414 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
415 | #[non_exhaustive ] |
416 | #[doc (alias = "GstNavigationMessageType" )] |
417 | pub enum NavigationMessageType { |
418 | #[doc (alias = "GST_NAVIGATION_MESSAGE_INVALID" )] |
419 | Invalid, |
420 | #[doc (alias = "GST_NAVIGATION_MESSAGE_MOUSE_OVER" )] |
421 | MouseOver, |
422 | #[doc (alias = "GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED" )] |
423 | CommandsChanged, |
424 | #[doc (alias = "GST_NAVIGATION_MESSAGE_ANGLES_CHANGED" )] |
425 | AnglesChanged, |
426 | #[doc (alias = "GST_NAVIGATION_MESSAGE_EVENT" )] |
427 | Event, |
428 | #[doc (hidden)] |
429 | __Unknown(i32), |
430 | } |
431 | |
432 | #[doc (hidden)] |
433 | impl IntoGlib for NavigationMessageType { |
434 | type GlibType = ffi::GstNavigationMessageType; |
435 | |
436 | #[inline ] |
437 | fn into_glib(self) -> ffi::GstNavigationMessageType { |
438 | match self { |
439 | Self::Invalid => ffi::GST_NAVIGATION_MESSAGE_INVALID, |
440 | Self::MouseOver => ffi::GST_NAVIGATION_MESSAGE_MOUSE_OVER, |
441 | Self::CommandsChanged => ffi::GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED, |
442 | Self::AnglesChanged => ffi::GST_NAVIGATION_MESSAGE_ANGLES_CHANGED, |
443 | Self::Event => ffi::GST_NAVIGATION_MESSAGE_EVENT, |
444 | Self::__Unknown(value: i32) => value, |
445 | } |
446 | } |
447 | } |
448 | |
449 | #[doc (hidden)] |
450 | impl FromGlib<ffi::GstNavigationMessageType> for NavigationMessageType { |
451 | #[inline ] |
452 | unsafe fn from_glib(value: ffi::GstNavigationMessageType) -> Self { |
453 | skip_assert_initialized!(); |
454 | |
455 | match value { |
456 | ffi::GST_NAVIGATION_MESSAGE_INVALID => Self::Invalid, |
457 | ffi::GST_NAVIGATION_MESSAGE_MOUSE_OVER => Self::MouseOver, |
458 | ffi::GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED => Self::CommandsChanged, |
459 | ffi::GST_NAVIGATION_MESSAGE_ANGLES_CHANGED => Self::AnglesChanged, |
460 | ffi::GST_NAVIGATION_MESSAGE_EVENT => Self::Event, |
461 | value: i32 => Self::__Unknown(value), |
462 | } |
463 | } |
464 | } |
465 | |
466 | impl StaticType for NavigationMessageType { |
467 | #[inline ] |
468 | #[doc (alias = "gst_navigation_message_type_get_type" )] |
469 | fn static_type() -> glib::Type { |
470 | unsafe { from_glib(val:ffi::gst_navigation_message_type_get_type()) } |
471 | } |
472 | } |
473 | |
474 | impl glib::HasParamSpec for NavigationMessageType { |
475 | type ParamSpec = glib::ParamSpecEnum; |
476 | type SetValue = Self; |
477 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
478 | |
479 | fn param_spec_builder() -> Self::BuilderFn { |
480 | Self::ParamSpec::builder_with_default |
481 | } |
482 | } |
483 | |
484 | impl glib::value::ValueType for NavigationMessageType { |
485 | type Type = Self; |
486 | } |
487 | |
488 | unsafe impl<'a> glib::value::FromValue<'a> for NavigationMessageType { |
489 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
490 | |
491 | #[inline ] |
492 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
493 | skip_assert_initialized!(); |
494 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
495 | } |
496 | } |
497 | |
498 | impl ToValue for NavigationMessageType { |
499 | #[inline ] |
500 | fn to_value(&self) -> glib::Value { |
501 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
502 | unsafe { |
503 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
504 | } |
505 | value |
506 | } |
507 | |
508 | #[inline ] |
509 | fn value_type(&self) -> glib::Type { |
510 | Self::static_type() |
511 | } |
512 | } |
513 | |
514 | impl From<NavigationMessageType> for glib::Value { |
515 | #[inline ] |
516 | fn from(v: NavigationMessageType) -> Self { |
517 | skip_assert_initialized!(); |
518 | ToValue::to_value(&v) |
519 | } |
520 | } |
521 | |
522 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
523 | #[non_exhaustive ] |
524 | #[doc (alias = "GstNavigationQueryType" )] |
525 | pub enum NavigationQueryType { |
526 | #[doc (alias = "GST_NAVIGATION_QUERY_INVALID" )] |
527 | Invalid, |
528 | #[doc (alias = "GST_NAVIGATION_QUERY_COMMANDS" )] |
529 | Commands, |
530 | #[doc (alias = "GST_NAVIGATION_QUERY_ANGLES" )] |
531 | Angles, |
532 | #[doc (hidden)] |
533 | __Unknown(i32), |
534 | } |
535 | |
536 | #[doc (hidden)] |
537 | impl IntoGlib for NavigationQueryType { |
538 | type GlibType = ffi::GstNavigationQueryType; |
539 | |
540 | #[inline ] |
541 | fn into_glib(self) -> ffi::GstNavigationQueryType { |
542 | match self { |
543 | Self::Invalid => ffi::GST_NAVIGATION_QUERY_INVALID, |
544 | Self::Commands => ffi::GST_NAVIGATION_QUERY_COMMANDS, |
545 | Self::Angles => ffi::GST_NAVIGATION_QUERY_ANGLES, |
546 | Self::__Unknown(value: i32) => value, |
547 | } |
548 | } |
549 | } |
550 | |
551 | #[doc (hidden)] |
552 | impl FromGlib<ffi::GstNavigationQueryType> for NavigationQueryType { |
553 | #[inline ] |
554 | unsafe fn from_glib(value: ffi::GstNavigationQueryType) -> Self { |
555 | skip_assert_initialized!(); |
556 | |
557 | match value { |
558 | ffi::GST_NAVIGATION_QUERY_INVALID => Self::Invalid, |
559 | ffi::GST_NAVIGATION_QUERY_COMMANDS => Self::Commands, |
560 | ffi::GST_NAVIGATION_QUERY_ANGLES => Self::Angles, |
561 | value: i32 => Self::__Unknown(value), |
562 | } |
563 | } |
564 | } |
565 | |
566 | impl StaticType for NavigationQueryType { |
567 | #[inline ] |
568 | #[doc (alias = "gst_navigation_query_type_get_type" )] |
569 | fn static_type() -> glib::Type { |
570 | unsafe { from_glib(val:ffi::gst_navigation_query_type_get_type()) } |
571 | } |
572 | } |
573 | |
574 | impl glib::HasParamSpec for NavigationQueryType { |
575 | type ParamSpec = glib::ParamSpecEnum; |
576 | type SetValue = Self; |
577 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
578 | |
579 | fn param_spec_builder() -> Self::BuilderFn { |
580 | Self::ParamSpec::builder_with_default |
581 | } |
582 | } |
583 | |
584 | impl glib::value::ValueType for NavigationQueryType { |
585 | type Type = Self; |
586 | } |
587 | |
588 | unsafe impl<'a> glib::value::FromValue<'a> for NavigationQueryType { |
589 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
590 | |
591 | #[inline ] |
592 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
593 | skip_assert_initialized!(); |
594 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
595 | } |
596 | } |
597 | |
598 | impl ToValue for NavigationQueryType { |
599 | #[inline ] |
600 | fn to_value(&self) -> glib::Value { |
601 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
602 | unsafe { |
603 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
604 | } |
605 | value |
606 | } |
607 | |
608 | #[inline ] |
609 | fn value_type(&self) -> glib::Type { |
610 | Self::static_type() |
611 | } |
612 | } |
613 | |
614 | impl From<NavigationQueryType> for glib::Value { |
615 | #[inline ] |
616 | fn from(v: NavigationQueryType) -> Self { |
617 | skip_assert_initialized!(); |
618 | ToValue::to_value(&v) |
619 | } |
620 | } |
621 | |
622 | #[cfg (feature = "v1_18" )] |
623 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
624 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
625 | #[non_exhaustive ] |
626 | #[doc (alias = "GstVideoAFDSpec" )] |
627 | pub enum VideoAFDSpec { |
628 | #[doc (alias = "GST_VIDEO_AFD_SPEC_DVB_ETSI" )] |
629 | DvbEtsi, |
630 | #[doc (alias = "GST_VIDEO_AFD_SPEC_ATSC_A53" )] |
631 | AtscA53, |
632 | #[doc (alias = "GST_VIDEO_AFD_SPEC_SMPTE_ST2016_1" )] |
633 | SmpteSt20161, |
634 | #[doc (hidden)] |
635 | __Unknown(i32), |
636 | } |
637 | |
638 | #[cfg (feature = "v1_18" )] |
639 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
640 | #[doc (hidden)] |
641 | impl IntoGlib for VideoAFDSpec { |
642 | type GlibType = ffi::GstVideoAFDSpec; |
643 | |
644 | #[inline ] |
645 | fn into_glib(self) -> ffi::GstVideoAFDSpec { |
646 | match self { |
647 | Self::DvbEtsi => ffi::GST_VIDEO_AFD_SPEC_DVB_ETSI, |
648 | Self::AtscA53 => ffi::GST_VIDEO_AFD_SPEC_ATSC_A53, |
649 | Self::SmpteSt20161 => ffi::GST_VIDEO_AFD_SPEC_SMPTE_ST2016_1, |
650 | Self::__Unknown(value) => value, |
651 | } |
652 | } |
653 | } |
654 | |
655 | #[cfg (feature = "v1_18" )] |
656 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
657 | #[doc (hidden)] |
658 | impl FromGlib<ffi::GstVideoAFDSpec> for VideoAFDSpec { |
659 | #[inline ] |
660 | unsafe fn from_glib(value: ffi::GstVideoAFDSpec) -> Self { |
661 | skip_assert_initialized!(); |
662 | |
663 | match value { |
664 | ffi::GST_VIDEO_AFD_SPEC_DVB_ETSI => Self::DvbEtsi, |
665 | ffi::GST_VIDEO_AFD_SPEC_ATSC_A53 => Self::AtscA53, |
666 | ffi::GST_VIDEO_AFD_SPEC_SMPTE_ST2016_1 => Self::SmpteSt20161, |
667 | value => Self::__Unknown(value), |
668 | } |
669 | } |
670 | } |
671 | |
672 | #[cfg (feature = "v1_18" )] |
673 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
674 | impl StaticType for VideoAFDSpec { |
675 | #[inline ] |
676 | #[doc (alias = "gst_video_afd_spec_get_type" )] |
677 | fn static_type() -> glib::Type { |
678 | unsafe { from_glib(ffi::gst_video_afd_spec_get_type()) } |
679 | } |
680 | } |
681 | |
682 | #[cfg (feature = "v1_18" )] |
683 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
684 | impl glib::HasParamSpec for VideoAFDSpec { |
685 | type ParamSpec = glib::ParamSpecEnum; |
686 | type SetValue = Self; |
687 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
688 | |
689 | fn param_spec_builder() -> Self::BuilderFn { |
690 | Self::ParamSpec::builder_with_default |
691 | } |
692 | } |
693 | |
694 | #[cfg (feature = "v1_18" )] |
695 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
696 | impl glib::value::ValueType for VideoAFDSpec { |
697 | type Type = Self; |
698 | } |
699 | |
700 | #[cfg (feature = "v1_18" )] |
701 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
702 | unsafe impl<'a> glib::value::FromValue<'a> for VideoAFDSpec { |
703 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
704 | |
705 | #[inline ] |
706 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
707 | skip_assert_initialized!(); |
708 | from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
709 | } |
710 | } |
711 | |
712 | #[cfg (feature = "v1_18" )] |
713 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
714 | impl ToValue for VideoAFDSpec { |
715 | #[inline ] |
716 | fn to_value(&self) -> glib::Value { |
717 | let mut value = glib::Value::for_value_type::<Self>(); |
718 | unsafe { |
719 | glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); |
720 | } |
721 | value |
722 | } |
723 | |
724 | #[inline ] |
725 | fn value_type(&self) -> glib::Type { |
726 | Self::static_type() |
727 | } |
728 | } |
729 | |
730 | #[cfg (feature = "v1_18" )] |
731 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
732 | impl From<VideoAFDSpec> for glib::Value { |
733 | #[inline ] |
734 | fn from(v: VideoAFDSpec) -> Self { |
735 | skip_assert_initialized!(); |
736 | ToValue::to_value(&v) |
737 | } |
738 | } |
739 | |
740 | #[cfg (feature = "v1_18" )] |
741 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
742 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
743 | #[non_exhaustive ] |
744 | #[doc (alias = "GstVideoAFDValue" )] |
745 | pub enum VideoAFDValue { |
746 | #[doc (alias = "GST_VIDEO_AFD_UNAVAILABLE" )] |
747 | Unavailable, |
748 | #[doc (alias = "GST_VIDEO_AFD_16_9_TOP_ALIGNED" )] |
749 | _169TopAligned, |
750 | #[doc (alias = "GST_VIDEO_AFD_14_9_TOP_ALIGNED" )] |
751 | _149TopAligned, |
752 | #[doc (alias = "GST_VIDEO_AFD_GREATER_THAN_16_9" )] |
753 | GreaterThan169, |
754 | #[doc (alias = "GST_VIDEO_AFD_4_3_FULL_16_9_FULL" )] |
755 | _43Full169Full, |
756 | #[doc (alias = "GST_VIDEO_AFD_4_3_FULL_4_3_PILLAR" )] |
757 | _43Full43Pillar, |
758 | #[doc (alias = "GST_VIDEO_AFD_16_9_LETTER_16_9_FULL" )] |
759 | _169Letter169Full, |
760 | #[doc (alias = "GST_VIDEO_AFD_14_9_LETTER_14_9_PILLAR" )] |
761 | _149Letter149Pillar, |
762 | #[doc (alias = "GST_VIDEO_AFD_4_3_FULL_14_9_CENTER" )] |
763 | _43Full149Center, |
764 | #[doc (alias = "GST_VIDEO_AFD_16_9_LETTER_14_9_CENTER" )] |
765 | _169Letter149Center, |
766 | #[doc (alias = "GST_VIDEO_AFD_16_9_LETTER_4_3_CENTER" )] |
767 | _169Letter43Center, |
768 | #[doc (hidden)] |
769 | __Unknown(i32), |
770 | } |
771 | |
772 | #[cfg (feature = "v1_18" )] |
773 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
774 | #[doc (hidden)] |
775 | impl IntoGlib for VideoAFDValue { |
776 | type GlibType = ffi::GstVideoAFDValue; |
777 | |
778 | #[inline ] |
779 | fn into_glib(self) -> ffi::GstVideoAFDValue { |
780 | match self { |
781 | Self::Unavailable => ffi::GST_VIDEO_AFD_UNAVAILABLE, |
782 | Self::_169TopAligned => ffi::GST_VIDEO_AFD_16_9_TOP_ALIGNED, |
783 | Self::_149TopAligned => ffi::GST_VIDEO_AFD_14_9_TOP_ALIGNED, |
784 | Self::GreaterThan169 => ffi::GST_VIDEO_AFD_GREATER_THAN_16_9, |
785 | Self::_43Full169Full => ffi::GST_VIDEO_AFD_4_3_FULL_16_9_FULL, |
786 | Self::_43Full43Pillar => ffi::GST_VIDEO_AFD_4_3_FULL_4_3_PILLAR, |
787 | Self::_169Letter169Full => ffi::GST_VIDEO_AFD_16_9_LETTER_16_9_FULL, |
788 | Self::_149Letter149Pillar => ffi::GST_VIDEO_AFD_14_9_LETTER_14_9_PILLAR, |
789 | Self::_43Full149Center => ffi::GST_VIDEO_AFD_4_3_FULL_14_9_CENTER, |
790 | Self::_169Letter149Center => ffi::GST_VIDEO_AFD_16_9_LETTER_14_9_CENTER, |
791 | Self::_169Letter43Center => ffi::GST_VIDEO_AFD_16_9_LETTER_4_3_CENTER, |
792 | Self::__Unknown(value) => value, |
793 | } |
794 | } |
795 | } |
796 | |
797 | #[cfg (feature = "v1_18" )] |
798 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
799 | #[doc (hidden)] |
800 | impl FromGlib<ffi::GstVideoAFDValue> for VideoAFDValue { |
801 | #[inline ] |
802 | unsafe fn from_glib(value: ffi::GstVideoAFDValue) -> Self { |
803 | skip_assert_initialized!(); |
804 | |
805 | match value { |
806 | ffi::GST_VIDEO_AFD_UNAVAILABLE => Self::Unavailable, |
807 | ffi::GST_VIDEO_AFD_16_9_TOP_ALIGNED => Self::_169TopAligned, |
808 | ffi::GST_VIDEO_AFD_14_9_TOP_ALIGNED => Self::_149TopAligned, |
809 | ffi::GST_VIDEO_AFD_GREATER_THAN_16_9 => Self::GreaterThan169, |
810 | ffi::GST_VIDEO_AFD_4_3_FULL_16_9_FULL => Self::_43Full169Full, |
811 | ffi::GST_VIDEO_AFD_4_3_FULL_4_3_PILLAR => Self::_43Full43Pillar, |
812 | ffi::GST_VIDEO_AFD_16_9_LETTER_16_9_FULL => Self::_169Letter169Full, |
813 | ffi::GST_VIDEO_AFD_14_9_LETTER_14_9_PILLAR => Self::_149Letter149Pillar, |
814 | ffi::GST_VIDEO_AFD_4_3_FULL_14_9_CENTER => Self::_43Full149Center, |
815 | ffi::GST_VIDEO_AFD_16_9_LETTER_14_9_CENTER => Self::_169Letter149Center, |
816 | ffi::GST_VIDEO_AFD_16_9_LETTER_4_3_CENTER => Self::_169Letter43Center, |
817 | value => Self::__Unknown(value), |
818 | } |
819 | } |
820 | } |
821 | |
822 | #[cfg (feature = "v1_18" )] |
823 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
824 | impl StaticType for VideoAFDValue { |
825 | #[inline ] |
826 | #[doc (alias = "gst_video_afd_value_get_type" )] |
827 | fn static_type() -> glib::Type { |
828 | unsafe { from_glib(ffi::gst_video_afd_value_get_type()) } |
829 | } |
830 | } |
831 | |
832 | #[cfg (feature = "v1_18" )] |
833 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
834 | impl glib::HasParamSpec for VideoAFDValue { |
835 | type ParamSpec = glib::ParamSpecEnum; |
836 | type SetValue = Self; |
837 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
838 | |
839 | fn param_spec_builder() -> Self::BuilderFn { |
840 | Self::ParamSpec::builder_with_default |
841 | } |
842 | } |
843 | |
844 | #[cfg (feature = "v1_18" )] |
845 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
846 | impl glib::value::ValueType for VideoAFDValue { |
847 | type Type = Self; |
848 | } |
849 | |
850 | #[cfg (feature = "v1_18" )] |
851 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
852 | unsafe impl<'a> glib::value::FromValue<'a> for VideoAFDValue { |
853 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
854 | |
855 | #[inline ] |
856 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
857 | skip_assert_initialized!(); |
858 | from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
859 | } |
860 | } |
861 | |
862 | #[cfg (feature = "v1_18" )] |
863 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
864 | impl ToValue for VideoAFDValue { |
865 | #[inline ] |
866 | fn to_value(&self) -> glib::Value { |
867 | let mut value = glib::Value::for_value_type::<Self>(); |
868 | unsafe { |
869 | glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); |
870 | } |
871 | value |
872 | } |
873 | |
874 | #[inline ] |
875 | fn value_type(&self) -> glib::Type { |
876 | Self::static_type() |
877 | } |
878 | } |
879 | |
880 | #[cfg (feature = "v1_18" )] |
881 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
882 | impl From<VideoAFDValue> for glib::Value { |
883 | #[inline ] |
884 | fn from(v: VideoAFDValue) -> Self { |
885 | skip_assert_initialized!(); |
886 | ToValue::to_value(&v) |
887 | } |
888 | } |
889 | |
890 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
891 | #[non_exhaustive ] |
892 | #[doc (alias = "GstVideoAlphaMode" )] |
893 | pub enum VideoAlphaMode { |
894 | #[doc (alias = "GST_VIDEO_ALPHA_MODE_COPY" )] |
895 | Copy, |
896 | #[doc (alias = "GST_VIDEO_ALPHA_MODE_SET" )] |
897 | Set, |
898 | #[doc (alias = "GST_VIDEO_ALPHA_MODE_MULT" )] |
899 | Mult, |
900 | #[doc (hidden)] |
901 | __Unknown(i32), |
902 | } |
903 | |
904 | #[doc (hidden)] |
905 | impl IntoGlib for VideoAlphaMode { |
906 | type GlibType = ffi::GstVideoAlphaMode; |
907 | |
908 | #[inline ] |
909 | fn into_glib(self) -> ffi::GstVideoAlphaMode { |
910 | match self { |
911 | Self::Copy => ffi::GST_VIDEO_ALPHA_MODE_COPY, |
912 | Self::Set => ffi::GST_VIDEO_ALPHA_MODE_SET, |
913 | Self::Mult => ffi::GST_VIDEO_ALPHA_MODE_MULT, |
914 | Self::__Unknown(value: i32) => value, |
915 | } |
916 | } |
917 | } |
918 | |
919 | #[doc (hidden)] |
920 | impl FromGlib<ffi::GstVideoAlphaMode> for VideoAlphaMode { |
921 | #[inline ] |
922 | unsafe fn from_glib(value: ffi::GstVideoAlphaMode) -> Self { |
923 | skip_assert_initialized!(); |
924 | |
925 | match value { |
926 | ffi::GST_VIDEO_ALPHA_MODE_COPY => Self::Copy, |
927 | ffi::GST_VIDEO_ALPHA_MODE_SET => Self::Set, |
928 | ffi::GST_VIDEO_ALPHA_MODE_MULT => Self::Mult, |
929 | value: i32 => Self::__Unknown(value), |
930 | } |
931 | } |
932 | } |
933 | |
934 | impl StaticType for VideoAlphaMode { |
935 | #[inline ] |
936 | #[doc (alias = "gst_video_alpha_mode_get_type" )] |
937 | fn static_type() -> glib::Type { |
938 | unsafe { from_glib(val:ffi::gst_video_alpha_mode_get_type()) } |
939 | } |
940 | } |
941 | |
942 | impl glib::HasParamSpec for VideoAlphaMode { |
943 | type ParamSpec = glib::ParamSpecEnum; |
944 | type SetValue = Self; |
945 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
946 | |
947 | fn param_spec_builder() -> Self::BuilderFn { |
948 | Self::ParamSpec::builder_with_default |
949 | } |
950 | } |
951 | |
952 | impl glib::value::ValueType for VideoAlphaMode { |
953 | type Type = Self; |
954 | } |
955 | |
956 | unsafe impl<'a> glib::value::FromValue<'a> for VideoAlphaMode { |
957 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
958 | |
959 | #[inline ] |
960 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
961 | skip_assert_initialized!(); |
962 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
963 | } |
964 | } |
965 | |
966 | impl ToValue for VideoAlphaMode { |
967 | #[inline ] |
968 | fn to_value(&self) -> glib::Value { |
969 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
970 | unsafe { |
971 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
972 | } |
973 | value |
974 | } |
975 | |
976 | #[inline ] |
977 | fn value_type(&self) -> glib::Type { |
978 | Self::static_type() |
979 | } |
980 | } |
981 | |
982 | impl From<VideoAlphaMode> for glib::Value { |
983 | #[inline ] |
984 | fn from(v: VideoAlphaMode) -> Self { |
985 | skip_assert_initialized!(); |
986 | ToValue::to_value(&v) |
987 | } |
988 | } |
989 | |
990 | #[cfg (feature = "v1_16" )] |
991 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
992 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
993 | #[non_exhaustive ] |
994 | #[doc (alias = "GstVideoAncillaryDID" )] |
995 | pub enum VideoAncillaryDID { |
996 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_UNDEFINED" )] |
997 | Undefined, |
998 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_DELETION" )] |
999 | Deletion, |
1000 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_FIRST" )] |
1001 | Hanc3gAudioDataFirst, |
1002 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_LAST" )] |
1003 | Hanc3gAudioDataLast, |
1004 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_FIRST" )] |
1005 | HancHdtvAudioDataFirst, |
1006 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_LAST" )] |
1007 | HancHdtvAudioDataLast, |
1008 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_FIRST" )] |
1009 | HancSdtvAudioData1First, |
1010 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_LAST" )] |
1011 | HancSdtvAudioData1Last, |
1012 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_CAMERA_POSITION" )] |
1013 | CameraPosition, |
1014 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_HANC_ERROR_DETECTION" )] |
1015 | HancErrorDetection, |
1016 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_FIRST" )] |
1017 | HancSdtvAudioData2First, |
1018 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_LAST" )] |
1019 | HancSdtvAudioData2Last, |
1020 | #[doc (hidden)] |
1021 | __Unknown(i32), |
1022 | } |
1023 | |
1024 | #[cfg (feature = "v1_16" )] |
1025 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1026 | #[doc (hidden)] |
1027 | impl IntoGlib for VideoAncillaryDID { |
1028 | type GlibType = ffi::GstVideoAncillaryDID; |
1029 | |
1030 | #[inline ] |
1031 | fn into_glib(self) -> ffi::GstVideoAncillaryDID { |
1032 | match self { |
1033 | Self::Undefined => ffi::GST_VIDEO_ANCILLARY_DID_UNDEFINED, |
1034 | Self::Deletion => ffi::GST_VIDEO_ANCILLARY_DID_DELETION, |
1035 | Self::Hanc3gAudioDataFirst => ffi::GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_FIRST, |
1036 | Self::Hanc3gAudioDataLast => ffi::GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_LAST, |
1037 | Self::HancHdtvAudioDataFirst => ffi::GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_FIRST, |
1038 | Self::HancHdtvAudioDataLast => ffi::GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_LAST, |
1039 | Self::HancSdtvAudioData1First => { |
1040 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_FIRST |
1041 | } |
1042 | Self::HancSdtvAudioData1Last => { |
1043 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_LAST |
1044 | } |
1045 | Self::CameraPosition => ffi::GST_VIDEO_ANCILLARY_DID_CAMERA_POSITION, |
1046 | Self::HancErrorDetection => ffi::GST_VIDEO_ANCILLARY_DID_HANC_ERROR_DETECTION, |
1047 | Self::HancSdtvAudioData2First => { |
1048 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_FIRST |
1049 | } |
1050 | Self::HancSdtvAudioData2Last => { |
1051 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_LAST |
1052 | } |
1053 | Self::__Unknown(value) => value, |
1054 | } |
1055 | } |
1056 | } |
1057 | |
1058 | #[cfg (feature = "v1_16" )] |
1059 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1060 | #[doc (hidden)] |
1061 | impl FromGlib<ffi::GstVideoAncillaryDID> for VideoAncillaryDID { |
1062 | #[inline ] |
1063 | unsafe fn from_glib(value: ffi::GstVideoAncillaryDID) -> Self { |
1064 | skip_assert_initialized!(); |
1065 | |
1066 | match value { |
1067 | ffi::GST_VIDEO_ANCILLARY_DID_UNDEFINED => Self::Undefined, |
1068 | ffi::GST_VIDEO_ANCILLARY_DID_DELETION => Self::Deletion, |
1069 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_FIRST => Self::Hanc3gAudioDataFirst, |
1070 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_LAST => Self::Hanc3gAudioDataLast, |
1071 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_FIRST => Self::HancHdtvAudioDataFirst, |
1072 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_LAST => Self::HancHdtvAudioDataLast, |
1073 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_FIRST => { |
1074 | Self::HancSdtvAudioData1First |
1075 | } |
1076 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_LAST => { |
1077 | Self::HancSdtvAudioData1Last |
1078 | } |
1079 | ffi::GST_VIDEO_ANCILLARY_DID_CAMERA_POSITION => Self::CameraPosition, |
1080 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_ERROR_DETECTION => Self::HancErrorDetection, |
1081 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_FIRST => { |
1082 | Self::HancSdtvAudioData2First |
1083 | } |
1084 | ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_LAST => { |
1085 | Self::HancSdtvAudioData2Last |
1086 | } |
1087 | value => Self::__Unknown(value), |
1088 | } |
1089 | } |
1090 | } |
1091 | |
1092 | #[cfg (feature = "v1_16" )] |
1093 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1094 | impl StaticType for VideoAncillaryDID { |
1095 | #[inline ] |
1096 | #[doc (alias = "gst_video_ancillary_did_get_type" )] |
1097 | fn static_type() -> glib::Type { |
1098 | unsafe { from_glib(ffi::gst_video_ancillary_did_get_type()) } |
1099 | } |
1100 | } |
1101 | |
1102 | #[cfg (feature = "v1_16" )] |
1103 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1104 | impl glib::HasParamSpec for VideoAncillaryDID { |
1105 | type ParamSpec = glib::ParamSpecEnum; |
1106 | type SetValue = Self; |
1107 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
1108 | |
1109 | fn param_spec_builder() -> Self::BuilderFn { |
1110 | Self::ParamSpec::builder_with_default |
1111 | } |
1112 | } |
1113 | |
1114 | #[cfg (feature = "v1_16" )] |
1115 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1116 | impl glib::value::ValueType for VideoAncillaryDID { |
1117 | type Type = Self; |
1118 | } |
1119 | |
1120 | #[cfg (feature = "v1_16" )] |
1121 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1122 | unsafe impl<'a> glib::value::FromValue<'a> for VideoAncillaryDID { |
1123 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
1124 | |
1125 | #[inline ] |
1126 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
1127 | skip_assert_initialized!(); |
1128 | from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
1129 | } |
1130 | } |
1131 | |
1132 | #[cfg (feature = "v1_16" )] |
1133 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1134 | impl ToValue for VideoAncillaryDID { |
1135 | #[inline ] |
1136 | fn to_value(&self) -> glib::Value { |
1137 | let mut value = glib::Value::for_value_type::<Self>(); |
1138 | unsafe { |
1139 | glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); |
1140 | } |
1141 | value |
1142 | } |
1143 | |
1144 | #[inline ] |
1145 | fn value_type(&self) -> glib::Type { |
1146 | Self::static_type() |
1147 | } |
1148 | } |
1149 | |
1150 | #[cfg (feature = "v1_16" )] |
1151 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1152 | impl From<VideoAncillaryDID> for glib::Value { |
1153 | #[inline ] |
1154 | fn from(v: VideoAncillaryDID) -> Self { |
1155 | skip_assert_initialized!(); |
1156 | ToValue::to_value(&v) |
1157 | } |
1158 | } |
1159 | |
1160 | #[cfg (feature = "v1_16" )] |
1161 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1162 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
1163 | #[non_exhaustive ] |
1164 | #[doc (alias = "GstVideoAncillaryDID16" )] |
1165 | pub enum VideoAncillaryDID16 { |
1166 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID16_S334_EIA_708" )] |
1167 | S334Eia708, |
1168 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID16_S334_EIA_608" )] |
1169 | S334Eia608, |
1170 | #[doc (alias = "GST_VIDEO_ANCILLARY_DID16_S2016_3_AFD_BAR" )] |
1171 | S20163AfdBar, |
1172 | #[doc (hidden)] |
1173 | __Unknown(i32), |
1174 | } |
1175 | |
1176 | #[cfg (feature = "v1_16" )] |
1177 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1178 | #[doc (hidden)] |
1179 | impl IntoGlib for VideoAncillaryDID16 { |
1180 | type GlibType = ffi::GstVideoAncillaryDID16; |
1181 | |
1182 | #[inline ] |
1183 | fn into_glib(self) -> ffi::GstVideoAncillaryDID16 { |
1184 | match self { |
1185 | Self::S334Eia708 => ffi::GST_VIDEO_ANCILLARY_DID16_S334_EIA_708, |
1186 | Self::S334Eia608 => ffi::GST_VIDEO_ANCILLARY_DID16_S334_EIA_608, |
1187 | Self::S20163AfdBar => ffi::GST_VIDEO_ANCILLARY_DID16_S2016_3_AFD_BAR, |
1188 | Self::__Unknown(value) => value, |
1189 | } |
1190 | } |
1191 | } |
1192 | |
1193 | #[cfg (feature = "v1_16" )] |
1194 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1195 | #[doc (hidden)] |
1196 | impl FromGlib<ffi::GstVideoAncillaryDID16> for VideoAncillaryDID16 { |
1197 | #[inline ] |
1198 | unsafe fn from_glib(value: ffi::GstVideoAncillaryDID16) -> Self { |
1199 | skip_assert_initialized!(); |
1200 | |
1201 | match value { |
1202 | ffi::GST_VIDEO_ANCILLARY_DID16_S334_EIA_708 => Self::S334Eia708, |
1203 | ffi::GST_VIDEO_ANCILLARY_DID16_S334_EIA_608 => Self::S334Eia608, |
1204 | ffi::GST_VIDEO_ANCILLARY_DID16_S2016_3_AFD_BAR => Self::S20163AfdBar, |
1205 | value => Self::__Unknown(value), |
1206 | } |
1207 | } |
1208 | } |
1209 | |
1210 | #[cfg (feature = "v1_16" )] |
1211 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1212 | impl StaticType for VideoAncillaryDID16 { |
1213 | #[inline ] |
1214 | #[doc (alias = "gst_video_ancillary_di_d16_get_type" )] |
1215 | fn static_type() -> glib::Type { |
1216 | unsafe { from_glib(ffi::gst_video_ancillary_di_d16_get_type()) } |
1217 | } |
1218 | } |
1219 | |
1220 | #[cfg (feature = "v1_16" )] |
1221 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1222 | impl glib::HasParamSpec for VideoAncillaryDID16 { |
1223 | type ParamSpec = glib::ParamSpecEnum; |
1224 | type SetValue = Self; |
1225 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
1226 | |
1227 | fn param_spec_builder() -> Self::BuilderFn { |
1228 | Self::ParamSpec::builder_with_default |
1229 | } |
1230 | } |
1231 | |
1232 | #[cfg (feature = "v1_16" )] |
1233 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1234 | impl glib::value::ValueType for VideoAncillaryDID16 { |
1235 | type Type = Self; |
1236 | } |
1237 | |
1238 | #[cfg (feature = "v1_16" )] |
1239 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1240 | unsafe impl<'a> glib::value::FromValue<'a> for VideoAncillaryDID16 { |
1241 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
1242 | |
1243 | #[inline ] |
1244 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
1245 | skip_assert_initialized!(); |
1246 | from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
1247 | } |
1248 | } |
1249 | |
1250 | #[cfg (feature = "v1_16" )] |
1251 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1252 | impl ToValue for VideoAncillaryDID16 { |
1253 | #[inline ] |
1254 | fn to_value(&self) -> glib::Value { |
1255 | let mut value = glib::Value::for_value_type::<Self>(); |
1256 | unsafe { |
1257 | glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); |
1258 | } |
1259 | value |
1260 | } |
1261 | |
1262 | #[inline ] |
1263 | fn value_type(&self) -> glib::Type { |
1264 | Self::static_type() |
1265 | } |
1266 | } |
1267 | |
1268 | #[cfg (feature = "v1_16" )] |
1269 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1270 | impl From<VideoAncillaryDID16> for glib::Value { |
1271 | #[inline ] |
1272 | fn from(v: VideoAncillaryDID16) -> Self { |
1273 | skip_assert_initialized!(); |
1274 | ToValue::to_value(&v) |
1275 | } |
1276 | } |
1277 | |
1278 | #[cfg (feature = "v1_16" )] |
1279 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1280 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
1281 | #[non_exhaustive ] |
1282 | #[doc (alias = "GstVideoCaptionType" )] |
1283 | pub enum VideoCaptionType { |
1284 | #[doc (alias = "GST_VIDEO_CAPTION_TYPE_UNKNOWN" )] |
1285 | Unknown, |
1286 | #[doc (alias = "GST_VIDEO_CAPTION_TYPE_CEA608_RAW" )] |
1287 | Cea608Raw, |
1288 | #[doc (alias = "GST_VIDEO_CAPTION_TYPE_CEA608_S334_1A" )] |
1289 | Cea608S3341a, |
1290 | #[doc (alias = "GST_VIDEO_CAPTION_TYPE_CEA708_RAW" )] |
1291 | Cea708Raw, |
1292 | #[doc (alias = "GST_VIDEO_CAPTION_TYPE_CEA708_CDP" )] |
1293 | Cea708Cdp, |
1294 | #[doc (hidden)] |
1295 | __Unknown(i32), |
1296 | } |
1297 | |
1298 | #[cfg (feature = "v1_16" )] |
1299 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1300 | impl VideoCaptionType { |
1301 | #[doc (alias = "gst_video_caption_type_to_caps" )] |
1302 | pub fn to_caps(self) -> gst::Caps { |
1303 | assert_initialized_main_thread!(); |
1304 | unsafe { from_glib_full(ffi::gst_video_caption_type_to_caps(self.into_glib())) } |
1305 | } |
1306 | } |
1307 | |
1308 | #[cfg (feature = "v1_16" )] |
1309 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1310 | #[doc (hidden)] |
1311 | impl IntoGlib for VideoCaptionType { |
1312 | type GlibType = ffi::GstVideoCaptionType; |
1313 | |
1314 | #[inline ] |
1315 | fn into_glib(self) -> ffi::GstVideoCaptionType { |
1316 | match self { |
1317 | Self::Unknown => ffi::GST_VIDEO_CAPTION_TYPE_UNKNOWN, |
1318 | Self::Cea608Raw => ffi::GST_VIDEO_CAPTION_TYPE_CEA608_RAW, |
1319 | Self::Cea608S3341a => ffi::GST_VIDEO_CAPTION_TYPE_CEA608_S334_1A, |
1320 | Self::Cea708Raw => ffi::GST_VIDEO_CAPTION_TYPE_CEA708_RAW, |
1321 | Self::Cea708Cdp => ffi::GST_VIDEO_CAPTION_TYPE_CEA708_CDP, |
1322 | Self::__Unknown(value) => value, |
1323 | } |
1324 | } |
1325 | } |
1326 | |
1327 | #[cfg (feature = "v1_16" )] |
1328 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1329 | #[doc (hidden)] |
1330 | impl FromGlib<ffi::GstVideoCaptionType> for VideoCaptionType { |
1331 | #[inline ] |
1332 | unsafe fn from_glib(value: ffi::GstVideoCaptionType) -> Self { |
1333 | skip_assert_initialized!(); |
1334 | |
1335 | match value { |
1336 | ffi::GST_VIDEO_CAPTION_TYPE_UNKNOWN => Self::Unknown, |
1337 | ffi::GST_VIDEO_CAPTION_TYPE_CEA608_RAW => Self::Cea608Raw, |
1338 | ffi::GST_VIDEO_CAPTION_TYPE_CEA608_S334_1A => Self::Cea608S3341a, |
1339 | ffi::GST_VIDEO_CAPTION_TYPE_CEA708_RAW => Self::Cea708Raw, |
1340 | ffi::GST_VIDEO_CAPTION_TYPE_CEA708_CDP => Self::Cea708Cdp, |
1341 | value => Self::__Unknown(value), |
1342 | } |
1343 | } |
1344 | } |
1345 | |
1346 | #[cfg (feature = "v1_16" )] |
1347 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1348 | impl StaticType for VideoCaptionType { |
1349 | #[inline ] |
1350 | #[doc (alias = "gst_video_caption_type_get_type" )] |
1351 | fn static_type() -> glib::Type { |
1352 | unsafe { from_glib(ffi::gst_video_caption_type_get_type()) } |
1353 | } |
1354 | } |
1355 | |
1356 | #[cfg (feature = "v1_16" )] |
1357 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1358 | impl glib::HasParamSpec for VideoCaptionType { |
1359 | type ParamSpec = glib::ParamSpecEnum; |
1360 | type SetValue = Self; |
1361 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
1362 | |
1363 | fn param_spec_builder() -> Self::BuilderFn { |
1364 | Self::ParamSpec::builder_with_default |
1365 | } |
1366 | } |
1367 | |
1368 | #[cfg (feature = "v1_16" )] |
1369 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1370 | impl glib::value::ValueType for VideoCaptionType { |
1371 | type Type = Self; |
1372 | } |
1373 | |
1374 | #[cfg (feature = "v1_16" )] |
1375 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1376 | unsafe impl<'a> glib::value::FromValue<'a> for VideoCaptionType { |
1377 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
1378 | |
1379 | #[inline ] |
1380 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
1381 | skip_assert_initialized!(); |
1382 | from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
1383 | } |
1384 | } |
1385 | |
1386 | #[cfg (feature = "v1_16" )] |
1387 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1388 | impl ToValue for VideoCaptionType { |
1389 | #[inline ] |
1390 | fn to_value(&self) -> glib::Value { |
1391 | let mut value = glib::Value::for_value_type::<Self>(); |
1392 | unsafe { |
1393 | glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib()); |
1394 | } |
1395 | value |
1396 | } |
1397 | |
1398 | #[inline ] |
1399 | fn value_type(&self) -> glib::Type { |
1400 | Self::static_type() |
1401 | } |
1402 | } |
1403 | |
1404 | #[cfg (feature = "v1_16" )] |
1405 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1406 | impl From<VideoCaptionType> for glib::Value { |
1407 | #[inline ] |
1408 | fn from(v: VideoCaptionType) -> Self { |
1409 | skip_assert_initialized!(); |
1410 | ToValue::to_value(&v) |
1411 | } |
1412 | } |
1413 | |
1414 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
1415 | #[non_exhaustive ] |
1416 | #[doc (alias = "GstVideoChromaMode" )] |
1417 | pub enum VideoChromaMode { |
1418 | #[doc (alias = "GST_VIDEO_CHROMA_MODE_FULL" )] |
1419 | Full, |
1420 | #[doc (alias = "GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY" )] |
1421 | UpsampleOnly, |
1422 | #[doc (alias = "GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY" )] |
1423 | DownsampleOnly, |
1424 | #[doc (alias = "GST_VIDEO_CHROMA_MODE_NONE" )] |
1425 | None, |
1426 | #[doc (hidden)] |
1427 | __Unknown(i32), |
1428 | } |
1429 | |
1430 | #[doc (hidden)] |
1431 | impl IntoGlib for VideoChromaMode { |
1432 | type GlibType = ffi::GstVideoChromaMode; |
1433 | |
1434 | #[inline ] |
1435 | fn into_glib(self) -> ffi::GstVideoChromaMode { |
1436 | match self { |
1437 | Self::Full => ffi::GST_VIDEO_CHROMA_MODE_FULL, |
1438 | Self::UpsampleOnly => ffi::GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY, |
1439 | Self::DownsampleOnly => ffi::GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY, |
1440 | Self::None => ffi::GST_VIDEO_CHROMA_MODE_NONE, |
1441 | Self::__Unknown(value: i32) => value, |
1442 | } |
1443 | } |
1444 | } |
1445 | |
1446 | #[doc (hidden)] |
1447 | impl FromGlib<ffi::GstVideoChromaMode> for VideoChromaMode { |
1448 | #[inline ] |
1449 | unsafe fn from_glib(value: ffi::GstVideoChromaMode) -> Self { |
1450 | skip_assert_initialized!(); |
1451 | |
1452 | match value { |
1453 | ffi::GST_VIDEO_CHROMA_MODE_FULL => Self::Full, |
1454 | ffi::GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY => Self::UpsampleOnly, |
1455 | ffi::GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY => Self::DownsampleOnly, |
1456 | ffi::GST_VIDEO_CHROMA_MODE_NONE => Self::None, |
1457 | value: i32 => Self::__Unknown(value), |
1458 | } |
1459 | } |
1460 | } |
1461 | |
1462 | impl StaticType for VideoChromaMode { |
1463 | #[inline ] |
1464 | #[doc (alias = "gst_video_chroma_mode_get_type" )] |
1465 | fn static_type() -> glib::Type { |
1466 | unsafe { from_glib(val:ffi::gst_video_chroma_mode_get_type()) } |
1467 | } |
1468 | } |
1469 | |
1470 | impl glib::HasParamSpec for VideoChromaMode { |
1471 | type ParamSpec = glib::ParamSpecEnum; |
1472 | type SetValue = Self; |
1473 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
1474 | |
1475 | fn param_spec_builder() -> Self::BuilderFn { |
1476 | Self::ParamSpec::builder_with_default |
1477 | } |
1478 | } |
1479 | |
1480 | impl glib::value::ValueType for VideoChromaMode { |
1481 | type Type = Self; |
1482 | } |
1483 | |
1484 | unsafe impl<'a> glib::value::FromValue<'a> for VideoChromaMode { |
1485 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
1486 | |
1487 | #[inline ] |
1488 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
1489 | skip_assert_initialized!(); |
1490 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
1491 | } |
1492 | } |
1493 | |
1494 | impl ToValue for VideoChromaMode { |
1495 | #[inline ] |
1496 | fn to_value(&self) -> glib::Value { |
1497 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
1498 | unsafe { |
1499 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
1500 | } |
1501 | value |
1502 | } |
1503 | |
1504 | #[inline ] |
1505 | fn value_type(&self) -> glib::Type { |
1506 | Self::static_type() |
1507 | } |
1508 | } |
1509 | |
1510 | impl From<VideoChromaMode> for glib::Value { |
1511 | #[inline ] |
1512 | fn from(v: VideoChromaMode) -> Self { |
1513 | skip_assert_initialized!(); |
1514 | ToValue::to_value(&v) |
1515 | } |
1516 | } |
1517 | |
1518 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
1519 | #[non_exhaustive ] |
1520 | #[doc (alias = "GstVideoColorMatrix" )] |
1521 | pub enum VideoColorMatrix { |
1522 | #[doc (alias = "GST_VIDEO_COLOR_MATRIX_UNKNOWN" )] |
1523 | Unknown, |
1524 | #[doc (alias = "GST_VIDEO_COLOR_MATRIX_RGB" )] |
1525 | Rgb, |
1526 | #[doc (alias = "GST_VIDEO_COLOR_MATRIX_FCC" )] |
1527 | Fcc, |
1528 | #[doc (alias = "GST_VIDEO_COLOR_MATRIX_BT709" )] |
1529 | Bt709, |
1530 | #[doc (alias = "GST_VIDEO_COLOR_MATRIX_BT601" )] |
1531 | Bt601, |
1532 | #[doc (alias = "GST_VIDEO_COLOR_MATRIX_SMPTE240M" )] |
1533 | Smpte240m, |
1534 | #[doc (alias = "GST_VIDEO_COLOR_MATRIX_BT2020" )] |
1535 | Bt2020, |
1536 | #[doc (hidden)] |
1537 | __Unknown(i32), |
1538 | } |
1539 | |
1540 | impl VideoColorMatrix { |
1541 | #[cfg (feature = "v1_18" )] |
1542 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
1543 | #[doc (alias = "gst_video_color_matrix_from_iso" )] |
1544 | pub fn from_iso(value: u32) -> VideoColorMatrix { |
1545 | assert_initialized_main_thread!(); |
1546 | unsafe { from_glib(ffi::gst_video_color_matrix_from_iso(value)) } |
1547 | } |
1548 | |
1549 | #[cfg (feature = "v1_18" )] |
1550 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
1551 | #[doc (alias = "gst_video_color_matrix_to_iso" )] |
1552 | pub fn to_iso(self) -> u32 { |
1553 | assert_initialized_main_thread!(); |
1554 | unsafe { ffi::gst_video_color_matrix_to_iso(self.into_glib()) } |
1555 | } |
1556 | } |
1557 | |
1558 | #[doc (hidden)] |
1559 | impl IntoGlib for VideoColorMatrix { |
1560 | type GlibType = ffi::GstVideoColorMatrix; |
1561 | |
1562 | #[inline ] |
1563 | fn into_glib(self) -> ffi::GstVideoColorMatrix { |
1564 | match self { |
1565 | Self::Unknown => ffi::GST_VIDEO_COLOR_MATRIX_UNKNOWN, |
1566 | Self::Rgb => ffi::GST_VIDEO_COLOR_MATRIX_RGB, |
1567 | Self::Fcc => ffi::GST_VIDEO_COLOR_MATRIX_FCC, |
1568 | Self::Bt709 => ffi::GST_VIDEO_COLOR_MATRIX_BT709, |
1569 | Self::Bt601 => ffi::GST_VIDEO_COLOR_MATRIX_BT601, |
1570 | Self::Smpte240m => ffi::GST_VIDEO_COLOR_MATRIX_SMPTE240M, |
1571 | Self::Bt2020 => ffi::GST_VIDEO_COLOR_MATRIX_BT2020, |
1572 | Self::__Unknown(value: i32) => value, |
1573 | } |
1574 | } |
1575 | } |
1576 | |
1577 | #[doc (hidden)] |
1578 | impl FromGlib<ffi::GstVideoColorMatrix> for VideoColorMatrix { |
1579 | #[inline ] |
1580 | unsafe fn from_glib(value: ffi::GstVideoColorMatrix) -> Self { |
1581 | skip_assert_initialized!(); |
1582 | |
1583 | match value { |
1584 | ffi::GST_VIDEO_COLOR_MATRIX_UNKNOWN => Self::Unknown, |
1585 | ffi::GST_VIDEO_COLOR_MATRIX_RGB => Self::Rgb, |
1586 | ffi::GST_VIDEO_COLOR_MATRIX_FCC => Self::Fcc, |
1587 | ffi::GST_VIDEO_COLOR_MATRIX_BT709 => Self::Bt709, |
1588 | ffi::GST_VIDEO_COLOR_MATRIX_BT601 => Self::Bt601, |
1589 | ffi::GST_VIDEO_COLOR_MATRIX_SMPTE240M => Self::Smpte240m, |
1590 | ffi::GST_VIDEO_COLOR_MATRIX_BT2020 => Self::Bt2020, |
1591 | value: i32 => Self::__Unknown(value), |
1592 | } |
1593 | } |
1594 | } |
1595 | |
1596 | impl StaticType for VideoColorMatrix { |
1597 | #[inline ] |
1598 | #[doc (alias = "gst_video_color_matrix_get_type" )] |
1599 | fn static_type() -> glib::Type { |
1600 | unsafe { from_glib(val:ffi::gst_video_color_matrix_get_type()) } |
1601 | } |
1602 | } |
1603 | |
1604 | impl glib::HasParamSpec for VideoColorMatrix { |
1605 | type ParamSpec = glib::ParamSpecEnum; |
1606 | type SetValue = Self; |
1607 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
1608 | |
1609 | fn param_spec_builder() -> Self::BuilderFn { |
1610 | Self::ParamSpec::builder_with_default |
1611 | } |
1612 | } |
1613 | |
1614 | impl glib::value::ValueType for VideoColorMatrix { |
1615 | type Type = Self; |
1616 | } |
1617 | |
1618 | unsafe impl<'a> glib::value::FromValue<'a> for VideoColorMatrix { |
1619 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
1620 | |
1621 | #[inline ] |
1622 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
1623 | skip_assert_initialized!(); |
1624 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
1625 | } |
1626 | } |
1627 | |
1628 | impl ToValue for VideoColorMatrix { |
1629 | #[inline ] |
1630 | fn to_value(&self) -> glib::Value { |
1631 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
1632 | unsafe { |
1633 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
1634 | } |
1635 | value |
1636 | } |
1637 | |
1638 | #[inline ] |
1639 | fn value_type(&self) -> glib::Type { |
1640 | Self::static_type() |
1641 | } |
1642 | } |
1643 | |
1644 | impl From<VideoColorMatrix> for glib::Value { |
1645 | #[inline ] |
1646 | fn from(v: VideoColorMatrix) -> Self { |
1647 | skip_assert_initialized!(); |
1648 | ToValue::to_value(&v) |
1649 | } |
1650 | } |
1651 | |
1652 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
1653 | #[non_exhaustive ] |
1654 | #[doc (alias = "GstVideoColorPrimaries" )] |
1655 | pub enum VideoColorPrimaries { |
1656 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_UNKNOWN" )] |
1657 | Unknown, |
1658 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_BT709" )] |
1659 | Bt709, |
1660 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_BT470M" )] |
1661 | Bt470m, |
1662 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_BT470BG" )] |
1663 | Bt470bg, |
1664 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTE170M" )] |
1665 | Smpte170m, |
1666 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTE240M" )] |
1667 | Smpte240m, |
1668 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_FILM" )] |
1669 | Film, |
1670 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_BT2020" )] |
1671 | Bt2020, |
1672 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_ADOBERGB" )] |
1673 | Adobergb, |
1674 | #[cfg (feature = "v1_16" )] |
1675 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1676 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTEST428" )] |
1677 | Smptest428, |
1678 | #[cfg (feature = "v1_16" )] |
1679 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1680 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTERP431" )] |
1681 | Smpterp431, |
1682 | #[cfg (feature = "v1_16" )] |
1683 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1684 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432" )] |
1685 | Smpteeg432, |
1686 | #[cfg (feature = "v1_16" )] |
1687 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
1688 | #[doc (alias = "GST_VIDEO_COLOR_PRIMARIES_EBU3213" )] |
1689 | Ebu3213, |
1690 | #[doc (hidden)] |
1691 | __Unknown(i32), |
1692 | } |
1693 | |
1694 | impl VideoColorPrimaries { |
1695 | #[cfg (feature = "v1_18" )] |
1696 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
1697 | #[doc (alias = "gst_video_color_primaries_from_iso" )] |
1698 | pub fn from_iso(value: u32) -> VideoColorPrimaries { |
1699 | assert_initialized_main_thread!(); |
1700 | unsafe { from_glib(ffi::gst_video_color_primaries_from_iso(value)) } |
1701 | } |
1702 | |
1703 | //#[doc(alias = "gst_video_color_primaries_get_info")] |
1704 | //#[doc(alias = "get_info")] |
1705 | //pub fn info(self) -> /*Ignored*/VideoColorPrimariesInfo { |
1706 | // unsafe { TODO: call ffi:gst_video_color_primaries_get_info() } |
1707 | //} |
1708 | |
1709 | #[cfg (feature = "v1_22" )] |
1710 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_22" )))] |
1711 | #[doc (alias = "gst_video_color_primaries_is_equivalent" )] |
1712 | pub fn is_equivalent(self, other: VideoColorPrimaries) -> bool { |
1713 | assert_initialized_main_thread!(); |
1714 | unsafe { |
1715 | from_glib(ffi::gst_video_color_primaries_is_equivalent( |
1716 | self.into_glib(), |
1717 | other.into_glib(), |
1718 | )) |
1719 | } |
1720 | } |
1721 | |
1722 | #[cfg (feature = "v1_18" )] |
1723 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
1724 | #[doc (alias = "gst_video_color_primaries_to_iso" )] |
1725 | pub fn to_iso(self) -> u32 { |
1726 | assert_initialized_main_thread!(); |
1727 | unsafe { ffi::gst_video_color_primaries_to_iso(self.into_glib()) } |
1728 | } |
1729 | } |
1730 | |
1731 | #[doc (hidden)] |
1732 | impl IntoGlib for VideoColorPrimaries { |
1733 | type GlibType = ffi::GstVideoColorPrimaries; |
1734 | |
1735 | fn into_glib(self) -> ffi::GstVideoColorPrimaries { |
1736 | match self { |
1737 | Self::Unknown => ffi::GST_VIDEO_COLOR_PRIMARIES_UNKNOWN, |
1738 | Self::Bt709 => ffi::GST_VIDEO_COLOR_PRIMARIES_BT709, |
1739 | Self::Bt470m => ffi::GST_VIDEO_COLOR_PRIMARIES_BT470M, |
1740 | Self::Bt470bg => ffi::GST_VIDEO_COLOR_PRIMARIES_BT470BG, |
1741 | Self::Smpte170m => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTE170M, |
1742 | Self::Smpte240m => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTE240M, |
1743 | Self::Film => ffi::GST_VIDEO_COLOR_PRIMARIES_FILM, |
1744 | Self::Bt2020 => ffi::GST_VIDEO_COLOR_PRIMARIES_BT2020, |
1745 | Self::Adobergb => ffi::GST_VIDEO_COLOR_PRIMARIES_ADOBERGB, |
1746 | #[cfg (feature = "v1_16" )] |
1747 | Self::Smptest428 => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEST428, |
1748 | #[cfg (feature = "v1_16" )] |
1749 | Self::Smpterp431 => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTERP431, |
1750 | #[cfg (feature = "v1_16" )] |
1751 | Self::Smpteeg432 => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432, |
1752 | #[cfg (feature = "v1_16" )] |
1753 | Self::Ebu3213 => ffi::GST_VIDEO_COLOR_PRIMARIES_EBU3213, |
1754 | Self::__Unknown(value) => value, |
1755 | } |
1756 | } |
1757 | } |
1758 | |
1759 | #[doc (hidden)] |
1760 | impl FromGlib<ffi::GstVideoColorPrimaries> for VideoColorPrimaries { |
1761 | unsafe fn from_glib(value: ffi::GstVideoColorPrimaries) -> Self { |
1762 | skip_assert_initialized!(); |
1763 | |
1764 | match value { |
1765 | ffi::GST_VIDEO_COLOR_PRIMARIES_UNKNOWN => Self::Unknown, |
1766 | ffi::GST_VIDEO_COLOR_PRIMARIES_BT709 => Self::Bt709, |
1767 | ffi::GST_VIDEO_COLOR_PRIMARIES_BT470M => Self::Bt470m, |
1768 | ffi::GST_VIDEO_COLOR_PRIMARIES_BT470BG => Self::Bt470bg, |
1769 | ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTE170M => Self::Smpte170m, |
1770 | ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTE240M => Self::Smpte240m, |
1771 | ffi::GST_VIDEO_COLOR_PRIMARIES_FILM => Self::Film, |
1772 | ffi::GST_VIDEO_COLOR_PRIMARIES_BT2020 => Self::Bt2020, |
1773 | ffi::GST_VIDEO_COLOR_PRIMARIES_ADOBERGB => Self::Adobergb, |
1774 | #[cfg (feature = "v1_16" )] |
1775 | ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEST428 => Self::Smptest428, |
1776 | #[cfg (feature = "v1_16" )] |
1777 | ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTERP431 => Self::Smpterp431, |
1778 | #[cfg (feature = "v1_16" )] |
1779 | ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432 => Self::Smpteeg432, |
1780 | #[cfg (feature = "v1_16" )] |
1781 | ffi::GST_VIDEO_COLOR_PRIMARIES_EBU3213 => Self::Ebu3213, |
1782 | value => Self::__Unknown(value), |
1783 | } |
1784 | } |
1785 | } |
1786 | |
1787 | impl StaticType for VideoColorPrimaries { |
1788 | #[inline ] |
1789 | #[doc (alias = "gst_video_color_primaries_get_type" )] |
1790 | fn static_type() -> glib::Type { |
1791 | unsafe { from_glib(val:ffi::gst_video_color_primaries_get_type()) } |
1792 | } |
1793 | } |
1794 | |
1795 | impl glib::HasParamSpec for VideoColorPrimaries { |
1796 | type ParamSpec = glib::ParamSpecEnum; |
1797 | type SetValue = Self; |
1798 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
1799 | |
1800 | fn param_spec_builder() -> Self::BuilderFn { |
1801 | Self::ParamSpec::builder_with_default |
1802 | } |
1803 | } |
1804 | |
1805 | impl glib::value::ValueType for VideoColorPrimaries { |
1806 | type Type = Self; |
1807 | } |
1808 | |
1809 | unsafe impl<'a> glib::value::FromValue<'a> for VideoColorPrimaries { |
1810 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
1811 | |
1812 | #[inline ] |
1813 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
1814 | skip_assert_initialized!(); |
1815 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
1816 | } |
1817 | } |
1818 | |
1819 | impl ToValue for VideoColorPrimaries { |
1820 | #[inline ] |
1821 | fn to_value(&self) -> glib::Value { |
1822 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
1823 | unsafe { |
1824 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
1825 | } |
1826 | value |
1827 | } |
1828 | |
1829 | #[inline ] |
1830 | fn value_type(&self) -> glib::Type { |
1831 | Self::static_type() |
1832 | } |
1833 | } |
1834 | |
1835 | impl From<VideoColorPrimaries> for glib::Value { |
1836 | #[inline ] |
1837 | fn from(v: VideoColorPrimaries) -> Self { |
1838 | skip_assert_initialized!(); |
1839 | ToValue::to_value(&v) |
1840 | } |
1841 | } |
1842 | |
1843 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
1844 | #[non_exhaustive ] |
1845 | #[doc (alias = "GstVideoDitherMethod" )] |
1846 | pub enum VideoDitherMethod { |
1847 | #[doc (alias = "GST_VIDEO_DITHER_NONE" )] |
1848 | None, |
1849 | #[doc (alias = "GST_VIDEO_DITHER_VERTERR" )] |
1850 | Verterr, |
1851 | #[doc (alias = "GST_VIDEO_DITHER_FLOYD_STEINBERG" )] |
1852 | FloydSteinberg, |
1853 | #[doc (alias = "GST_VIDEO_DITHER_SIERRA_LITE" )] |
1854 | SierraLite, |
1855 | #[doc (alias = "GST_VIDEO_DITHER_BAYER" )] |
1856 | Bayer, |
1857 | #[doc (hidden)] |
1858 | __Unknown(i32), |
1859 | } |
1860 | |
1861 | #[doc (hidden)] |
1862 | impl IntoGlib for VideoDitherMethod { |
1863 | type GlibType = ffi::GstVideoDitherMethod; |
1864 | |
1865 | #[inline ] |
1866 | fn into_glib(self) -> ffi::GstVideoDitherMethod { |
1867 | match self { |
1868 | Self::None => ffi::GST_VIDEO_DITHER_NONE, |
1869 | Self::Verterr => ffi::GST_VIDEO_DITHER_VERTERR, |
1870 | Self::FloydSteinberg => ffi::GST_VIDEO_DITHER_FLOYD_STEINBERG, |
1871 | Self::SierraLite => ffi::GST_VIDEO_DITHER_SIERRA_LITE, |
1872 | Self::Bayer => ffi::GST_VIDEO_DITHER_BAYER, |
1873 | Self::__Unknown(value: i32) => value, |
1874 | } |
1875 | } |
1876 | } |
1877 | |
1878 | #[doc (hidden)] |
1879 | impl FromGlib<ffi::GstVideoDitherMethod> for VideoDitherMethod { |
1880 | #[inline ] |
1881 | unsafe fn from_glib(value: ffi::GstVideoDitherMethod) -> Self { |
1882 | skip_assert_initialized!(); |
1883 | |
1884 | match value { |
1885 | ffi::GST_VIDEO_DITHER_NONE => Self::None, |
1886 | ffi::GST_VIDEO_DITHER_VERTERR => Self::Verterr, |
1887 | ffi::GST_VIDEO_DITHER_FLOYD_STEINBERG => Self::FloydSteinberg, |
1888 | ffi::GST_VIDEO_DITHER_SIERRA_LITE => Self::SierraLite, |
1889 | ffi::GST_VIDEO_DITHER_BAYER => Self::Bayer, |
1890 | value: i32 => Self::__Unknown(value), |
1891 | } |
1892 | } |
1893 | } |
1894 | |
1895 | impl StaticType for VideoDitherMethod { |
1896 | #[inline ] |
1897 | #[doc (alias = "gst_video_dither_method_get_type" )] |
1898 | fn static_type() -> glib::Type { |
1899 | unsafe { from_glib(val:ffi::gst_video_dither_method_get_type()) } |
1900 | } |
1901 | } |
1902 | |
1903 | impl glib::HasParamSpec for VideoDitherMethod { |
1904 | type ParamSpec = glib::ParamSpecEnum; |
1905 | type SetValue = Self; |
1906 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
1907 | |
1908 | fn param_spec_builder() -> Self::BuilderFn { |
1909 | Self::ParamSpec::builder_with_default |
1910 | } |
1911 | } |
1912 | |
1913 | impl glib::value::ValueType for VideoDitherMethod { |
1914 | type Type = Self; |
1915 | } |
1916 | |
1917 | unsafe impl<'a> glib::value::FromValue<'a> for VideoDitherMethod { |
1918 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
1919 | |
1920 | #[inline ] |
1921 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
1922 | skip_assert_initialized!(); |
1923 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
1924 | } |
1925 | } |
1926 | |
1927 | impl ToValue for VideoDitherMethod { |
1928 | #[inline ] |
1929 | fn to_value(&self) -> glib::Value { |
1930 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
1931 | unsafe { |
1932 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
1933 | } |
1934 | value |
1935 | } |
1936 | |
1937 | #[inline ] |
1938 | fn value_type(&self) -> glib::Type { |
1939 | Self::static_type() |
1940 | } |
1941 | } |
1942 | |
1943 | impl From<VideoDitherMethod> for glib::Value { |
1944 | #[inline ] |
1945 | fn from(v: VideoDitherMethod) -> Self { |
1946 | skip_assert_initialized!(); |
1947 | ToValue::to_value(&v) |
1948 | } |
1949 | } |
1950 | |
1951 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
1952 | #[non_exhaustive ] |
1953 | #[doc (alias = "GstVideoFieldOrder" )] |
1954 | pub enum VideoFieldOrder { |
1955 | #[doc (alias = "GST_VIDEO_FIELD_ORDER_UNKNOWN" )] |
1956 | Unknown, |
1957 | #[doc (alias = "GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST" )] |
1958 | TopFieldFirst, |
1959 | #[doc (alias = "GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST" )] |
1960 | BottomFieldFirst, |
1961 | #[doc (hidden)] |
1962 | __Unknown(i32), |
1963 | } |
1964 | |
1965 | impl VideoFieldOrder { |
1966 | #[doc (alias = "gst_video_field_order_from_string" )] |
1967 | pub fn from_string(order: &str) -> VideoFieldOrder { |
1968 | assert_initialized_main_thread!(); |
1969 | unsafe { |
1970 | from_glib(val:ffi::gst_video_field_order_from_string( |
1971 | order:order.to_glib_none().0, |
1972 | )) |
1973 | } |
1974 | } |
1975 | } |
1976 | |
1977 | impl fmt::Display for VideoFieldOrder { |
1978 | #[inline ] |
1979 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
1980 | f.write_str(&self.to_str()) |
1981 | } |
1982 | } |
1983 | |
1984 | #[doc (hidden)] |
1985 | impl IntoGlib for VideoFieldOrder { |
1986 | type GlibType = ffi::GstVideoFieldOrder; |
1987 | |
1988 | #[inline ] |
1989 | fn into_glib(self) -> ffi::GstVideoFieldOrder { |
1990 | match self { |
1991 | Self::Unknown => ffi::GST_VIDEO_FIELD_ORDER_UNKNOWN, |
1992 | Self::TopFieldFirst => ffi::GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST, |
1993 | Self::BottomFieldFirst => ffi::GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST, |
1994 | Self::__Unknown(value: i32) => value, |
1995 | } |
1996 | } |
1997 | } |
1998 | |
1999 | #[doc (hidden)] |
2000 | impl FromGlib<ffi::GstVideoFieldOrder> for VideoFieldOrder { |
2001 | #[inline ] |
2002 | unsafe fn from_glib(value: ffi::GstVideoFieldOrder) -> Self { |
2003 | skip_assert_initialized!(); |
2004 | |
2005 | match value { |
2006 | ffi::GST_VIDEO_FIELD_ORDER_UNKNOWN => Self::Unknown, |
2007 | ffi::GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST => Self::TopFieldFirst, |
2008 | ffi::GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST => Self::BottomFieldFirst, |
2009 | value: i32 => Self::__Unknown(value), |
2010 | } |
2011 | } |
2012 | } |
2013 | |
2014 | impl StaticType for VideoFieldOrder { |
2015 | #[inline ] |
2016 | #[doc (alias = "gst_video_field_order_get_type" )] |
2017 | fn static_type() -> glib::Type { |
2018 | unsafe { from_glib(val:ffi::gst_video_field_order_get_type()) } |
2019 | } |
2020 | } |
2021 | |
2022 | impl glib::HasParamSpec for VideoFieldOrder { |
2023 | type ParamSpec = glib::ParamSpecEnum; |
2024 | type SetValue = Self; |
2025 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
2026 | |
2027 | fn param_spec_builder() -> Self::BuilderFn { |
2028 | Self::ParamSpec::builder_with_default |
2029 | } |
2030 | } |
2031 | |
2032 | impl glib::value::ValueType for VideoFieldOrder { |
2033 | type Type = Self; |
2034 | } |
2035 | |
2036 | unsafe impl<'a> glib::value::FromValue<'a> for VideoFieldOrder { |
2037 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
2038 | |
2039 | #[inline ] |
2040 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
2041 | skip_assert_initialized!(); |
2042 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
2043 | } |
2044 | } |
2045 | |
2046 | impl ToValue for VideoFieldOrder { |
2047 | #[inline ] |
2048 | fn to_value(&self) -> glib::Value { |
2049 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
2050 | unsafe { |
2051 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
2052 | } |
2053 | value |
2054 | } |
2055 | |
2056 | #[inline ] |
2057 | fn value_type(&self) -> glib::Type { |
2058 | Self::static_type() |
2059 | } |
2060 | } |
2061 | |
2062 | impl From<VideoFieldOrder> for glib::Value { |
2063 | #[inline ] |
2064 | fn from(v: VideoFieldOrder) -> Self { |
2065 | skip_assert_initialized!(); |
2066 | ToValue::to_value(&v) |
2067 | } |
2068 | } |
2069 | |
2070 | #[derive (Debug, Eq, PartialEq, Hash, Clone, Copy)] |
2071 | #[non_exhaustive ] |
2072 | #[doc (alias = "GstVideoFormat" )] |
2073 | pub enum VideoFormat { |
2074 | #[doc (alias = "GST_VIDEO_FORMAT_UNKNOWN" )] |
2075 | Unknown, |
2076 | #[doc (alias = "GST_VIDEO_FORMAT_ENCODED" )] |
2077 | Encoded, |
2078 | #[doc (alias = "GST_VIDEO_FORMAT_I420" )] |
2079 | I420, |
2080 | #[doc (alias = "GST_VIDEO_FORMAT_YV12" )] |
2081 | Yv12, |
2082 | #[doc (alias = "GST_VIDEO_FORMAT_YUY2" )] |
2083 | Yuy2, |
2084 | #[doc (alias = "GST_VIDEO_FORMAT_UYVY" )] |
2085 | Uyvy, |
2086 | #[doc (alias = "GST_VIDEO_FORMAT_AYUV" )] |
2087 | Ayuv, |
2088 | #[doc (alias = "GST_VIDEO_FORMAT_RGBx" )] |
2089 | Rgbx, |
2090 | #[doc (alias = "GST_VIDEO_FORMAT_BGRx" )] |
2091 | Bgrx, |
2092 | #[doc (alias = "GST_VIDEO_FORMAT_xRGB" )] |
2093 | Xrgb, |
2094 | #[doc (alias = "GST_VIDEO_FORMAT_xBGR" )] |
2095 | Xbgr, |
2096 | #[doc (alias = "GST_VIDEO_FORMAT_RGBA" )] |
2097 | Rgba, |
2098 | #[doc (alias = "GST_VIDEO_FORMAT_BGRA" )] |
2099 | Bgra, |
2100 | #[doc (alias = "GST_VIDEO_FORMAT_ARGB" )] |
2101 | Argb, |
2102 | #[doc (alias = "GST_VIDEO_FORMAT_ABGR" )] |
2103 | Abgr, |
2104 | #[doc (alias = "GST_VIDEO_FORMAT_RGB" )] |
2105 | Rgb, |
2106 | #[doc (alias = "GST_VIDEO_FORMAT_BGR" )] |
2107 | Bgr, |
2108 | #[doc (alias = "GST_VIDEO_FORMAT_Y41B" )] |
2109 | Y41b, |
2110 | #[doc (alias = "GST_VIDEO_FORMAT_Y42B" )] |
2111 | Y42b, |
2112 | #[doc (alias = "GST_VIDEO_FORMAT_YVYU" )] |
2113 | Yvyu, |
2114 | #[doc (alias = "GST_VIDEO_FORMAT_Y444" )] |
2115 | Y444, |
2116 | #[doc (alias = "GST_VIDEO_FORMAT_v210" )] |
2117 | V210, |
2118 | #[doc (alias = "GST_VIDEO_FORMAT_v216" )] |
2119 | V216, |
2120 | #[doc (alias = "GST_VIDEO_FORMAT_NV12" )] |
2121 | Nv12, |
2122 | #[doc (alias = "GST_VIDEO_FORMAT_NV21" )] |
2123 | Nv21, |
2124 | #[doc (alias = "GST_VIDEO_FORMAT_GRAY8" )] |
2125 | Gray8, |
2126 | #[doc (alias = "GST_VIDEO_FORMAT_GRAY16_BE" )] |
2127 | Gray16Be, |
2128 | #[doc (alias = "GST_VIDEO_FORMAT_GRAY16_LE" )] |
2129 | Gray16Le, |
2130 | #[doc (alias = "GST_VIDEO_FORMAT_v308" )] |
2131 | V308, |
2132 | #[doc (alias = "GST_VIDEO_FORMAT_RGB16" )] |
2133 | Rgb16, |
2134 | #[doc (alias = "GST_VIDEO_FORMAT_BGR16" )] |
2135 | Bgr16, |
2136 | #[doc (alias = "GST_VIDEO_FORMAT_RGB15" )] |
2137 | Rgb15, |
2138 | #[doc (alias = "GST_VIDEO_FORMAT_BGR15" )] |
2139 | Bgr15, |
2140 | #[doc (alias = "GST_VIDEO_FORMAT_UYVP" )] |
2141 | Uyvp, |
2142 | #[doc (alias = "GST_VIDEO_FORMAT_A420" )] |
2143 | A420, |
2144 | #[doc (alias = "GST_VIDEO_FORMAT_RGB8P" )] |
2145 | Rgb8p, |
2146 | #[doc (alias = "GST_VIDEO_FORMAT_YUV9" )] |
2147 | Yuv9, |
2148 | #[doc (alias = "GST_VIDEO_FORMAT_YVU9" )] |
2149 | Yvu9, |
2150 | #[doc (alias = "GST_VIDEO_FORMAT_IYU1" )] |
2151 | Iyu1, |
2152 | #[doc (alias = "GST_VIDEO_FORMAT_ARGB64" )] |
2153 | Argb64, |
2154 | #[doc (alias = "GST_VIDEO_FORMAT_AYUV64" )] |
2155 | Ayuv64, |
2156 | #[doc (alias = "GST_VIDEO_FORMAT_r210" )] |
2157 | R210, |
2158 | #[doc (alias = "GST_VIDEO_FORMAT_I420_10BE" )] |
2159 | I42010be, |
2160 | #[doc (alias = "GST_VIDEO_FORMAT_I420_10LE" )] |
2161 | I42010le, |
2162 | #[doc (alias = "GST_VIDEO_FORMAT_I422_10BE" )] |
2163 | I42210be, |
2164 | #[doc (alias = "GST_VIDEO_FORMAT_I422_10LE" )] |
2165 | I42210le, |
2166 | #[doc (alias = "GST_VIDEO_FORMAT_Y444_10BE" )] |
2167 | Y44410be, |
2168 | #[doc (alias = "GST_VIDEO_FORMAT_Y444_10LE" )] |
2169 | Y44410le, |
2170 | #[doc (alias = "GST_VIDEO_FORMAT_GBR" )] |
2171 | Gbr, |
2172 | #[doc (alias = "GST_VIDEO_FORMAT_GBR_10BE" )] |
2173 | Gbr10be, |
2174 | #[doc (alias = "GST_VIDEO_FORMAT_GBR_10LE" )] |
2175 | Gbr10le, |
2176 | #[doc (alias = "GST_VIDEO_FORMAT_NV16" )] |
2177 | Nv16, |
2178 | #[doc (alias = "GST_VIDEO_FORMAT_NV24" )] |
2179 | Nv24, |
2180 | #[doc (alias = "GST_VIDEO_FORMAT_NV12_64Z32" )] |
2181 | Nv1264z32, |
2182 | #[doc (alias = "GST_VIDEO_FORMAT_A420_10BE" )] |
2183 | A42010be, |
2184 | #[doc (alias = "GST_VIDEO_FORMAT_A420_10LE" )] |
2185 | A42010le, |
2186 | #[doc (alias = "GST_VIDEO_FORMAT_A422_10BE" )] |
2187 | A42210be, |
2188 | #[doc (alias = "GST_VIDEO_FORMAT_A422_10LE" )] |
2189 | A42210le, |
2190 | #[doc (alias = "GST_VIDEO_FORMAT_A444_10BE" )] |
2191 | A44410be, |
2192 | #[doc (alias = "GST_VIDEO_FORMAT_A444_10LE" )] |
2193 | A44410le, |
2194 | #[doc (alias = "GST_VIDEO_FORMAT_NV61" )] |
2195 | Nv61, |
2196 | #[doc (alias = "GST_VIDEO_FORMAT_P010_10BE" )] |
2197 | P01010be, |
2198 | #[doc (alias = "GST_VIDEO_FORMAT_P010_10LE" )] |
2199 | P01010le, |
2200 | #[doc (alias = "GST_VIDEO_FORMAT_IYU2" )] |
2201 | Iyu2, |
2202 | #[doc (alias = "GST_VIDEO_FORMAT_VYUY" )] |
2203 | Vyuy, |
2204 | #[doc (alias = "GST_VIDEO_FORMAT_GBRA" )] |
2205 | Gbra, |
2206 | #[doc (alias = "GST_VIDEO_FORMAT_GBRA_10BE" )] |
2207 | Gbra10be, |
2208 | #[doc (alias = "GST_VIDEO_FORMAT_GBRA_10LE" )] |
2209 | Gbra10le, |
2210 | #[doc (alias = "GST_VIDEO_FORMAT_GBR_12BE" )] |
2211 | Gbr12be, |
2212 | #[doc (alias = "GST_VIDEO_FORMAT_GBR_12LE" )] |
2213 | Gbr12le, |
2214 | #[doc (alias = "GST_VIDEO_FORMAT_GBRA_12BE" )] |
2215 | Gbra12be, |
2216 | #[doc (alias = "GST_VIDEO_FORMAT_GBRA_12LE" )] |
2217 | Gbra12le, |
2218 | #[doc (alias = "GST_VIDEO_FORMAT_I420_12BE" )] |
2219 | I42012be, |
2220 | #[doc (alias = "GST_VIDEO_FORMAT_I420_12LE" )] |
2221 | I42012le, |
2222 | #[doc (alias = "GST_VIDEO_FORMAT_I422_12BE" )] |
2223 | I42212be, |
2224 | #[doc (alias = "GST_VIDEO_FORMAT_I422_12LE" )] |
2225 | I42212le, |
2226 | #[doc (alias = "GST_VIDEO_FORMAT_Y444_12BE" )] |
2227 | Y44412be, |
2228 | #[doc (alias = "GST_VIDEO_FORMAT_Y444_12LE" )] |
2229 | Y44412le, |
2230 | #[doc (alias = "GST_VIDEO_FORMAT_GRAY10_LE32" )] |
2231 | Gray10Le32, |
2232 | #[doc (alias = "GST_VIDEO_FORMAT_NV12_10LE32" )] |
2233 | Nv1210le32, |
2234 | #[doc (alias = "GST_VIDEO_FORMAT_NV16_10LE32" )] |
2235 | Nv1610le32, |
2236 | #[cfg (feature = "v1_16" )] |
2237 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
2238 | #[doc (alias = "GST_VIDEO_FORMAT_NV12_10LE40" )] |
2239 | Nv1210le40, |
2240 | #[cfg (feature = "v1_16" )] |
2241 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
2242 | #[doc (alias = "GST_VIDEO_FORMAT_Y210" )] |
2243 | Y210, |
2244 | #[cfg (feature = "v1_16" )] |
2245 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
2246 | #[doc (alias = "GST_VIDEO_FORMAT_Y410" )] |
2247 | Y410, |
2248 | #[cfg (feature = "v1_16" )] |
2249 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
2250 | #[doc (alias = "GST_VIDEO_FORMAT_VUYA" )] |
2251 | Vuya, |
2252 | #[cfg (feature = "v1_16" )] |
2253 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
2254 | #[doc (alias = "GST_VIDEO_FORMAT_BGR10A2_LE" )] |
2255 | Bgr10a2Le, |
2256 | #[cfg (feature = "v1_18" )] |
2257 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2258 | #[doc (alias = "GST_VIDEO_FORMAT_RGB10A2_LE" )] |
2259 | Rgb10a2Le, |
2260 | #[cfg (feature = "v1_18" )] |
2261 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2262 | #[doc (alias = "GST_VIDEO_FORMAT_Y444_16BE" )] |
2263 | Y44416be, |
2264 | #[cfg (feature = "v1_18" )] |
2265 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2266 | #[doc (alias = "GST_VIDEO_FORMAT_Y444_16LE" )] |
2267 | Y44416le, |
2268 | #[cfg (feature = "v1_18" )] |
2269 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2270 | #[doc (alias = "GST_VIDEO_FORMAT_P016_BE" )] |
2271 | P016Be, |
2272 | #[cfg (feature = "v1_18" )] |
2273 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2274 | #[doc (alias = "GST_VIDEO_FORMAT_P016_LE" )] |
2275 | P016Le, |
2276 | #[cfg (feature = "v1_18" )] |
2277 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2278 | #[doc (alias = "GST_VIDEO_FORMAT_P012_BE" )] |
2279 | P012Be, |
2280 | #[cfg (feature = "v1_18" )] |
2281 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2282 | #[doc (alias = "GST_VIDEO_FORMAT_P012_LE" )] |
2283 | P012Le, |
2284 | #[cfg (feature = "v1_18" )] |
2285 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2286 | #[doc (alias = "GST_VIDEO_FORMAT_Y212_BE" )] |
2287 | Y212Be, |
2288 | #[cfg (feature = "v1_18" )] |
2289 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2290 | #[doc (alias = "GST_VIDEO_FORMAT_Y212_LE" )] |
2291 | Y212Le, |
2292 | #[cfg (feature = "v1_18" )] |
2293 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2294 | #[doc (alias = "GST_VIDEO_FORMAT_Y412_BE" )] |
2295 | Y412Be, |
2296 | #[cfg (feature = "v1_18" )] |
2297 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2298 | #[doc (alias = "GST_VIDEO_FORMAT_Y412_LE" )] |
2299 | Y412Le, |
2300 | #[cfg (feature = "v1_18" )] |
2301 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2302 | #[doc (alias = "GST_VIDEO_FORMAT_NV12_4L4" )] |
2303 | Nv124l4, |
2304 | #[cfg (feature = "v1_18" )] |
2305 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
2306 | #[doc (alias = "GST_VIDEO_FORMAT_NV12_32L32" )] |
2307 | Nv1232l32, |
2308 | #[cfg (feature = "v1_20" )] |
2309 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
2310 | #[doc (alias = "GST_VIDEO_FORMAT_RGBP" )] |
2311 | Rgbp, |
2312 | #[cfg (feature = "v1_20" )] |
2313 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
2314 | #[doc (alias = "GST_VIDEO_FORMAT_BGRP" )] |
2315 | Bgrp, |
2316 | #[cfg (feature = "v1_20" )] |
2317 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
2318 | #[doc (alias = "GST_VIDEO_FORMAT_AV12" )] |
2319 | Av12, |
2320 | #[cfg (feature = "v1_20" )] |
2321 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
2322 | #[doc (alias = "GST_VIDEO_FORMAT_ARGB64_LE" )] |
2323 | Argb64Le, |
2324 | #[cfg (feature = "v1_20" )] |
2325 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
2326 | #[doc (alias = "GST_VIDEO_FORMAT_ARGB64_BE" )] |
2327 | Argb64Be, |
2328 | #[cfg (feature = "v1_20" )] |
2329 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
2330 | #[doc (alias = "GST_VIDEO_FORMAT_RGBA64_LE" )] |
2331 | Rgba64Le, |
2332 | #[cfg (feature = "v1_20" )] |
2333 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
2334 | #[doc (alias = "GST_VIDEO_FORMAT_RGBA64_BE" )] |
2335 | Rgba64Be, |
2336 | #[cfg (feature = "v1_20" )] |
2337 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
2338 | #[doc (alias = "GST_VIDEO_FORMAT_BGRA64_LE" )] |
2339 | Bgra64Le, |
2340 | #[cfg (feature = "v1_20" )] |
2341 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
2342 | #[doc (alias = "GST_VIDEO_FORMAT_BGRA64_BE" )] |
2343 | Bgra64Be, |
2344 | #[cfg (feature = "v1_20" )] |
2345 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
2346 | #[doc (alias = "GST_VIDEO_FORMAT_ABGR64_LE" )] |
2347 | Abgr64Le, |
2348 | #[cfg (feature = "v1_20" )] |
2349 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
2350 | #[doc (alias = "GST_VIDEO_FORMAT_ABGR64_BE" )] |
2351 | Abgr64Be, |
2352 | #[cfg (feature = "v1_22" )] |
2353 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_22" )))] |
2354 | #[doc (alias = "GST_VIDEO_FORMAT_NV12_16L32S" )] |
2355 | Nv1216l32s, |
2356 | #[cfg (feature = "v1_22" )] |
2357 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_22" )))] |
2358 | #[doc (alias = "GST_VIDEO_FORMAT_NV12_8L128" )] |
2359 | Nv128l128, |
2360 | #[cfg (feature = "v1_22" )] |
2361 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_22" )))] |
2362 | #[doc (alias = "GST_VIDEO_FORMAT_NV12_10BE_8L128" )] |
2363 | Nv1210be8l128, |
2364 | #[cfg (feature = "v1_24" )] |
2365 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2366 | #[doc (alias = "GST_VIDEO_FORMAT_NV12_10LE40_4L4" )] |
2367 | Nv1210le404l4, |
2368 | #[cfg (feature = "v1_24" )] |
2369 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2370 | #[doc (alias = "GST_VIDEO_FORMAT_DMA_DRM" )] |
2371 | DmaDrm, |
2372 | #[cfg (feature = "v1_24" )] |
2373 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2374 | #[doc (alias = "GST_VIDEO_FORMAT_MT2110T" )] |
2375 | Mt2110t, |
2376 | #[cfg (feature = "v1_24" )] |
2377 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2378 | #[doc (alias = "GST_VIDEO_FORMAT_MT2110R" )] |
2379 | Mt2110r, |
2380 | #[cfg (feature = "v1_24" )] |
2381 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2382 | #[doc (alias = "GST_VIDEO_FORMAT_A422" )] |
2383 | A422, |
2384 | #[cfg (feature = "v1_24" )] |
2385 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2386 | #[doc (alias = "GST_VIDEO_FORMAT_A444" )] |
2387 | A444, |
2388 | #[cfg (feature = "v1_24" )] |
2389 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2390 | #[doc (alias = "GST_VIDEO_FORMAT_A444_12LE" )] |
2391 | A44412le, |
2392 | #[cfg (feature = "v1_24" )] |
2393 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2394 | #[doc (alias = "GST_VIDEO_FORMAT_A444_12BE" )] |
2395 | A44412be, |
2396 | #[cfg (feature = "v1_24" )] |
2397 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2398 | #[doc (alias = "GST_VIDEO_FORMAT_A422_12LE" )] |
2399 | A42212le, |
2400 | #[cfg (feature = "v1_24" )] |
2401 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2402 | #[doc (alias = "GST_VIDEO_FORMAT_A422_12BE" )] |
2403 | A42212be, |
2404 | #[cfg (feature = "v1_24" )] |
2405 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2406 | #[doc (alias = "GST_VIDEO_FORMAT_A420_12LE" )] |
2407 | A42012le, |
2408 | #[cfg (feature = "v1_24" )] |
2409 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2410 | #[doc (alias = "GST_VIDEO_FORMAT_A420_12BE" )] |
2411 | A42012be, |
2412 | #[cfg (feature = "v1_24" )] |
2413 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2414 | #[doc (alias = "GST_VIDEO_FORMAT_A444_16LE" )] |
2415 | A44416le, |
2416 | #[cfg (feature = "v1_24" )] |
2417 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2418 | #[doc (alias = "GST_VIDEO_FORMAT_A444_16BE" )] |
2419 | A44416be, |
2420 | #[cfg (feature = "v1_24" )] |
2421 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2422 | #[doc (alias = "GST_VIDEO_FORMAT_A422_16LE" )] |
2423 | A42216le, |
2424 | #[cfg (feature = "v1_24" )] |
2425 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2426 | #[doc (alias = "GST_VIDEO_FORMAT_A422_16BE" )] |
2427 | A42216be, |
2428 | #[cfg (feature = "v1_24" )] |
2429 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2430 | #[doc (alias = "GST_VIDEO_FORMAT_A420_16LE" )] |
2431 | A42016le, |
2432 | #[cfg (feature = "v1_24" )] |
2433 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2434 | #[doc (alias = "GST_VIDEO_FORMAT_A420_16BE" )] |
2435 | A42016be, |
2436 | #[cfg (feature = "v1_24" )] |
2437 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2438 | #[doc (alias = "GST_VIDEO_FORMAT_GBR_16LE" )] |
2439 | Gbr16le, |
2440 | #[cfg (feature = "v1_24" )] |
2441 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_24" )))] |
2442 | #[doc (alias = "GST_VIDEO_FORMAT_GBR_16BE" )] |
2443 | Gbr16be, |
2444 | #[doc (hidden)] |
2445 | __Unknown(i32), |
2446 | } |
2447 | |
2448 | impl VideoFormat { |
2449 | #[doc (alias = "gst_video_format_from_fourcc" )] |
2450 | pub fn from_fourcc(fourcc: u32) -> VideoFormat { |
2451 | assert_initialized_main_thread!(); |
2452 | unsafe { from_glib(ffi::gst_video_format_from_fourcc(fourcc)) } |
2453 | } |
2454 | |
2455 | #[doc (alias = "gst_video_format_from_string" )] |
2456 | pub fn from_string(format: &str) -> VideoFormat { |
2457 | assert_initialized_main_thread!(); |
2458 | unsafe { from_glib(ffi::gst_video_format_from_string(format.to_glib_none().0)) } |
2459 | } |
2460 | |
2461 | //#[doc(alias = "gst_video_format_get_palette")] |
2462 | //#[doc(alias = "get_palette")] |
2463 | //pub fn palette(self) -> (/*Unimplemented*/Option<Basic: Pointer>, usize) { |
2464 | // unsafe { TODO: call ffi:gst_video_format_get_palette() } |
2465 | //} |
2466 | |
2467 | #[doc (alias = "gst_video_format_to_fourcc" )] |
2468 | pub fn to_fourcc(self) -> u32 { |
2469 | assert_initialized_main_thread!(); |
2470 | unsafe { ffi::gst_video_format_to_fourcc(self.into_glib()) } |
2471 | } |
2472 | } |
2473 | |
2474 | impl fmt::Display for VideoFormat { |
2475 | #[inline ] |
2476 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
2477 | f.write_str(&self.to_str()) |
2478 | } |
2479 | } |
2480 | |
2481 | #[doc (hidden)] |
2482 | impl IntoGlib for VideoFormat { |
2483 | type GlibType = ffi::GstVideoFormat; |
2484 | |
2485 | fn into_glib(self) -> ffi::GstVideoFormat { |
2486 | match self { |
2487 | Self::Unknown => ffi::GST_VIDEO_FORMAT_UNKNOWN, |
2488 | Self::Encoded => ffi::GST_VIDEO_FORMAT_ENCODED, |
2489 | Self::I420 => ffi::GST_VIDEO_FORMAT_I420, |
2490 | Self::Yv12 => ffi::GST_VIDEO_FORMAT_YV12, |
2491 | Self::Yuy2 => ffi::GST_VIDEO_FORMAT_YUY2, |
2492 | Self::Uyvy => ffi::GST_VIDEO_FORMAT_UYVY, |
2493 | Self::Ayuv => ffi::GST_VIDEO_FORMAT_AYUV, |
2494 | Self::Rgbx => ffi::GST_VIDEO_FORMAT_RGBx, |
2495 | Self::Bgrx => ffi::GST_VIDEO_FORMAT_BGRx, |
2496 | Self::Xrgb => ffi::GST_VIDEO_FORMAT_xRGB, |
2497 | Self::Xbgr => ffi::GST_VIDEO_FORMAT_xBGR, |
2498 | Self::Rgba => ffi::GST_VIDEO_FORMAT_RGBA, |
2499 | Self::Bgra => ffi::GST_VIDEO_FORMAT_BGRA, |
2500 | Self::Argb => ffi::GST_VIDEO_FORMAT_ARGB, |
2501 | Self::Abgr => ffi::GST_VIDEO_FORMAT_ABGR, |
2502 | Self::Rgb => ffi::GST_VIDEO_FORMAT_RGB, |
2503 | Self::Bgr => ffi::GST_VIDEO_FORMAT_BGR, |
2504 | Self::Y41b => ffi::GST_VIDEO_FORMAT_Y41B, |
2505 | Self::Y42b => ffi::GST_VIDEO_FORMAT_Y42B, |
2506 | Self::Yvyu => ffi::GST_VIDEO_FORMAT_YVYU, |
2507 | Self::Y444 => ffi::GST_VIDEO_FORMAT_Y444, |
2508 | Self::V210 => ffi::GST_VIDEO_FORMAT_v210, |
2509 | Self::V216 => ffi::GST_VIDEO_FORMAT_v216, |
2510 | Self::Nv12 => ffi::GST_VIDEO_FORMAT_NV12, |
2511 | Self::Nv21 => ffi::GST_VIDEO_FORMAT_NV21, |
2512 | Self::Gray8 => ffi::GST_VIDEO_FORMAT_GRAY8, |
2513 | Self::Gray16Be => ffi::GST_VIDEO_FORMAT_GRAY16_BE, |
2514 | Self::Gray16Le => ffi::GST_VIDEO_FORMAT_GRAY16_LE, |
2515 | Self::V308 => ffi::GST_VIDEO_FORMAT_v308, |
2516 | Self::Rgb16 => ffi::GST_VIDEO_FORMAT_RGB16, |
2517 | Self::Bgr16 => ffi::GST_VIDEO_FORMAT_BGR16, |
2518 | Self::Rgb15 => ffi::GST_VIDEO_FORMAT_RGB15, |
2519 | Self::Bgr15 => ffi::GST_VIDEO_FORMAT_BGR15, |
2520 | Self::Uyvp => ffi::GST_VIDEO_FORMAT_UYVP, |
2521 | Self::A420 => ffi::GST_VIDEO_FORMAT_A420, |
2522 | Self::Rgb8p => ffi::GST_VIDEO_FORMAT_RGB8P, |
2523 | Self::Yuv9 => ffi::GST_VIDEO_FORMAT_YUV9, |
2524 | Self::Yvu9 => ffi::GST_VIDEO_FORMAT_YVU9, |
2525 | Self::Iyu1 => ffi::GST_VIDEO_FORMAT_IYU1, |
2526 | Self::Argb64 => ffi::GST_VIDEO_FORMAT_ARGB64, |
2527 | Self::Ayuv64 => ffi::GST_VIDEO_FORMAT_AYUV64, |
2528 | Self::R210 => ffi::GST_VIDEO_FORMAT_r210, |
2529 | Self::I42010be => ffi::GST_VIDEO_FORMAT_I420_10BE, |
2530 | Self::I42010le => ffi::GST_VIDEO_FORMAT_I420_10LE, |
2531 | Self::I42210be => ffi::GST_VIDEO_FORMAT_I422_10BE, |
2532 | Self::I42210le => ffi::GST_VIDEO_FORMAT_I422_10LE, |
2533 | Self::Y44410be => ffi::GST_VIDEO_FORMAT_Y444_10BE, |
2534 | Self::Y44410le => ffi::GST_VIDEO_FORMAT_Y444_10LE, |
2535 | Self::Gbr => ffi::GST_VIDEO_FORMAT_GBR, |
2536 | Self::Gbr10be => ffi::GST_VIDEO_FORMAT_GBR_10BE, |
2537 | Self::Gbr10le => ffi::GST_VIDEO_FORMAT_GBR_10LE, |
2538 | Self::Nv16 => ffi::GST_VIDEO_FORMAT_NV16, |
2539 | Self::Nv24 => ffi::GST_VIDEO_FORMAT_NV24, |
2540 | Self::Nv1264z32 => ffi::GST_VIDEO_FORMAT_NV12_64Z32, |
2541 | Self::A42010be => ffi::GST_VIDEO_FORMAT_A420_10BE, |
2542 | Self::A42010le => ffi::GST_VIDEO_FORMAT_A420_10LE, |
2543 | Self::A42210be => ffi::GST_VIDEO_FORMAT_A422_10BE, |
2544 | Self::A42210le => ffi::GST_VIDEO_FORMAT_A422_10LE, |
2545 | Self::A44410be => ffi::GST_VIDEO_FORMAT_A444_10BE, |
2546 | Self::A44410le => ffi::GST_VIDEO_FORMAT_A444_10LE, |
2547 | Self::Nv61 => ffi::GST_VIDEO_FORMAT_NV61, |
2548 | Self::P01010be => ffi::GST_VIDEO_FORMAT_P010_10BE, |
2549 | Self::P01010le => ffi::GST_VIDEO_FORMAT_P010_10LE, |
2550 | Self::Iyu2 => ffi::GST_VIDEO_FORMAT_IYU2, |
2551 | Self::Vyuy => ffi::GST_VIDEO_FORMAT_VYUY, |
2552 | Self::Gbra => ffi::GST_VIDEO_FORMAT_GBRA, |
2553 | Self::Gbra10be => ffi::GST_VIDEO_FORMAT_GBRA_10BE, |
2554 | Self::Gbra10le => ffi::GST_VIDEO_FORMAT_GBRA_10LE, |
2555 | Self::Gbr12be => ffi::GST_VIDEO_FORMAT_GBR_12BE, |
2556 | Self::Gbr12le => ffi::GST_VIDEO_FORMAT_GBR_12LE, |
2557 | Self::Gbra12be => ffi::GST_VIDEO_FORMAT_GBRA_12BE, |
2558 | Self::Gbra12le => ffi::GST_VIDEO_FORMAT_GBRA_12LE, |
2559 | Self::I42012be => ffi::GST_VIDEO_FORMAT_I420_12BE, |
2560 | Self::I42012le => ffi::GST_VIDEO_FORMAT_I420_12LE, |
2561 | Self::I42212be => ffi::GST_VIDEO_FORMAT_I422_12BE, |
2562 | Self::I42212le => ffi::GST_VIDEO_FORMAT_I422_12LE, |
2563 | Self::Y44412be => ffi::GST_VIDEO_FORMAT_Y444_12BE, |
2564 | Self::Y44412le => ffi::GST_VIDEO_FORMAT_Y444_12LE, |
2565 | Self::Gray10Le32 => ffi::GST_VIDEO_FORMAT_GRAY10_LE32, |
2566 | Self::Nv1210le32 => ffi::GST_VIDEO_FORMAT_NV12_10LE32, |
2567 | Self::Nv1610le32 => ffi::GST_VIDEO_FORMAT_NV16_10LE32, |
2568 | #[cfg (feature = "v1_16" )] |
2569 | Self::Nv1210le40 => ffi::GST_VIDEO_FORMAT_NV12_10LE40, |
2570 | #[cfg (feature = "v1_16" )] |
2571 | Self::Y210 => ffi::GST_VIDEO_FORMAT_Y210, |
2572 | #[cfg (feature = "v1_16" )] |
2573 | Self::Y410 => ffi::GST_VIDEO_FORMAT_Y410, |
2574 | #[cfg (feature = "v1_16" )] |
2575 | Self::Vuya => ffi::GST_VIDEO_FORMAT_VUYA, |
2576 | #[cfg (feature = "v1_16" )] |
2577 | Self::Bgr10a2Le => ffi::GST_VIDEO_FORMAT_BGR10A2_LE, |
2578 | #[cfg (feature = "v1_18" )] |
2579 | Self::Rgb10a2Le => ffi::GST_VIDEO_FORMAT_RGB10A2_LE, |
2580 | #[cfg (feature = "v1_18" )] |
2581 | Self::Y44416be => ffi::GST_VIDEO_FORMAT_Y444_16BE, |
2582 | #[cfg (feature = "v1_18" )] |
2583 | Self::Y44416le => ffi::GST_VIDEO_FORMAT_Y444_16LE, |
2584 | #[cfg (feature = "v1_18" )] |
2585 | Self::P016Be => ffi::GST_VIDEO_FORMAT_P016_BE, |
2586 | #[cfg (feature = "v1_18" )] |
2587 | Self::P016Le => ffi::GST_VIDEO_FORMAT_P016_LE, |
2588 | #[cfg (feature = "v1_18" )] |
2589 | Self::P012Be => ffi::GST_VIDEO_FORMAT_P012_BE, |
2590 | #[cfg (feature = "v1_18" )] |
2591 | Self::P012Le => ffi::GST_VIDEO_FORMAT_P012_LE, |
2592 | #[cfg (feature = "v1_18" )] |
2593 | Self::Y212Be => ffi::GST_VIDEO_FORMAT_Y212_BE, |
2594 | #[cfg (feature = "v1_18" )] |
2595 | Self::Y212Le => ffi::GST_VIDEO_FORMAT_Y212_LE, |
2596 | #[cfg (feature = "v1_18" )] |
2597 | Self::Y412Be => ffi::GST_VIDEO_FORMAT_Y412_BE, |
2598 | #[cfg (feature = "v1_18" )] |
2599 | Self::Y412Le => ffi::GST_VIDEO_FORMAT_Y412_LE, |
2600 | #[cfg (feature = "v1_18" )] |
2601 | Self::Nv124l4 => ffi::GST_VIDEO_FORMAT_NV12_4L4, |
2602 | #[cfg (feature = "v1_18" )] |
2603 | Self::Nv1232l32 => ffi::GST_VIDEO_FORMAT_NV12_32L32, |
2604 | #[cfg (feature = "v1_20" )] |
2605 | Self::Rgbp => ffi::GST_VIDEO_FORMAT_RGBP, |
2606 | #[cfg (feature = "v1_20" )] |
2607 | Self::Bgrp => ffi::GST_VIDEO_FORMAT_BGRP, |
2608 | #[cfg (feature = "v1_20" )] |
2609 | Self::Av12 => ffi::GST_VIDEO_FORMAT_AV12, |
2610 | #[cfg (feature = "v1_20" )] |
2611 | Self::Argb64Le => ffi::GST_VIDEO_FORMAT_ARGB64_LE, |
2612 | #[cfg (feature = "v1_20" )] |
2613 | Self::Argb64Be => ffi::GST_VIDEO_FORMAT_ARGB64_BE, |
2614 | #[cfg (feature = "v1_20" )] |
2615 | Self::Rgba64Le => ffi::GST_VIDEO_FORMAT_RGBA64_LE, |
2616 | #[cfg (feature = "v1_20" )] |
2617 | Self::Rgba64Be => ffi::GST_VIDEO_FORMAT_RGBA64_BE, |
2618 | #[cfg (feature = "v1_20" )] |
2619 | Self::Bgra64Le => ffi::GST_VIDEO_FORMAT_BGRA64_LE, |
2620 | #[cfg (feature = "v1_20" )] |
2621 | Self::Bgra64Be => ffi::GST_VIDEO_FORMAT_BGRA64_BE, |
2622 | #[cfg (feature = "v1_20" )] |
2623 | Self::Abgr64Le => ffi::GST_VIDEO_FORMAT_ABGR64_LE, |
2624 | #[cfg (feature = "v1_20" )] |
2625 | Self::Abgr64Be => ffi::GST_VIDEO_FORMAT_ABGR64_BE, |
2626 | #[cfg (feature = "v1_22" )] |
2627 | Self::Nv1216l32s => ffi::GST_VIDEO_FORMAT_NV12_16L32S, |
2628 | #[cfg (feature = "v1_22" )] |
2629 | Self::Nv128l128 => ffi::GST_VIDEO_FORMAT_NV12_8L128, |
2630 | #[cfg (feature = "v1_22" )] |
2631 | Self::Nv1210be8l128 => ffi::GST_VIDEO_FORMAT_NV12_10BE_8L128, |
2632 | #[cfg (feature = "v1_24" )] |
2633 | Self::Nv1210le404l4 => ffi::GST_VIDEO_FORMAT_NV12_10LE40_4L4, |
2634 | #[cfg (feature = "v1_24" )] |
2635 | Self::DmaDrm => ffi::GST_VIDEO_FORMAT_DMA_DRM, |
2636 | #[cfg (feature = "v1_24" )] |
2637 | Self::Mt2110t => ffi::GST_VIDEO_FORMAT_MT2110T, |
2638 | #[cfg (feature = "v1_24" )] |
2639 | Self::Mt2110r => ffi::GST_VIDEO_FORMAT_MT2110R, |
2640 | #[cfg (feature = "v1_24" )] |
2641 | Self::A422 => ffi::GST_VIDEO_FORMAT_A422, |
2642 | #[cfg (feature = "v1_24" )] |
2643 | Self::A444 => ffi::GST_VIDEO_FORMAT_A444, |
2644 | #[cfg (feature = "v1_24" )] |
2645 | Self::A44412le => ffi::GST_VIDEO_FORMAT_A444_12LE, |
2646 | #[cfg (feature = "v1_24" )] |
2647 | Self::A44412be => ffi::GST_VIDEO_FORMAT_A444_12BE, |
2648 | #[cfg (feature = "v1_24" )] |
2649 | Self::A42212le => ffi::GST_VIDEO_FORMAT_A422_12LE, |
2650 | #[cfg (feature = "v1_24" )] |
2651 | Self::A42212be => ffi::GST_VIDEO_FORMAT_A422_12BE, |
2652 | #[cfg (feature = "v1_24" )] |
2653 | Self::A42012le => ffi::GST_VIDEO_FORMAT_A420_12LE, |
2654 | #[cfg (feature = "v1_24" )] |
2655 | Self::A42012be => ffi::GST_VIDEO_FORMAT_A420_12BE, |
2656 | #[cfg (feature = "v1_24" )] |
2657 | Self::A44416le => ffi::GST_VIDEO_FORMAT_A444_16LE, |
2658 | #[cfg (feature = "v1_24" )] |
2659 | Self::A44416be => ffi::GST_VIDEO_FORMAT_A444_16BE, |
2660 | #[cfg (feature = "v1_24" )] |
2661 | Self::A42216le => ffi::GST_VIDEO_FORMAT_A422_16LE, |
2662 | #[cfg (feature = "v1_24" )] |
2663 | Self::A42216be => ffi::GST_VIDEO_FORMAT_A422_16BE, |
2664 | #[cfg (feature = "v1_24" )] |
2665 | Self::A42016le => ffi::GST_VIDEO_FORMAT_A420_16LE, |
2666 | #[cfg (feature = "v1_24" )] |
2667 | Self::A42016be => ffi::GST_VIDEO_FORMAT_A420_16BE, |
2668 | #[cfg (feature = "v1_24" )] |
2669 | Self::Gbr16le => ffi::GST_VIDEO_FORMAT_GBR_16LE, |
2670 | #[cfg (feature = "v1_24" )] |
2671 | Self::Gbr16be => ffi::GST_VIDEO_FORMAT_GBR_16BE, |
2672 | Self::__Unknown(value) => value, |
2673 | } |
2674 | } |
2675 | } |
2676 | |
2677 | #[doc (hidden)] |
2678 | impl FromGlib<ffi::GstVideoFormat> for VideoFormat { |
2679 | unsafe fn from_glib(value: ffi::GstVideoFormat) -> Self { |
2680 | skip_assert_initialized!(); |
2681 | |
2682 | match value { |
2683 | ffi::GST_VIDEO_FORMAT_UNKNOWN => Self::Unknown, |
2684 | ffi::GST_VIDEO_FORMAT_ENCODED => Self::Encoded, |
2685 | ffi::GST_VIDEO_FORMAT_I420 => Self::I420, |
2686 | ffi::GST_VIDEO_FORMAT_YV12 => Self::Yv12, |
2687 | ffi::GST_VIDEO_FORMAT_YUY2 => Self::Yuy2, |
2688 | ffi::GST_VIDEO_FORMAT_UYVY => Self::Uyvy, |
2689 | ffi::GST_VIDEO_FORMAT_AYUV => Self::Ayuv, |
2690 | ffi::GST_VIDEO_FORMAT_RGBx => Self::Rgbx, |
2691 | ffi::GST_VIDEO_FORMAT_BGRx => Self::Bgrx, |
2692 | ffi::GST_VIDEO_FORMAT_xRGB => Self::Xrgb, |
2693 | ffi::GST_VIDEO_FORMAT_xBGR => Self::Xbgr, |
2694 | ffi::GST_VIDEO_FORMAT_RGBA => Self::Rgba, |
2695 | ffi::GST_VIDEO_FORMAT_BGRA => Self::Bgra, |
2696 | ffi::GST_VIDEO_FORMAT_ARGB => Self::Argb, |
2697 | ffi::GST_VIDEO_FORMAT_ABGR => Self::Abgr, |
2698 | ffi::GST_VIDEO_FORMAT_RGB => Self::Rgb, |
2699 | ffi::GST_VIDEO_FORMAT_BGR => Self::Bgr, |
2700 | ffi::GST_VIDEO_FORMAT_Y41B => Self::Y41b, |
2701 | ffi::GST_VIDEO_FORMAT_Y42B => Self::Y42b, |
2702 | ffi::GST_VIDEO_FORMAT_YVYU => Self::Yvyu, |
2703 | ffi::GST_VIDEO_FORMAT_Y444 => Self::Y444, |
2704 | ffi::GST_VIDEO_FORMAT_v210 => Self::V210, |
2705 | ffi::GST_VIDEO_FORMAT_v216 => Self::V216, |
2706 | ffi::GST_VIDEO_FORMAT_NV12 => Self::Nv12, |
2707 | ffi::GST_VIDEO_FORMAT_NV21 => Self::Nv21, |
2708 | ffi::GST_VIDEO_FORMAT_GRAY8 => Self::Gray8, |
2709 | ffi::GST_VIDEO_FORMAT_GRAY16_BE => Self::Gray16Be, |
2710 | ffi::GST_VIDEO_FORMAT_GRAY16_LE => Self::Gray16Le, |
2711 | ffi::GST_VIDEO_FORMAT_v308 => Self::V308, |
2712 | ffi::GST_VIDEO_FORMAT_RGB16 => Self::Rgb16, |
2713 | ffi::GST_VIDEO_FORMAT_BGR16 => Self::Bgr16, |
2714 | ffi::GST_VIDEO_FORMAT_RGB15 => Self::Rgb15, |
2715 | ffi::GST_VIDEO_FORMAT_BGR15 => Self::Bgr15, |
2716 | ffi::GST_VIDEO_FORMAT_UYVP => Self::Uyvp, |
2717 | ffi::GST_VIDEO_FORMAT_A420 => Self::A420, |
2718 | ffi::GST_VIDEO_FORMAT_RGB8P => Self::Rgb8p, |
2719 | ffi::GST_VIDEO_FORMAT_YUV9 => Self::Yuv9, |
2720 | ffi::GST_VIDEO_FORMAT_YVU9 => Self::Yvu9, |
2721 | ffi::GST_VIDEO_FORMAT_IYU1 => Self::Iyu1, |
2722 | ffi::GST_VIDEO_FORMAT_ARGB64 => Self::Argb64, |
2723 | ffi::GST_VIDEO_FORMAT_AYUV64 => Self::Ayuv64, |
2724 | ffi::GST_VIDEO_FORMAT_r210 => Self::R210, |
2725 | ffi::GST_VIDEO_FORMAT_I420_10BE => Self::I42010be, |
2726 | ffi::GST_VIDEO_FORMAT_I420_10LE => Self::I42010le, |
2727 | ffi::GST_VIDEO_FORMAT_I422_10BE => Self::I42210be, |
2728 | ffi::GST_VIDEO_FORMAT_I422_10LE => Self::I42210le, |
2729 | ffi::GST_VIDEO_FORMAT_Y444_10BE => Self::Y44410be, |
2730 | ffi::GST_VIDEO_FORMAT_Y444_10LE => Self::Y44410le, |
2731 | ffi::GST_VIDEO_FORMAT_GBR => Self::Gbr, |
2732 | ffi::GST_VIDEO_FORMAT_GBR_10BE => Self::Gbr10be, |
2733 | ffi::GST_VIDEO_FORMAT_GBR_10LE => Self::Gbr10le, |
2734 | ffi::GST_VIDEO_FORMAT_NV16 => Self::Nv16, |
2735 | ffi::GST_VIDEO_FORMAT_NV24 => Self::Nv24, |
2736 | ffi::GST_VIDEO_FORMAT_NV12_64Z32 => Self::Nv1264z32, |
2737 | ffi::GST_VIDEO_FORMAT_A420_10BE => Self::A42010be, |
2738 | ffi::GST_VIDEO_FORMAT_A420_10LE => Self::A42010le, |
2739 | ffi::GST_VIDEO_FORMAT_A422_10BE => Self::A42210be, |
2740 | ffi::GST_VIDEO_FORMAT_A422_10LE => Self::A42210le, |
2741 | ffi::GST_VIDEO_FORMAT_A444_10BE => Self::A44410be, |
2742 | ffi::GST_VIDEO_FORMAT_A444_10LE => Self::A44410le, |
2743 | ffi::GST_VIDEO_FORMAT_NV61 => Self::Nv61, |
2744 | ffi::GST_VIDEO_FORMAT_P010_10BE => Self::P01010be, |
2745 | ffi::GST_VIDEO_FORMAT_P010_10LE => Self::P01010le, |
2746 | ffi::GST_VIDEO_FORMAT_IYU2 => Self::Iyu2, |
2747 | ffi::GST_VIDEO_FORMAT_VYUY => Self::Vyuy, |
2748 | ffi::GST_VIDEO_FORMAT_GBRA => Self::Gbra, |
2749 | ffi::GST_VIDEO_FORMAT_GBRA_10BE => Self::Gbra10be, |
2750 | ffi::GST_VIDEO_FORMAT_GBRA_10LE => Self::Gbra10le, |
2751 | ffi::GST_VIDEO_FORMAT_GBR_12BE => Self::Gbr12be, |
2752 | ffi::GST_VIDEO_FORMAT_GBR_12LE => Self::Gbr12le, |
2753 | ffi::GST_VIDEO_FORMAT_GBRA_12BE => Self::Gbra12be, |
2754 | ffi::GST_VIDEO_FORMAT_GBRA_12LE => Self::Gbra12le, |
2755 | ffi::GST_VIDEO_FORMAT_I420_12BE => Self::I42012be, |
2756 | ffi::GST_VIDEO_FORMAT_I420_12LE => Self::I42012le, |
2757 | ffi::GST_VIDEO_FORMAT_I422_12BE => Self::I42212be, |
2758 | ffi::GST_VIDEO_FORMAT_I422_12LE => Self::I42212le, |
2759 | ffi::GST_VIDEO_FORMAT_Y444_12BE => Self::Y44412be, |
2760 | ffi::GST_VIDEO_FORMAT_Y444_12LE => Self::Y44412le, |
2761 | ffi::GST_VIDEO_FORMAT_GRAY10_LE32 => Self::Gray10Le32, |
2762 | ffi::GST_VIDEO_FORMAT_NV12_10LE32 => Self::Nv1210le32, |
2763 | ffi::GST_VIDEO_FORMAT_NV16_10LE32 => Self::Nv1610le32, |
2764 | #[cfg (feature = "v1_16" )] |
2765 | ffi::GST_VIDEO_FORMAT_NV12_10LE40 => Self::Nv1210le40, |
2766 | #[cfg (feature = "v1_16" )] |
2767 | ffi::GST_VIDEO_FORMAT_Y210 => Self::Y210, |
2768 | #[cfg (feature = "v1_16" )] |
2769 | ffi::GST_VIDEO_FORMAT_Y410 => Self::Y410, |
2770 | #[cfg (feature = "v1_16" )] |
2771 | ffi::GST_VIDEO_FORMAT_VUYA => Self::Vuya, |
2772 | #[cfg (feature = "v1_16" )] |
2773 | ffi::GST_VIDEO_FORMAT_BGR10A2_LE => Self::Bgr10a2Le, |
2774 | #[cfg (feature = "v1_18" )] |
2775 | ffi::GST_VIDEO_FORMAT_RGB10A2_LE => Self::Rgb10a2Le, |
2776 | #[cfg (feature = "v1_18" )] |
2777 | ffi::GST_VIDEO_FORMAT_Y444_16BE => Self::Y44416be, |
2778 | #[cfg (feature = "v1_18" )] |
2779 | ffi::GST_VIDEO_FORMAT_Y444_16LE => Self::Y44416le, |
2780 | #[cfg (feature = "v1_18" )] |
2781 | ffi::GST_VIDEO_FORMAT_P016_BE => Self::P016Be, |
2782 | #[cfg (feature = "v1_18" )] |
2783 | ffi::GST_VIDEO_FORMAT_P016_LE => Self::P016Le, |
2784 | #[cfg (feature = "v1_18" )] |
2785 | ffi::GST_VIDEO_FORMAT_P012_BE => Self::P012Be, |
2786 | #[cfg (feature = "v1_18" )] |
2787 | ffi::GST_VIDEO_FORMAT_P012_LE => Self::P012Le, |
2788 | #[cfg (feature = "v1_18" )] |
2789 | ffi::GST_VIDEO_FORMAT_Y212_BE => Self::Y212Be, |
2790 | #[cfg (feature = "v1_18" )] |
2791 | ffi::GST_VIDEO_FORMAT_Y212_LE => Self::Y212Le, |
2792 | #[cfg (feature = "v1_18" )] |
2793 | ffi::GST_VIDEO_FORMAT_Y412_BE => Self::Y412Be, |
2794 | #[cfg (feature = "v1_18" )] |
2795 | ffi::GST_VIDEO_FORMAT_Y412_LE => Self::Y412Le, |
2796 | #[cfg (feature = "v1_18" )] |
2797 | ffi::GST_VIDEO_FORMAT_NV12_4L4 => Self::Nv124l4, |
2798 | #[cfg (feature = "v1_18" )] |
2799 | ffi::GST_VIDEO_FORMAT_NV12_32L32 => Self::Nv1232l32, |
2800 | #[cfg (feature = "v1_20" )] |
2801 | ffi::GST_VIDEO_FORMAT_RGBP => Self::Rgbp, |
2802 | #[cfg (feature = "v1_20" )] |
2803 | ffi::GST_VIDEO_FORMAT_BGRP => Self::Bgrp, |
2804 | #[cfg (feature = "v1_20" )] |
2805 | ffi::GST_VIDEO_FORMAT_AV12 => Self::Av12, |
2806 | #[cfg (feature = "v1_20" )] |
2807 | ffi::GST_VIDEO_FORMAT_ARGB64_LE => Self::Argb64Le, |
2808 | #[cfg (feature = "v1_20" )] |
2809 | ffi::GST_VIDEO_FORMAT_ARGB64_BE => Self::Argb64Be, |
2810 | #[cfg (feature = "v1_20" )] |
2811 | ffi::GST_VIDEO_FORMAT_RGBA64_LE => Self::Rgba64Le, |
2812 | #[cfg (feature = "v1_20" )] |
2813 | ffi::GST_VIDEO_FORMAT_RGBA64_BE => Self::Rgba64Be, |
2814 | #[cfg (feature = "v1_20" )] |
2815 | ffi::GST_VIDEO_FORMAT_BGRA64_LE => Self::Bgra64Le, |
2816 | #[cfg (feature = "v1_20" )] |
2817 | ffi::GST_VIDEO_FORMAT_BGRA64_BE => Self::Bgra64Be, |
2818 | #[cfg (feature = "v1_20" )] |
2819 | ffi::GST_VIDEO_FORMAT_ABGR64_LE => Self::Abgr64Le, |
2820 | #[cfg (feature = "v1_20" )] |
2821 | ffi::GST_VIDEO_FORMAT_ABGR64_BE => Self::Abgr64Be, |
2822 | #[cfg (feature = "v1_22" )] |
2823 | ffi::GST_VIDEO_FORMAT_NV12_16L32S => Self::Nv1216l32s, |
2824 | #[cfg (feature = "v1_22" )] |
2825 | ffi::GST_VIDEO_FORMAT_NV12_8L128 => Self::Nv128l128, |
2826 | #[cfg (feature = "v1_22" )] |
2827 | ffi::GST_VIDEO_FORMAT_NV12_10BE_8L128 => Self::Nv1210be8l128, |
2828 | #[cfg (feature = "v1_24" )] |
2829 | ffi::GST_VIDEO_FORMAT_NV12_10LE40_4L4 => Self::Nv1210le404l4, |
2830 | #[cfg (feature = "v1_24" )] |
2831 | ffi::GST_VIDEO_FORMAT_DMA_DRM => Self::DmaDrm, |
2832 | #[cfg (feature = "v1_24" )] |
2833 | ffi::GST_VIDEO_FORMAT_MT2110T => Self::Mt2110t, |
2834 | #[cfg (feature = "v1_24" )] |
2835 | ffi::GST_VIDEO_FORMAT_MT2110R => Self::Mt2110r, |
2836 | #[cfg (feature = "v1_24" )] |
2837 | ffi::GST_VIDEO_FORMAT_A422 => Self::A422, |
2838 | #[cfg (feature = "v1_24" )] |
2839 | ffi::GST_VIDEO_FORMAT_A444 => Self::A444, |
2840 | #[cfg (feature = "v1_24" )] |
2841 | ffi::GST_VIDEO_FORMAT_A444_12LE => Self::A44412le, |
2842 | #[cfg (feature = "v1_24" )] |
2843 | ffi::GST_VIDEO_FORMAT_A444_12BE => Self::A44412be, |
2844 | #[cfg (feature = "v1_24" )] |
2845 | ffi::GST_VIDEO_FORMAT_A422_12LE => Self::A42212le, |
2846 | #[cfg (feature = "v1_24" )] |
2847 | ffi::GST_VIDEO_FORMAT_A422_12BE => Self::A42212be, |
2848 | #[cfg (feature = "v1_24" )] |
2849 | ffi::GST_VIDEO_FORMAT_A420_12LE => Self::A42012le, |
2850 | #[cfg (feature = "v1_24" )] |
2851 | ffi::GST_VIDEO_FORMAT_A420_12BE => Self::A42012be, |
2852 | #[cfg (feature = "v1_24" )] |
2853 | ffi::GST_VIDEO_FORMAT_A444_16LE => Self::A44416le, |
2854 | #[cfg (feature = "v1_24" )] |
2855 | ffi::GST_VIDEO_FORMAT_A444_16BE => Self::A44416be, |
2856 | #[cfg (feature = "v1_24" )] |
2857 | ffi::GST_VIDEO_FORMAT_A422_16LE => Self::A42216le, |
2858 | #[cfg (feature = "v1_24" )] |
2859 | ffi::GST_VIDEO_FORMAT_A422_16BE => Self::A42216be, |
2860 | #[cfg (feature = "v1_24" )] |
2861 | ffi::GST_VIDEO_FORMAT_A420_16LE => Self::A42016le, |
2862 | #[cfg (feature = "v1_24" )] |
2863 | ffi::GST_VIDEO_FORMAT_A420_16BE => Self::A42016be, |
2864 | #[cfg (feature = "v1_24" )] |
2865 | ffi::GST_VIDEO_FORMAT_GBR_16LE => Self::Gbr16le, |
2866 | #[cfg (feature = "v1_24" )] |
2867 | ffi::GST_VIDEO_FORMAT_GBR_16BE => Self::Gbr16be, |
2868 | value => Self::__Unknown(value), |
2869 | } |
2870 | } |
2871 | } |
2872 | |
2873 | impl StaticType for VideoFormat { |
2874 | #[inline ] |
2875 | #[doc (alias = "gst_video_format_get_type" )] |
2876 | fn static_type() -> glib::Type { |
2877 | unsafe { from_glib(val:ffi::gst_video_format_get_type()) } |
2878 | } |
2879 | } |
2880 | |
2881 | impl glib::HasParamSpec for VideoFormat { |
2882 | type ParamSpec = glib::ParamSpecEnum; |
2883 | type SetValue = Self; |
2884 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
2885 | |
2886 | fn param_spec_builder() -> Self::BuilderFn { |
2887 | Self::ParamSpec::builder_with_default |
2888 | } |
2889 | } |
2890 | |
2891 | impl glib::value::ValueType for VideoFormat { |
2892 | type Type = Self; |
2893 | } |
2894 | |
2895 | unsafe impl<'a> glib::value::FromValue<'a> for VideoFormat { |
2896 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
2897 | |
2898 | #[inline ] |
2899 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
2900 | skip_assert_initialized!(); |
2901 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
2902 | } |
2903 | } |
2904 | |
2905 | impl ToValue for VideoFormat { |
2906 | #[inline ] |
2907 | fn to_value(&self) -> glib::Value { |
2908 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
2909 | unsafe { |
2910 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
2911 | } |
2912 | value |
2913 | } |
2914 | |
2915 | #[inline ] |
2916 | fn value_type(&self) -> glib::Type { |
2917 | Self::static_type() |
2918 | } |
2919 | } |
2920 | |
2921 | impl From<VideoFormat> for glib::Value { |
2922 | #[inline ] |
2923 | fn from(v: VideoFormat) -> Self { |
2924 | skip_assert_initialized!(); |
2925 | ToValue::to_value(&v) |
2926 | } |
2927 | } |
2928 | |
2929 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
2930 | #[non_exhaustive ] |
2931 | #[doc (alias = "GstVideoGammaMode" )] |
2932 | pub enum VideoGammaMode { |
2933 | #[doc (alias = "GST_VIDEO_GAMMA_MODE_NONE" )] |
2934 | None, |
2935 | #[doc (alias = "GST_VIDEO_GAMMA_MODE_REMAP" )] |
2936 | Remap, |
2937 | #[doc (hidden)] |
2938 | __Unknown(i32), |
2939 | } |
2940 | |
2941 | #[doc (hidden)] |
2942 | impl IntoGlib for VideoGammaMode { |
2943 | type GlibType = ffi::GstVideoGammaMode; |
2944 | |
2945 | #[inline ] |
2946 | fn into_glib(self) -> ffi::GstVideoGammaMode { |
2947 | match self { |
2948 | Self::None => ffi::GST_VIDEO_GAMMA_MODE_NONE, |
2949 | Self::Remap => ffi::GST_VIDEO_GAMMA_MODE_REMAP, |
2950 | Self::__Unknown(value: i32) => value, |
2951 | } |
2952 | } |
2953 | } |
2954 | |
2955 | #[doc (hidden)] |
2956 | impl FromGlib<ffi::GstVideoGammaMode> for VideoGammaMode { |
2957 | #[inline ] |
2958 | unsafe fn from_glib(value: ffi::GstVideoGammaMode) -> Self { |
2959 | skip_assert_initialized!(); |
2960 | |
2961 | match value { |
2962 | ffi::GST_VIDEO_GAMMA_MODE_NONE => Self::None, |
2963 | ffi::GST_VIDEO_GAMMA_MODE_REMAP => Self::Remap, |
2964 | value: i32 => Self::__Unknown(value), |
2965 | } |
2966 | } |
2967 | } |
2968 | |
2969 | impl StaticType for VideoGammaMode { |
2970 | #[inline ] |
2971 | #[doc (alias = "gst_video_gamma_mode_get_type" )] |
2972 | fn static_type() -> glib::Type { |
2973 | unsafe { from_glib(val:ffi::gst_video_gamma_mode_get_type()) } |
2974 | } |
2975 | } |
2976 | |
2977 | impl glib::HasParamSpec for VideoGammaMode { |
2978 | type ParamSpec = glib::ParamSpecEnum; |
2979 | type SetValue = Self; |
2980 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
2981 | |
2982 | fn param_spec_builder() -> Self::BuilderFn { |
2983 | Self::ParamSpec::builder_with_default |
2984 | } |
2985 | } |
2986 | |
2987 | impl glib::value::ValueType for VideoGammaMode { |
2988 | type Type = Self; |
2989 | } |
2990 | |
2991 | unsafe impl<'a> glib::value::FromValue<'a> for VideoGammaMode { |
2992 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
2993 | |
2994 | #[inline ] |
2995 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
2996 | skip_assert_initialized!(); |
2997 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
2998 | } |
2999 | } |
3000 | |
3001 | impl ToValue for VideoGammaMode { |
3002 | #[inline ] |
3003 | fn to_value(&self) -> glib::Value { |
3004 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
3005 | unsafe { |
3006 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
3007 | } |
3008 | value |
3009 | } |
3010 | |
3011 | #[inline ] |
3012 | fn value_type(&self) -> glib::Type { |
3013 | Self::static_type() |
3014 | } |
3015 | } |
3016 | |
3017 | impl From<VideoGammaMode> for glib::Value { |
3018 | #[inline ] |
3019 | fn from(v: VideoGammaMode) -> Self { |
3020 | skip_assert_initialized!(); |
3021 | ToValue::to_value(&v) |
3022 | } |
3023 | } |
3024 | |
3025 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
3026 | #[non_exhaustive ] |
3027 | #[doc (alias = "GstVideoInterlaceMode" )] |
3028 | pub enum VideoInterlaceMode { |
3029 | #[doc (alias = "GST_VIDEO_INTERLACE_MODE_PROGRESSIVE" )] |
3030 | Progressive, |
3031 | #[doc (alias = "GST_VIDEO_INTERLACE_MODE_INTERLEAVED" )] |
3032 | Interleaved, |
3033 | #[doc (alias = "GST_VIDEO_INTERLACE_MODE_MIXED" )] |
3034 | Mixed, |
3035 | #[doc (alias = "GST_VIDEO_INTERLACE_MODE_FIELDS" )] |
3036 | Fields, |
3037 | #[cfg (feature = "v1_16" )] |
3038 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_16" )))] |
3039 | #[doc (alias = "GST_VIDEO_INTERLACE_MODE_ALTERNATE" )] |
3040 | Alternate, |
3041 | #[doc (hidden)] |
3042 | __Unknown(i32), |
3043 | } |
3044 | |
3045 | impl VideoInterlaceMode { |
3046 | #[doc (alias = "gst_video_interlace_mode_from_string" )] |
3047 | pub fn from_string(mode: &str) -> VideoInterlaceMode { |
3048 | assert_initialized_main_thread!(); |
3049 | unsafe { |
3050 | from_glib(val:ffi::gst_video_interlace_mode_from_string( |
3051 | mode:mode.to_glib_none().0, |
3052 | )) |
3053 | } |
3054 | } |
3055 | |
3056 | pub fn to_str<'a>(self) -> &'a GStr { |
3057 | unsafe { |
3058 | GStr::from_ptr( |
3059 | ffi::gst_video_interlace_mode_to_string(self.into_glib()) |
3060 | .as_ref() |
3061 | .expect(msg:"gst_video_interlace_mode_to_string returned NULL" ), |
3062 | ) |
3063 | } |
3064 | } |
3065 | } |
3066 | |
3067 | impl fmt::Display for VideoInterlaceMode { |
3068 | #[inline ] |
3069 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
3070 | f.write_str(&self.to_str()) |
3071 | } |
3072 | } |
3073 | |
3074 | #[doc (hidden)] |
3075 | impl IntoGlib for VideoInterlaceMode { |
3076 | type GlibType = ffi::GstVideoInterlaceMode; |
3077 | |
3078 | #[inline ] |
3079 | fn into_glib(self) -> ffi::GstVideoInterlaceMode { |
3080 | match self { |
3081 | Self::Progressive => ffi::GST_VIDEO_INTERLACE_MODE_PROGRESSIVE, |
3082 | Self::Interleaved => ffi::GST_VIDEO_INTERLACE_MODE_INTERLEAVED, |
3083 | Self::Mixed => ffi::GST_VIDEO_INTERLACE_MODE_MIXED, |
3084 | Self::Fields => ffi::GST_VIDEO_INTERLACE_MODE_FIELDS, |
3085 | #[cfg (feature = "v1_16" )] |
3086 | Self::Alternate => ffi::GST_VIDEO_INTERLACE_MODE_ALTERNATE, |
3087 | Self::__Unknown(value: i32) => value, |
3088 | } |
3089 | } |
3090 | } |
3091 | |
3092 | #[doc (hidden)] |
3093 | impl FromGlib<ffi::GstVideoInterlaceMode> for VideoInterlaceMode { |
3094 | #[inline ] |
3095 | unsafe fn from_glib(value: ffi::GstVideoInterlaceMode) -> Self { |
3096 | skip_assert_initialized!(); |
3097 | |
3098 | match value { |
3099 | ffi::GST_VIDEO_INTERLACE_MODE_PROGRESSIVE => Self::Progressive, |
3100 | ffi::GST_VIDEO_INTERLACE_MODE_INTERLEAVED => Self::Interleaved, |
3101 | ffi::GST_VIDEO_INTERLACE_MODE_MIXED => Self::Mixed, |
3102 | ffi::GST_VIDEO_INTERLACE_MODE_FIELDS => Self::Fields, |
3103 | #[cfg (feature = "v1_16" )] |
3104 | ffi::GST_VIDEO_INTERLACE_MODE_ALTERNATE => Self::Alternate, |
3105 | value: i32 => Self::__Unknown(value), |
3106 | } |
3107 | } |
3108 | } |
3109 | |
3110 | impl StaticType for VideoInterlaceMode { |
3111 | #[inline ] |
3112 | #[doc (alias = "gst_video_interlace_mode_get_type" )] |
3113 | fn static_type() -> glib::Type { |
3114 | unsafe { from_glib(val:ffi::gst_video_interlace_mode_get_type()) } |
3115 | } |
3116 | } |
3117 | |
3118 | impl glib::HasParamSpec for VideoInterlaceMode { |
3119 | type ParamSpec = glib::ParamSpecEnum; |
3120 | type SetValue = Self; |
3121 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
3122 | |
3123 | fn param_spec_builder() -> Self::BuilderFn { |
3124 | Self::ParamSpec::builder_with_default |
3125 | } |
3126 | } |
3127 | |
3128 | impl glib::value::ValueType for VideoInterlaceMode { |
3129 | type Type = Self; |
3130 | } |
3131 | |
3132 | unsafe impl<'a> glib::value::FromValue<'a> for VideoInterlaceMode { |
3133 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
3134 | |
3135 | #[inline ] |
3136 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
3137 | skip_assert_initialized!(); |
3138 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
3139 | } |
3140 | } |
3141 | |
3142 | impl ToValue for VideoInterlaceMode { |
3143 | #[inline ] |
3144 | fn to_value(&self) -> glib::Value { |
3145 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
3146 | unsafe { |
3147 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
3148 | } |
3149 | value |
3150 | } |
3151 | |
3152 | #[inline ] |
3153 | fn value_type(&self) -> glib::Type { |
3154 | Self::static_type() |
3155 | } |
3156 | } |
3157 | |
3158 | impl From<VideoInterlaceMode> for glib::Value { |
3159 | #[inline ] |
3160 | fn from(v: VideoInterlaceMode) -> Self { |
3161 | skip_assert_initialized!(); |
3162 | ToValue::to_value(&v) |
3163 | } |
3164 | } |
3165 | |
3166 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
3167 | #[non_exhaustive ] |
3168 | #[doc (alias = "GstVideoMatrixMode" )] |
3169 | pub enum VideoMatrixMode { |
3170 | #[doc (alias = "GST_VIDEO_MATRIX_MODE_FULL" )] |
3171 | Full, |
3172 | #[doc (alias = "GST_VIDEO_MATRIX_MODE_INPUT_ONLY" )] |
3173 | InputOnly, |
3174 | #[doc (alias = "GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY" )] |
3175 | OutputOnly, |
3176 | #[doc (alias = "GST_VIDEO_MATRIX_MODE_NONE" )] |
3177 | None, |
3178 | #[doc (hidden)] |
3179 | __Unknown(i32), |
3180 | } |
3181 | |
3182 | #[doc (hidden)] |
3183 | impl IntoGlib for VideoMatrixMode { |
3184 | type GlibType = ffi::GstVideoMatrixMode; |
3185 | |
3186 | #[inline ] |
3187 | fn into_glib(self) -> ffi::GstVideoMatrixMode { |
3188 | match self { |
3189 | Self::Full => ffi::GST_VIDEO_MATRIX_MODE_FULL, |
3190 | Self::InputOnly => ffi::GST_VIDEO_MATRIX_MODE_INPUT_ONLY, |
3191 | Self::OutputOnly => ffi::GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY, |
3192 | Self::None => ffi::GST_VIDEO_MATRIX_MODE_NONE, |
3193 | Self::__Unknown(value: i32) => value, |
3194 | } |
3195 | } |
3196 | } |
3197 | |
3198 | #[doc (hidden)] |
3199 | impl FromGlib<ffi::GstVideoMatrixMode> for VideoMatrixMode { |
3200 | #[inline ] |
3201 | unsafe fn from_glib(value: ffi::GstVideoMatrixMode) -> Self { |
3202 | skip_assert_initialized!(); |
3203 | |
3204 | match value { |
3205 | ffi::GST_VIDEO_MATRIX_MODE_FULL => Self::Full, |
3206 | ffi::GST_VIDEO_MATRIX_MODE_INPUT_ONLY => Self::InputOnly, |
3207 | ffi::GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY => Self::OutputOnly, |
3208 | ffi::GST_VIDEO_MATRIX_MODE_NONE => Self::None, |
3209 | value: i32 => Self::__Unknown(value), |
3210 | } |
3211 | } |
3212 | } |
3213 | |
3214 | impl StaticType for VideoMatrixMode { |
3215 | #[inline ] |
3216 | #[doc (alias = "gst_video_matrix_mode_get_type" )] |
3217 | fn static_type() -> glib::Type { |
3218 | unsafe { from_glib(val:ffi::gst_video_matrix_mode_get_type()) } |
3219 | } |
3220 | } |
3221 | |
3222 | impl glib::HasParamSpec for VideoMatrixMode { |
3223 | type ParamSpec = glib::ParamSpecEnum; |
3224 | type SetValue = Self; |
3225 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
3226 | |
3227 | fn param_spec_builder() -> Self::BuilderFn { |
3228 | Self::ParamSpec::builder_with_default |
3229 | } |
3230 | } |
3231 | |
3232 | impl glib::value::ValueType for VideoMatrixMode { |
3233 | type Type = Self; |
3234 | } |
3235 | |
3236 | unsafe impl<'a> glib::value::FromValue<'a> for VideoMatrixMode { |
3237 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
3238 | |
3239 | #[inline ] |
3240 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
3241 | skip_assert_initialized!(); |
3242 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
3243 | } |
3244 | } |
3245 | |
3246 | impl ToValue for VideoMatrixMode { |
3247 | #[inline ] |
3248 | fn to_value(&self) -> glib::Value { |
3249 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
3250 | unsafe { |
3251 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
3252 | } |
3253 | value |
3254 | } |
3255 | |
3256 | #[inline ] |
3257 | fn value_type(&self) -> glib::Type { |
3258 | Self::static_type() |
3259 | } |
3260 | } |
3261 | |
3262 | impl From<VideoMatrixMode> for glib::Value { |
3263 | #[inline ] |
3264 | fn from(v: VideoMatrixMode) -> Self { |
3265 | skip_assert_initialized!(); |
3266 | ToValue::to_value(&v) |
3267 | } |
3268 | } |
3269 | |
3270 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
3271 | #[non_exhaustive ] |
3272 | #[doc (alias = "GstVideoMultiviewFramePacking" )] |
3273 | pub enum VideoMultiviewFramePacking { |
3274 | #[doc (alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE" )] |
3275 | None, |
3276 | #[doc (alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO" )] |
3277 | Mono, |
3278 | #[doc (alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT" )] |
3279 | Left, |
3280 | #[doc (alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT" )] |
3281 | Right, |
3282 | #[doc (alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE" )] |
3283 | SideBySide, |
3284 | #[doc (alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX" )] |
3285 | SideBySideQuincunx, |
3286 | #[doc (alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED" )] |
3287 | ColumnInterleaved, |
3288 | #[doc (alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED" )] |
3289 | RowInterleaved, |
3290 | #[doc (alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM" )] |
3291 | TopBottom, |
3292 | #[doc (alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD" )] |
3293 | Checkerboard, |
3294 | #[doc (hidden)] |
3295 | __Unknown(i32), |
3296 | } |
3297 | |
3298 | #[doc (hidden)] |
3299 | impl IntoGlib for VideoMultiviewFramePacking { |
3300 | type GlibType = ffi::GstVideoMultiviewFramePacking; |
3301 | |
3302 | #[inline ] |
3303 | fn into_glib(self) -> ffi::GstVideoMultiviewFramePacking { |
3304 | match self { |
3305 | Self::None => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE, |
3306 | Self::Mono => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO, |
3307 | Self::Left => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT, |
3308 | Self::Right => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT, |
3309 | Self::SideBySide => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE, |
3310 | Self::SideBySideQuincunx => { |
3311 | ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX |
3312 | } |
3313 | Self::ColumnInterleaved => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED, |
3314 | Self::RowInterleaved => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED, |
3315 | Self::TopBottom => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM, |
3316 | Self::Checkerboard => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD, |
3317 | Self::__Unknown(value: i32) => value, |
3318 | } |
3319 | } |
3320 | } |
3321 | |
3322 | #[doc (hidden)] |
3323 | impl FromGlib<ffi::GstVideoMultiviewFramePacking> for VideoMultiviewFramePacking { |
3324 | #[inline ] |
3325 | unsafe fn from_glib(value: ffi::GstVideoMultiviewFramePacking) -> Self { |
3326 | skip_assert_initialized!(); |
3327 | |
3328 | match value { |
3329 | ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE => Self::None, |
3330 | ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO => Self::Mono, |
3331 | ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT => Self::Left, |
3332 | ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT => Self::Right, |
3333 | ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE => Self::SideBySide, |
3334 | ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX => { |
3335 | Self::SideBySideQuincunx |
3336 | } |
3337 | ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED => Self::ColumnInterleaved, |
3338 | ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED => Self::RowInterleaved, |
3339 | ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM => Self::TopBottom, |
3340 | ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD => Self::Checkerboard, |
3341 | value: i32 => Self::__Unknown(value), |
3342 | } |
3343 | } |
3344 | } |
3345 | |
3346 | impl StaticType for VideoMultiviewFramePacking { |
3347 | #[inline ] |
3348 | #[doc (alias = "gst_video_multiview_frame_packing_get_type" )] |
3349 | fn static_type() -> glib::Type { |
3350 | unsafe { from_glib(val:ffi::gst_video_multiview_frame_packing_get_type()) } |
3351 | } |
3352 | } |
3353 | |
3354 | impl glib::HasParamSpec for VideoMultiviewFramePacking { |
3355 | type ParamSpec = glib::ParamSpecEnum; |
3356 | type SetValue = Self; |
3357 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
3358 | |
3359 | fn param_spec_builder() -> Self::BuilderFn { |
3360 | Self::ParamSpec::builder_with_default |
3361 | } |
3362 | } |
3363 | |
3364 | impl glib::value::ValueType for VideoMultiviewFramePacking { |
3365 | type Type = Self; |
3366 | } |
3367 | |
3368 | unsafe impl<'a> glib::value::FromValue<'a> for VideoMultiviewFramePacking { |
3369 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
3370 | |
3371 | #[inline ] |
3372 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
3373 | skip_assert_initialized!(); |
3374 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
3375 | } |
3376 | } |
3377 | |
3378 | impl ToValue for VideoMultiviewFramePacking { |
3379 | #[inline ] |
3380 | fn to_value(&self) -> glib::Value { |
3381 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
3382 | unsafe { |
3383 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
3384 | } |
3385 | value |
3386 | } |
3387 | |
3388 | #[inline ] |
3389 | fn value_type(&self) -> glib::Type { |
3390 | Self::static_type() |
3391 | } |
3392 | } |
3393 | |
3394 | impl From<VideoMultiviewFramePacking> for glib::Value { |
3395 | #[inline ] |
3396 | fn from(v: VideoMultiviewFramePacking) -> Self { |
3397 | skip_assert_initialized!(); |
3398 | ToValue::to_value(&v) |
3399 | } |
3400 | } |
3401 | |
3402 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
3403 | #[non_exhaustive ] |
3404 | #[doc (alias = "GstVideoMultiviewMode" )] |
3405 | pub enum VideoMultiviewMode { |
3406 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_NONE" )] |
3407 | None, |
3408 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_MONO" )] |
3409 | Mono, |
3410 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_LEFT" )] |
3411 | Left, |
3412 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_RIGHT" )] |
3413 | Right, |
3414 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE" )] |
3415 | SideBySide, |
3416 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX" )] |
3417 | SideBySideQuincunx, |
3418 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED" )] |
3419 | ColumnInterleaved, |
3420 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED" )] |
3421 | RowInterleaved, |
3422 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM" )] |
3423 | TopBottom, |
3424 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD" )] |
3425 | Checkerboard, |
3426 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME" )] |
3427 | FrameByFrame, |
3428 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME" )] |
3429 | MultiviewFrameByFrame, |
3430 | #[doc (alias = "GST_VIDEO_MULTIVIEW_MODE_SEPARATED" )] |
3431 | Separated, |
3432 | #[doc (hidden)] |
3433 | __Unknown(i32), |
3434 | } |
3435 | |
3436 | impl VideoMultiviewMode { |
3437 | #[doc (alias = "gst_video_multiview_mode_from_caps_string" )] |
3438 | pub fn from_caps_string(caps_mview_mode: &str) -> VideoMultiviewMode { |
3439 | assert_initialized_main_thread!(); |
3440 | unsafe { |
3441 | from_glib(val:ffi::gst_video_multiview_mode_from_caps_string( |
3442 | caps_mview_mode:caps_mview_mode.to_glib_none().0, |
3443 | )) |
3444 | } |
3445 | } |
3446 | |
3447 | #[doc (alias = "gst_video_multiview_mode_to_caps_string" )] |
3448 | pub fn to_caps_string(self) -> Option<glib::GString> { |
3449 | assert_initialized_main_thread!(); |
3450 | unsafe { |
3451 | from_glib_none(ptr:ffi::gst_video_multiview_mode_to_caps_string( |
3452 | self.into_glib(), |
3453 | )) |
3454 | } |
3455 | } |
3456 | } |
3457 | |
3458 | #[doc (hidden)] |
3459 | impl IntoGlib for VideoMultiviewMode { |
3460 | type GlibType = ffi::GstVideoMultiviewMode; |
3461 | |
3462 | fn into_glib(self) -> ffi::GstVideoMultiviewMode { |
3463 | match self { |
3464 | Self::None => ffi::GST_VIDEO_MULTIVIEW_MODE_NONE, |
3465 | Self::Mono => ffi::GST_VIDEO_MULTIVIEW_MODE_MONO, |
3466 | Self::Left => ffi::GST_VIDEO_MULTIVIEW_MODE_LEFT, |
3467 | Self::Right => ffi::GST_VIDEO_MULTIVIEW_MODE_RIGHT, |
3468 | Self::SideBySide => ffi::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE, |
3469 | Self::SideBySideQuincunx => ffi::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX, |
3470 | Self::ColumnInterleaved => ffi::GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED, |
3471 | Self::RowInterleaved => ffi::GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED, |
3472 | Self::TopBottom => ffi::GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM, |
3473 | Self::Checkerboard => ffi::GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD, |
3474 | Self::FrameByFrame => ffi::GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME, |
3475 | Self::MultiviewFrameByFrame => ffi::GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME, |
3476 | Self::Separated => ffi::GST_VIDEO_MULTIVIEW_MODE_SEPARATED, |
3477 | Self::__Unknown(value: i32) => value, |
3478 | } |
3479 | } |
3480 | } |
3481 | |
3482 | #[doc (hidden)] |
3483 | impl FromGlib<ffi::GstVideoMultiviewMode> for VideoMultiviewMode { |
3484 | unsafe fn from_glib(value: ffi::GstVideoMultiviewMode) -> Self { |
3485 | skip_assert_initialized!(); |
3486 | |
3487 | match value { |
3488 | ffi::GST_VIDEO_MULTIVIEW_MODE_NONE => Self::None, |
3489 | ffi::GST_VIDEO_MULTIVIEW_MODE_MONO => Self::Mono, |
3490 | ffi::GST_VIDEO_MULTIVIEW_MODE_LEFT => Self::Left, |
3491 | ffi::GST_VIDEO_MULTIVIEW_MODE_RIGHT => Self::Right, |
3492 | ffi::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE => Self::SideBySide, |
3493 | ffi::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX => Self::SideBySideQuincunx, |
3494 | ffi::GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED => Self::ColumnInterleaved, |
3495 | ffi::GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED => Self::RowInterleaved, |
3496 | ffi::GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM => Self::TopBottom, |
3497 | ffi::GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD => Self::Checkerboard, |
3498 | ffi::GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME => Self::FrameByFrame, |
3499 | ffi::GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME => Self::MultiviewFrameByFrame, |
3500 | ffi::GST_VIDEO_MULTIVIEW_MODE_SEPARATED => Self::Separated, |
3501 | value: i32 => Self::__Unknown(value), |
3502 | } |
3503 | } |
3504 | } |
3505 | |
3506 | impl StaticType for VideoMultiviewMode { |
3507 | #[inline ] |
3508 | #[doc (alias = "gst_video_multiview_mode_get_type" )] |
3509 | fn static_type() -> glib::Type { |
3510 | unsafe { from_glib(val:ffi::gst_video_multiview_mode_get_type()) } |
3511 | } |
3512 | } |
3513 | |
3514 | impl glib::HasParamSpec for VideoMultiviewMode { |
3515 | type ParamSpec = glib::ParamSpecEnum; |
3516 | type SetValue = Self; |
3517 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
3518 | |
3519 | fn param_spec_builder() -> Self::BuilderFn { |
3520 | Self::ParamSpec::builder_with_default |
3521 | } |
3522 | } |
3523 | |
3524 | impl glib::value::ValueType for VideoMultiviewMode { |
3525 | type Type = Self; |
3526 | } |
3527 | |
3528 | unsafe impl<'a> glib::value::FromValue<'a> for VideoMultiviewMode { |
3529 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
3530 | |
3531 | #[inline ] |
3532 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
3533 | skip_assert_initialized!(); |
3534 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
3535 | } |
3536 | } |
3537 | |
3538 | impl ToValue for VideoMultiviewMode { |
3539 | #[inline ] |
3540 | fn to_value(&self) -> glib::Value { |
3541 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
3542 | unsafe { |
3543 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
3544 | } |
3545 | value |
3546 | } |
3547 | |
3548 | #[inline ] |
3549 | fn value_type(&self) -> glib::Type { |
3550 | Self::static_type() |
3551 | } |
3552 | } |
3553 | |
3554 | impl From<VideoMultiviewMode> for glib::Value { |
3555 | #[inline ] |
3556 | fn from(v: VideoMultiviewMode) -> Self { |
3557 | skip_assert_initialized!(); |
3558 | ToValue::to_value(&v) |
3559 | } |
3560 | } |
3561 | |
3562 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
3563 | #[non_exhaustive ] |
3564 | #[doc (alias = "GstVideoOrientationMethod" )] |
3565 | pub enum VideoOrientationMethod { |
3566 | #[doc (alias = "GST_VIDEO_ORIENTATION_IDENTITY" )] |
3567 | Identity, |
3568 | #[doc (alias = "GST_VIDEO_ORIENTATION_90R" )] |
3569 | _90r, |
3570 | #[doc (alias = "GST_VIDEO_ORIENTATION_180" )] |
3571 | _180, |
3572 | #[doc (alias = "GST_VIDEO_ORIENTATION_90L" )] |
3573 | _90l, |
3574 | #[doc (alias = "GST_VIDEO_ORIENTATION_HORIZ" )] |
3575 | Horiz, |
3576 | #[doc (alias = "GST_VIDEO_ORIENTATION_VERT" )] |
3577 | Vert, |
3578 | #[doc (alias = "GST_VIDEO_ORIENTATION_UL_LR" )] |
3579 | UlLr, |
3580 | #[doc (alias = "GST_VIDEO_ORIENTATION_UR_LL" )] |
3581 | UrLl, |
3582 | #[doc (alias = "GST_VIDEO_ORIENTATION_AUTO" )] |
3583 | Auto, |
3584 | #[doc (alias = "GST_VIDEO_ORIENTATION_CUSTOM" )] |
3585 | Custom, |
3586 | #[doc (hidden)] |
3587 | __Unknown(i32), |
3588 | } |
3589 | |
3590 | #[doc (hidden)] |
3591 | impl IntoGlib for VideoOrientationMethod { |
3592 | type GlibType = ffi::GstVideoOrientationMethod; |
3593 | |
3594 | #[inline ] |
3595 | fn into_glib(self) -> ffi::GstVideoOrientationMethod { |
3596 | match self { |
3597 | Self::Identity => ffi::GST_VIDEO_ORIENTATION_IDENTITY, |
3598 | Self::_90r => ffi::GST_VIDEO_ORIENTATION_90R, |
3599 | Self::_180 => ffi::GST_VIDEO_ORIENTATION_180, |
3600 | Self::_90l => ffi::GST_VIDEO_ORIENTATION_90L, |
3601 | Self::Horiz => ffi::GST_VIDEO_ORIENTATION_HORIZ, |
3602 | Self::Vert => ffi::GST_VIDEO_ORIENTATION_VERT, |
3603 | Self::UlLr => ffi::GST_VIDEO_ORIENTATION_UL_LR, |
3604 | Self::UrLl => ffi::GST_VIDEO_ORIENTATION_UR_LL, |
3605 | Self::Auto => ffi::GST_VIDEO_ORIENTATION_AUTO, |
3606 | Self::Custom => ffi::GST_VIDEO_ORIENTATION_CUSTOM, |
3607 | Self::__Unknown(value: i32) => value, |
3608 | } |
3609 | } |
3610 | } |
3611 | |
3612 | #[doc (hidden)] |
3613 | impl FromGlib<ffi::GstVideoOrientationMethod> for VideoOrientationMethod { |
3614 | #[inline ] |
3615 | unsafe fn from_glib(value: ffi::GstVideoOrientationMethod) -> Self { |
3616 | skip_assert_initialized!(); |
3617 | |
3618 | match value { |
3619 | ffi::GST_VIDEO_ORIENTATION_IDENTITY => Self::Identity, |
3620 | ffi::GST_VIDEO_ORIENTATION_90R => Self::_90r, |
3621 | ffi::GST_VIDEO_ORIENTATION_180 => Self::_180, |
3622 | ffi::GST_VIDEO_ORIENTATION_90L => Self::_90l, |
3623 | ffi::GST_VIDEO_ORIENTATION_HORIZ => Self::Horiz, |
3624 | ffi::GST_VIDEO_ORIENTATION_VERT => Self::Vert, |
3625 | ffi::GST_VIDEO_ORIENTATION_UL_LR => Self::UlLr, |
3626 | ffi::GST_VIDEO_ORIENTATION_UR_LL => Self::UrLl, |
3627 | ffi::GST_VIDEO_ORIENTATION_AUTO => Self::Auto, |
3628 | ffi::GST_VIDEO_ORIENTATION_CUSTOM => Self::Custom, |
3629 | value: i32 => Self::__Unknown(value), |
3630 | } |
3631 | } |
3632 | } |
3633 | |
3634 | impl StaticType for VideoOrientationMethod { |
3635 | #[inline ] |
3636 | #[doc (alias = "gst_video_orientation_method_get_type" )] |
3637 | fn static_type() -> glib::Type { |
3638 | unsafe { from_glib(val:ffi::gst_video_orientation_method_get_type()) } |
3639 | } |
3640 | } |
3641 | |
3642 | impl glib::HasParamSpec for VideoOrientationMethod { |
3643 | type ParamSpec = glib::ParamSpecEnum; |
3644 | type SetValue = Self; |
3645 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
3646 | |
3647 | fn param_spec_builder() -> Self::BuilderFn { |
3648 | Self::ParamSpec::builder_with_default |
3649 | } |
3650 | } |
3651 | |
3652 | impl glib::value::ValueType for VideoOrientationMethod { |
3653 | type Type = Self; |
3654 | } |
3655 | |
3656 | unsafe impl<'a> glib::value::FromValue<'a> for VideoOrientationMethod { |
3657 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
3658 | |
3659 | #[inline ] |
3660 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
3661 | skip_assert_initialized!(); |
3662 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
3663 | } |
3664 | } |
3665 | |
3666 | impl ToValue for VideoOrientationMethod { |
3667 | #[inline ] |
3668 | fn to_value(&self) -> glib::Value { |
3669 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
3670 | unsafe { |
3671 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
3672 | } |
3673 | value |
3674 | } |
3675 | |
3676 | #[inline ] |
3677 | fn value_type(&self) -> glib::Type { |
3678 | Self::static_type() |
3679 | } |
3680 | } |
3681 | |
3682 | impl From<VideoOrientationMethod> for glib::Value { |
3683 | #[inline ] |
3684 | fn from(v: VideoOrientationMethod) -> Self { |
3685 | skip_assert_initialized!(); |
3686 | ToValue::to_value(&v) |
3687 | } |
3688 | } |
3689 | |
3690 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
3691 | #[non_exhaustive ] |
3692 | #[doc (alias = "GstVideoPrimariesMode" )] |
3693 | pub enum VideoPrimariesMode { |
3694 | #[doc (alias = "GST_VIDEO_PRIMARIES_MODE_NONE" )] |
3695 | None, |
3696 | #[doc (alias = "GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY" )] |
3697 | MergeOnly, |
3698 | #[doc (alias = "GST_VIDEO_PRIMARIES_MODE_FAST" )] |
3699 | Fast, |
3700 | #[doc (hidden)] |
3701 | __Unknown(i32), |
3702 | } |
3703 | |
3704 | #[doc (hidden)] |
3705 | impl IntoGlib for VideoPrimariesMode { |
3706 | type GlibType = ffi::GstVideoPrimariesMode; |
3707 | |
3708 | #[inline ] |
3709 | fn into_glib(self) -> ffi::GstVideoPrimariesMode { |
3710 | match self { |
3711 | Self::None => ffi::GST_VIDEO_PRIMARIES_MODE_NONE, |
3712 | Self::MergeOnly => ffi::GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY, |
3713 | Self::Fast => ffi::GST_VIDEO_PRIMARIES_MODE_FAST, |
3714 | Self::__Unknown(value: i32) => value, |
3715 | } |
3716 | } |
3717 | } |
3718 | |
3719 | #[doc (hidden)] |
3720 | impl FromGlib<ffi::GstVideoPrimariesMode> for VideoPrimariesMode { |
3721 | #[inline ] |
3722 | unsafe fn from_glib(value: ffi::GstVideoPrimariesMode) -> Self { |
3723 | skip_assert_initialized!(); |
3724 | |
3725 | match value { |
3726 | ffi::GST_VIDEO_PRIMARIES_MODE_NONE => Self::None, |
3727 | ffi::GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY => Self::MergeOnly, |
3728 | ffi::GST_VIDEO_PRIMARIES_MODE_FAST => Self::Fast, |
3729 | value: i32 => Self::__Unknown(value), |
3730 | } |
3731 | } |
3732 | } |
3733 | |
3734 | impl StaticType for VideoPrimariesMode { |
3735 | #[inline ] |
3736 | #[doc (alias = "gst_video_primaries_mode_get_type" )] |
3737 | fn static_type() -> glib::Type { |
3738 | unsafe { from_glib(val:ffi::gst_video_primaries_mode_get_type()) } |
3739 | } |
3740 | } |
3741 | |
3742 | impl glib::HasParamSpec for VideoPrimariesMode { |
3743 | type ParamSpec = glib::ParamSpecEnum; |
3744 | type SetValue = Self; |
3745 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
3746 | |
3747 | fn param_spec_builder() -> Self::BuilderFn { |
3748 | Self::ParamSpec::builder_with_default |
3749 | } |
3750 | } |
3751 | |
3752 | impl glib::value::ValueType for VideoPrimariesMode { |
3753 | type Type = Self; |
3754 | } |
3755 | |
3756 | unsafe impl<'a> glib::value::FromValue<'a> for VideoPrimariesMode { |
3757 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
3758 | |
3759 | #[inline ] |
3760 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
3761 | skip_assert_initialized!(); |
3762 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
3763 | } |
3764 | } |
3765 | |
3766 | impl ToValue for VideoPrimariesMode { |
3767 | #[inline ] |
3768 | fn to_value(&self) -> glib::Value { |
3769 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
3770 | unsafe { |
3771 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
3772 | } |
3773 | value |
3774 | } |
3775 | |
3776 | #[inline ] |
3777 | fn value_type(&self) -> glib::Type { |
3778 | Self::static_type() |
3779 | } |
3780 | } |
3781 | |
3782 | impl From<VideoPrimariesMode> for glib::Value { |
3783 | #[inline ] |
3784 | fn from(v: VideoPrimariesMode) -> Self { |
3785 | skip_assert_initialized!(); |
3786 | ToValue::to_value(&v) |
3787 | } |
3788 | } |
3789 | |
3790 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
3791 | #[non_exhaustive ] |
3792 | #[doc (alias = "GstVideoResamplerMethod" )] |
3793 | pub enum VideoResamplerMethod { |
3794 | #[doc (alias = "GST_VIDEO_RESAMPLER_METHOD_NEAREST" )] |
3795 | Nearest, |
3796 | #[doc (alias = "GST_VIDEO_RESAMPLER_METHOD_LINEAR" )] |
3797 | Linear, |
3798 | #[doc (alias = "GST_VIDEO_RESAMPLER_METHOD_CUBIC" )] |
3799 | Cubic, |
3800 | #[doc (alias = "GST_VIDEO_RESAMPLER_METHOD_SINC" )] |
3801 | Sinc, |
3802 | #[doc (alias = "GST_VIDEO_RESAMPLER_METHOD_LANCZOS" )] |
3803 | Lanczos, |
3804 | #[doc (hidden)] |
3805 | __Unknown(i32), |
3806 | } |
3807 | |
3808 | #[doc (hidden)] |
3809 | impl IntoGlib for VideoResamplerMethod { |
3810 | type GlibType = ffi::GstVideoResamplerMethod; |
3811 | |
3812 | #[inline ] |
3813 | fn into_glib(self) -> ffi::GstVideoResamplerMethod { |
3814 | match self { |
3815 | Self::Nearest => ffi::GST_VIDEO_RESAMPLER_METHOD_NEAREST, |
3816 | Self::Linear => ffi::GST_VIDEO_RESAMPLER_METHOD_LINEAR, |
3817 | Self::Cubic => ffi::GST_VIDEO_RESAMPLER_METHOD_CUBIC, |
3818 | Self::Sinc => ffi::GST_VIDEO_RESAMPLER_METHOD_SINC, |
3819 | Self::Lanczos => ffi::GST_VIDEO_RESAMPLER_METHOD_LANCZOS, |
3820 | Self::__Unknown(value: i32) => value, |
3821 | } |
3822 | } |
3823 | } |
3824 | |
3825 | #[doc (hidden)] |
3826 | impl FromGlib<ffi::GstVideoResamplerMethod> for VideoResamplerMethod { |
3827 | #[inline ] |
3828 | unsafe fn from_glib(value: ffi::GstVideoResamplerMethod) -> Self { |
3829 | skip_assert_initialized!(); |
3830 | |
3831 | match value { |
3832 | ffi::GST_VIDEO_RESAMPLER_METHOD_NEAREST => Self::Nearest, |
3833 | ffi::GST_VIDEO_RESAMPLER_METHOD_LINEAR => Self::Linear, |
3834 | ffi::GST_VIDEO_RESAMPLER_METHOD_CUBIC => Self::Cubic, |
3835 | ffi::GST_VIDEO_RESAMPLER_METHOD_SINC => Self::Sinc, |
3836 | ffi::GST_VIDEO_RESAMPLER_METHOD_LANCZOS => Self::Lanczos, |
3837 | value: i32 => Self::__Unknown(value), |
3838 | } |
3839 | } |
3840 | } |
3841 | |
3842 | impl StaticType for VideoResamplerMethod { |
3843 | #[inline ] |
3844 | #[doc (alias = "gst_video_resampler_method_get_type" )] |
3845 | fn static_type() -> glib::Type { |
3846 | unsafe { from_glib(val:ffi::gst_video_resampler_method_get_type()) } |
3847 | } |
3848 | } |
3849 | |
3850 | impl glib::HasParamSpec for VideoResamplerMethod { |
3851 | type ParamSpec = glib::ParamSpecEnum; |
3852 | type SetValue = Self; |
3853 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
3854 | |
3855 | fn param_spec_builder() -> Self::BuilderFn { |
3856 | Self::ParamSpec::builder_with_default |
3857 | } |
3858 | } |
3859 | |
3860 | impl glib::value::ValueType for VideoResamplerMethod { |
3861 | type Type = Self; |
3862 | } |
3863 | |
3864 | unsafe impl<'a> glib::value::FromValue<'a> for VideoResamplerMethod { |
3865 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
3866 | |
3867 | #[inline ] |
3868 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
3869 | skip_assert_initialized!(); |
3870 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
3871 | } |
3872 | } |
3873 | |
3874 | impl ToValue for VideoResamplerMethod { |
3875 | #[inline ] |
3876 | fn to_value(&self) -> glib::Value { |
3877 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
3878 | unsafe { |
3879 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
3880 | } |
3881 | value |
3882 | } |
3883 | |
3884 | #[inline ] |
3885 | fn value_type(&self) -> glib::Type { |
3886 | Self::static_type() |
3887 | } |
3888 | } |
3889 | |
3890 | impl From<VideoResamplerMethod> for glib::Value { |
3891 | #[inline ] |
3892 | fn from(v: VideoResamplerMethod) -> Self { |
3893 | skip_assert_initialized!(); |
3894 | ToValue::to_value(&v) |
3895 | } |
3896 | } |
3897 | |
3898 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
3899 | #[non_exhaustive ] |
3900 | #[doc (alias = "GstVideoTileMode" )] |
3901 | pub enum VideoTileMode { |
3902 | #[doc (alias = "GST_VIDEO_TILE_MODE_UNKNOWN" )] |
3903 | Unknown, |
3904 | #[doc (alias = "GST_VIDEO_TILE_MODE_ZFLIPZ_2X2" )] |
3905 | Zflipz2x2, |
3906 | #[cfg (feature = "v1_18" )] |
3907 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
3908 | #[doc (alias = "GST_VIDEO_TILE_MODE_LINEAR" )] |
3909 | Linear, |
3910 | #[doc (hidden)] |
3911 | __Unknown(i32), |
3912 | } |
3913 | |
3914 | #[doc (hidden)] |
3915 | impl IntoGlib for VideoTileMode { |
3916 | type GlibType = ffi::GstVideoTileMode; |
3917 | |
3918 | #[inline ] |
3919 | fn into_glib(self) -> ffi::GstVideoTileMode { |
3920 | match self { |
3921 | Self::Unknown => ffi::GST_VIDEO_TILE_MODE_UNKNOWN, |
3922 | Self::Zflipz2x2 => ffi::GST_VIDEO_TILE_MODE_ZFLIPZ_2X2, |
3923 | #[cfg (feature = "v1_18" )] |
3924 | Self::Linear => ffi::GST_VIDEO_TILE_MODE_LINEAR, |
3925 | Self::__Unknown(value: i32) => value, |
3926 | } |
3927 | } |
3928 | } |
3929 | |
3930 | #[doc (hidden)] |
3931 | impl FromGlib<ffi::GstVideoTileMode> for VideoTileMode { |
3932 | #[inline ] |
3933 | unsafe fn from_glib(value: ffi::GstVideoTileMode) -> Self { |
3934 | skip_assert_initialized!(); |
3935 | |
3936 | match value { |
3937 | ffi::GST_VIDEO_TILE_MODE_UNKNOWN => Self::Unknown, |
3938 | ffi::GST_VIDEO_TILE_MODE_ZFLIPZ_2X2 => Self::Zflipz2x2, |
3939 | #[cfg (feature = "v1_18" )] |
3940 | ffi::GST_VIDEO_TILE_MODE_LINEAR => Self::Linear, |
3941 | value: i32 => Self::__Unknown(value), |
3942 | } |
3943 | } |
3944 | } |
3945 | |
3946 | impl StaticType for VideoTileMode { |
3947 | #[inline ] |
3948 | #[doc (alias = "gst_video_tile_mode_get_type" )] |
3949 | fn static_type() -> glib::Type { |
3950 | unsafe { from_glib(val:ffi::gst_video_tile_mode_get_type()) } |
3951 | } |
3952 | } |
3953 | |
3954 | impl glib::HasParamSpec for VideoTileMode { |
3955 | type ParamSpec = glib::ParamSpecEnum; |
3956 | type SetValue = Self; |
3957 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
3958 | |
3959 | fn param_spec_builder() -> Self::BuilderFn { |
3960 | Self::ParamSpec::builder_with_default |
3961 | } |
3962 | } |
3963 | |
3964 | impl glib::value::ValueType for VideoTileMode { |
3965 | type Type = Self; |
3966 | } |
3967 | |
3968 | unsafe impl<'a> glib::value::FromValue<'a> for VideoTileMode { |
3969 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
3970 | |
3971 | #[inline ] |
3972 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
3973 | skip_assert_initialized!(); |
3974 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
3975 | } |
3976 | } |
3977 | |
3978 | impl ToValue for VideoTileMode { |
3979 | #[inline ] |
3980 | fn to_value(&self) -> glib::Value { |
3981 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
3982 | unsafe { |
3983 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
3984 | } |
3985 | value |
3986 | } |
3987 | |
3988 | #[inline ] |
3989 | fn value_type(&self) -> glib::Type { |
3990 | Self::static_type() |
3991 | } |
3992 | } |
3993 | |
3994 | impl From<VideoTileMode> for glib::Value { |
3995 | #[inline ] |
3996 | fn from(v: VideoTileMode) -> Self { |
3997 | skip_assert_initialized!(); |
3998 | ToValue::to_value(&v) |
3999 | } |
4000 | } |
4001 | |
4002 | #[derive (Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] |
4003 | #[non_exhaustive ] |
4004 | #[doc (alias = "GstVideoTransferFunction" )] |
4005 | pub enum VideoTransferFunction { |
4006 | #[doc (alias = "GST_VIDEO_TRANSFER_UNKNOWN" )] |
4007 | Unknown, |
4008 | #[doc (alias = "GST_VIDEO_TRANSFER_GAMMA10" )] |
4009 | Gamma10, |
4010 | #[doc (alias = "GST_VIDEO_TRANSFER_GAMMA18" )] |
4011 | Gamma18, |
4012 | #[doc (alias = "GST_VIDEO_TRANSFER_GAMMA20" )] |
4013 | Gamma20, |
4014 | #[doc (alias = "GST_VIDEO_TRANSFER_GAMMA22" )] |
4015 | Gamma22, |
4016 | #[doc (alias = "GST_VIDEO_TRANSFER_BT709" )] |
4017 | Bt709, |
4018 | #[doc (alias = "GST_VIDEO_TRANSFER_SMPTE240M" )] |
4019 | Smpte240m, |
4020 | #[doc (alias = "GST_VIDEO_TRANSFER_SRGB" )] |
4021 | Srgb, |
4022 | #[doc (alias = "GST_VIDEO_TRANSFER_GAMMA28" )] |
4023 | Gamma28, |
4024 | #[doc (alias = "GST_VIDEO_TRANSFER_LOG100" )] |
4025 | Log100, |
4026 | #[doc (alias = "GST_VIDEO_TRANSFER_LOG316" )] |
4027 | Log316, |
4028 | #[doc (alias = "GST_VIDEO_TRANSFER_BT2020_12" )] |
4029 | Bt202012, |
4030 | #[doc (alias = "GST_VIDEO_TRANSFER_ADOBERGB" )] |
4031 | Adobergb, |
4032 | #[cfg (feature = "v1_18" )] |
4033 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
4034 | #[doc (alias = "GST_VIDEO_TRANSFER_BT2020_10" )] |
4035 | Bt202010, |
4036 | #[cfg (feature = "v1_18" )] |
4037 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
4038 | #[doc (alias = "GST_VIDEO_TRANSFER_SMPTE2084" )] |
4039 | Smpte2084, |
4040 | #[cfg (feature = "v1_18" )] |
4041 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
4042 | #[doc (alias = "GST_VIDEO_TRANSFER_ARIB_STD_B67" )] |
4043 | AribStdB67, |
4044 | #[cfg (feature = "v1_18" )] |
4045 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
4046 | #[doc (alias = "GST_VIDEO_TRANSFER_BT601" )] |
4047 | Bt601, |
4048 | #[doc (hidden)] |
4049 | __Unknown(i32), |
4050 | } |
4051 | |
4052 | impl VideoTransferFunction { |
4053 | #[cfg (feature = "v1_20" )] |
4054 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
4055 | #[doc (alias = "gst_video_transfer_function_decode" )] |
4056 | pub fn decode(self, val: f64) -> f64 { |
4057 | assert_initialized_main_thread!(); |
4058 | unsafe { ffi::gst_video_transfer_function_decode(self.into_glib(), val) } |
4059 | } |
4060 | |
4061 | #[cfg (feature = "v1_20" )] |
4062 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_20" )))] |
4063 | #[doc (alias = "gst_video_transfer_function_encode" )] |
4064 | pub fn encode(self, val: f64) -> f64 { |
4065 | assert_initialized_main_thread!(); |
4066 | unsafe { ffi::gst_video_transfer_function_encode(self.into_glib(), val) } |
4067 | } |
4068 | |
4069 | #[cfg (feature = "v1_18" )] |
4070 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
4071 | #[doc (alias = "gst_video_transfer_function_from_iso" )] |
4072 | pub fn from_iso(value: u32) -> VideoTransferFunction { |
4073 | assert_initialized_main_thread!(); |
4074 | unsafe { from_glib(ffi::gst_video_transfer_function_from_iso(value)) } |
4075 | } |
4076 | |
4077 | #[cfg (feature = "v1_18" )] |
4078 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
4079 | #[doc (alias = "gst_video_transfer_function_is_equivalent" )] |
4080 | pub fn is_equivalent(self, from_bpp: u32, to_func: VideoTransferFunction, to_bpp: u32) -> bool { |
4081 | assert_initialized_main_thread!(); |
4082 | unsafe { |
4083 | from_glib(ffi::gst_video_transfer_function_is_equivalent( |
4084 | self.into_glib(), |
4085 | from_bpp, |
4086 | to_func.into_glib(), |
4087 | to_bpp, |
4088 | )) |
4089 | } |
4090 | } |
4091 | |
4092 | #[cfg (feature = "v1_18" )] |
4093 | #[cfg_attr (docsrs, doc(cfg(feature = "v1_18" )))] |
4094 | #[doc (alias = "gst_video_transfer_function_to_iso" )] |
4095 | pub fn to_iso(self) -> u32 { |
4096 | assert_initialized_main_thread!(); |
4097 | unsafe { ffi::gst_video_transfer_function_to_iso(self.into_glib()) } |
4098 | } |
4099 | } |
4100 | |
4101 | #[doc (hidden)] |
4102 | impl IntoGlib for VideoTransferFunction { |
4103 | type GlibType = ffi::GstVideoTransferFunction; |
4104 | |
4105 | fn into_glib(self) -> ffi::GstVideoTransferFunction { |
4106 | match self { |
4107 | Self::Unknown => ffi::GST_VIDEO_TRANSFER_UNKNOWN, |
4108 | Self::Gamma10 => ffi::GST_VIDEO_TRANSFER_GAMMA10, |
4109 | Self::Gamma18 => ffi::GST_VIDEO_TRANSFER_GAMMA18, |
4110 | Self::Gamma20 => ffi::GST_VIDEO_TRANSFER_GAMMA20, |
4111 | Self::Gamma22 => ffi::GST_VIDEO_TRANSFER_GAMMA22, |
4112 | Self::Bt709 => ffi::GST_VIDEO_TRANSFER_BT709, |
4113 | Self::Smpte240m => ffi::GST_VIDEO_TRANSFER_SMPTE240M, |
4114 | Self::Srgb => ffi::GST_VIDEO_TRANSFER_SRGB, |
4115 | Self::Gamma28 => ffi::GST_VIDEO_TRANSFER_GAMMA28, |
4116 | Self::Log100 => ffi::GST_VIDEO_TRANSFER_LOG100, |
4117 | Self::Log316 => ffi::GST_VIDEO_TRANSFER_LOG316, |
4118 | Self::Bt202012 => ffi::GST_VIDEO_TRANSFER_BT2020_12, |
4119 | Self::Adobergb => ffi::GST_VIDEO_TRANSFER_ADOBERGB, |
4120 | #[cfg (feature = "v1_18" )] |
4121 | Self::Bt202010 => ffi::GST_VIDEO_TRANSFER_BT2020_10, |
4122 | #[cfg (feature = "v1_18" )] |
4123 | Self::Smpte2084 => ffi::GST_VIDEO_TRANSFER_SMPTE2084, |
4124 | #[cfg (feature = "v1_18" )] |
4125 | Self::AribStdB67 => ffi::GST_VIDEO_TRANSFER_ARIB_STD_B67, |
4126 | #[cfg (feature = "v1_18" )] |
4127 | Self::Bt601 => ffi::GST_VIDEO_TRANSFER_BT601, |
4128 | Self::__Unknown(value) => value, |
4129 | } |
4130 | } |
4131 | } |
4132 | |
4133 | #[doc (hidden)] |
4134 | impl FromGlib<ffi::GstVideoTransferFunction> for VideoTransferFunction { |
4135 | unsafe fn from_glib(value: ffi::GstVideoTransferFunction) -> Self { |
4136 | skip_assert_initialized!(); |
4137 | |
4138 | match value { |
4139 | ffi::GST_VIDEO_TRANSFER_UNKNOWN => Self::Unknown, |
4140 | ffi::GST_VIDEO_TRANSFER_GAMMA10 => Self::Gamma10, |
4141 | ffi::GST_VIDEO_TRANSFER_GAMMA18 => Self::Gamma18, |
4142 | ffi::GST_VIDEO_TRANSFER_GAMMA20 => Self::Gamma20, |
4143 | ffi::GST_VIDEO_TRANSFER_GAMMA22 => Self::Gamma22, |
4144 | ffi::GST_VIDEO_TRANSFER_BT709 => Self::Bt709, |
4145 | ffi::GST_VIDEO_TRANSFER_SMPTE240M => Self::Smpte240m, |
4146 | ffi::GST_VIDEO_TRANSFER_SRGB => Self::Srgb, |
4147 | ffi::GST_VIDEO_TRANSFER_GAMMA28 => Self::Gamma28, |
4148 | ffi::GST_VIDEO_TRANSFER_LOG100 => Self::Log100, |
4149 | ffi::GST_VIDEO_TRANSFER_LOG316 => Self::Log316, |
4150 | ffi::GST_VIDEO_TRANSFER_BT2020_12 => Self::Bt202012, |
4151 | ffi::GST_VIDEO_TRANSFER_ADOBERGB => Self::Adobergb, |
4152 | #[cfg (feature = "v1_18" )] |
4153 | ffi::GST_VIDEO_TRANSFER_BT2020_10 => Self::Bt202010, |
4154 | #[cfg (feature = "v1_18" )] |
4155 | ffi::GST_VIDEO_TRANSFER_SMPTE2084 => Self::Smpte2084, |
4156 | #[cfg (feature = "v1_18" )] |
4157 | ffi::GST_VIDEO_TRANSFER_ARIB_STD_B67 => Self::AribStdB67, |
4158 | #[cfg (feature = "v1_18" )] |
4159 | ffi::GST_VIDEO_TRANSFER_BT601 => Self::Bt601, |
4160 | value => Self::__Unknown(value), |
4161 | } |
4162 | } |
4163 | } |
4164 | |
4165 | impl StaticType for VideoTransferFunction { |
4166 | #[inline ] |
4167 | #[doc (alias = "gst_video_transfer_function_get_type" )] |
4168 | fn static_type() -> glib::Type { |
4169 | unsafe { from_glib(val:ffi::gst_video_transfer_function_get_type()) } |
4170 | } |
4171 | } |
4172 | |
4173 | impl glib::HasParamSpec for VideoTransferFunction { |
4174 | type ParamSpec = glib::ParamSpecEnum; |
4175 | type SetValue = Self; |
4176 | type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>; |
4177 | |
4178 | fn param_spec_builder() -> Self::BuilderFn { |
4179 | Self::ParamSpec::builder_with_default |
4180 | } |
4181 | } |
4182 | |
4183 | impl glib::value::ValueType for VideoTransferFunction { |
4184 | type Type = Self; |
4185 | } |
4186 | |
4187 | unsafe impl<'a> glib::value::FromValue<'a> for VideoTransferFunction { |
4188 | type Checker = glib::value::GenericValueTypeChecker<Self>; |
4189 | |
4190 | #[inline ] |
4191 | unsafe fn from_value(value: &'a glib::Value) -> Self { |
4192 | skip_assert_initialized!(); |
4193 | from_glib(val:glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) |
4194 | } |
4195 | } |
4196 | |
4197 | impl ToValue for VideoTransferFunction { |
4198 | #[inline ] |
4199 | fn to_value(&self) -> glib::Value { |
4200 | let mut value: Value = glib::Value::for_value_type::<Self>(); |
4201 | unsafe { |
4202 | glib::gobject_ffi::g_value_set_enum(value:value.to_glib_none_mut().0, self.into_glib()); |
4203 | } |
4204 | value |
4205 | } |
4206 | |
4207 | #[inline ] |
4208 | fn value_type(&self) -> glib::Type { |
4209 | Self::static_type() |
4210 | } |
4211 | } |
4212 | |
4213 | impl From<VideoTransferFunction> for glib::Value { |
4214 | #[inline ] |
4215 | fn from(v: VideoTransferFunction) -> Self { |
4216 | skip_assert_initialized!(); |
4217 | ToValue::to_value(&v) |
4218 | } |
4219 | } |
4220 | |