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
56use crate::ffi;
7use glib::{bitflags::bitflags, prelude::*, translate::*};
89bitflags! {
10#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
11 #[doc(alias = "GstValidateActionTypeFlags")]
12pub struct ActionTypeFlags: u32 {
13/// No special flag
14#[doc(alias = "GST_VALIDATE_ACTION_TYPE_NONE")]
15const NONE = ffi::GST_VALIDATE_ACTION_TYPE_NONE as _;
16/// The action is a config
17#[doc(alias = "GST_VALIDATE_ACTION_TYPE_CONFIG")]
18const CONFIG = ffi::GST_VALIDATE_ACTION_TYPE_CONFIG as _;
19/// The action can be executed ASYNC
20#[doc(alias = "GST_VALIDATE_ACTION_TYPE_ASYNC")]
21const ASYNC = ffi::GST_VALIDATE_ACTION_TYPE_ASYNC as _;
22/// The action can be executed asynchronously but without blocking further
23 /// actions execution.
24#[doc(alias = "GST_VALIDATE_ACTION_TYPE_NON_BLOCKING")]
25const NON_BLOCKING = ffi::GST_VALIDATE_ACTION_TYPE_NON_BLOCKING as _;
26#[deprecated = "Since 1.20"]
27 #[doc(alias = "GST_VALIDATE_ACTION_TYPE_INTERLACED")]
28const INTERLACED = ffi::GST_VALIDATE_ACTION_TYPE_INTERLACED as _;
29/// The action will be executed on 'element-added'
30 /// for a particular element type if no playback-time
31 /// is specified
32#[doc(alias = "GST_VALIDATE_ACTION_TYPE_CAN_EXECUTE_ON_ADDITION")]
33const CAN_EXECUTE_ON_ADDITION = ffi::GST_VALIDATE_ACTION_TYPE_CAN_EXECUTE_ON_ADDITION as _;
34/// The pipeline will need to be synchronized with the clock
35 /// for that action type to be used.
36#[doc(alias = "GST_VALIDATE_ACTION_TYPE_NEEDS_CLOCK")]
37const NEEDS_CLOCK = ffi::GST_VALIDATE_ACTION_TYPE_NEEDS_CLOCK as _;
38/// Do not consider the non execution of the action
39 /// as a fatal error.
40#[doc(alias = "GST_VALIDATE_ACTION_TYPE_NO_EXECUTION_NOT_FATAL")]
41const NO_EXECUTION_NOT_FATAL = ffi::GST_VALIDATE_ACTION_TYPE_NO_EXECUTION_NOT_FATAL as _;
42/// The action can use the 'optional' keyword. Such action
43 /// instances will have the [`NO_EXECUTION_NOT_FATAL`][Self::NO_EXECUTION_NOT_FATAL]
44 /// flag set and won't be considered as fatal if they fail.
45#[doc(alias = "GST_VALIDATE_ACTION_TYPE_CAN_BE_OPTIONAL")]
46const CAN_BE_OPTIONAL = ffi::GST_VALIDATE_ACTION_TYPE_CAN_BE_OPTIONAL as _;
47#[doc(alias = "GST_VALIDATE_ACTION_TYPE_DOESNT_NEED_PIPELINE")]
48const DOESNT_NEED_PIPELINE = ffi::GST_VALIDATE_ACTION_TYPE_DOESNT_NEED_PIPELINE as _;
49/// The action can be used in config files even if it is not strictly a config
50 /// action (ie. it needs a scenario to run).
51#[doc(alias = "GST_VALIDATE_ACTION_TYPE_HANDLED_IN_CONFIG")]
52const HANDLED_IN_CONFIG = ffi::GST_VALIDATE_ACTION_TYPE_HANDLED_IN_CONFIG as _;
53/// The action is checking some state from objects in the pipeline. It means that it can
54 /// be used as 'check' in different action which have a `check` "sub action", such as the 'wait' action type.
55 /// This implies that the action can be executed from any thread and not only from the scenario thread as other
56 /// types.
57#[doc(alias = "GST_VALIDATE_ACTION_TYPE_CHECK")]
58const CHECK = ffi::GST_VALIDATE_ACTION_TYPE_CHECK as _;
59 }
60}
6162#[doc(hidden)]
63impl IntoGlib for ActionTypeFlags {
64type GlibType = ffi::GstValidateActionTypeFlags;
6566#[inline]
67fn into_glib(self) -> ffi::GstValidateActionTypeFlags {
68self.bits()
69 }
70}
7172#[doc(hidden)]
73impl FromGlib<ffi::GstValidateActionTypeFlags> for ActionTypeFlags {
74#[inline]
75unsafe fn from_glib(value: ffi::GstValidateActionTypeFlags) -> Self {
76skip_assert_initialized!();
77Self::from_bits_truncate(value)
78 }
79}
8081impl StaticType for ActionTypeFlags {
82#[inline]
83 #[doc(alias = "gst_validate_action_type_flags_get_type")]
84fn static_type() -> glib::Type {
85unsafe { from_glib(ffi::gst_validate_action_type_flags_get_type()) }
86 }
87}
8889impl glib::HasParamSpec for ActionTypeFlags {
90type ParamSpec = glib::ParamSpecFlags;
91type SetValue = Self;
92type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
9394fn param_spec_builder() -> Self::BuilderFn {
95Self::ParamSpec::builder
96 }
97}
9899impl glib::value::ValueType for ActionTypeFlags {
100type Type = Self;
101}
102103unsafe impl<'a> glib::value::FromValue<'a> for ActionTypeFlags {
104type Checker = glib::value::GenericValueTypeChecker<Self>;
105106#[inline]
107unsafe fn from_value(value: &'a glib::Value) -> Self {
108skip_assert_initialized!();
109 from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
110 }
111}
112113impl ToValue for ActionTypeFlags {
114#[inline]
115fn to_value(&self) -> glib::Value {
116let mut value = glib::Value::for_value_type::<Self>();
117unsafe {
118 glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
119 }
120 value
121 }
122123#[inline]
124fn value_type(&self) -> glib::Type {
125Self::static_type()
126 }
127}
128129impl From<ActionTypeFlags> for glib::Value {
130#[inline]
131fn from(v: ActionTypeFlags) -> Self {
132skip_assert_initialized!();
133 ToValue::to_value(&v)
134 }
135}
136137bitflags! {
138/// GST_VALIDATE_ISSUE_FLAGS_NONE: No special flags for the issue type
139 /// GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS: Always show all occurrences of the issue in full details
140 /// GST_VALIDATE_ISSUE_FLAGS_NO_BACKTRACE: Do not generate backtrace for the issue type
141#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
142 #[doc(alias = "GstValidateIssueFlags")]
143pub struct IssueFlags: u32 {
144#[doc(alias = "GST_VALIDATE_ISSUE_FLAGS_NONE")]
145const NONE = ffi::GST_VALIDATE_ISSUE_FLAGS_NONE as _;
146#[doc(alias = "GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS")]
147const FULL_DETAILS = ffi::GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS as _;
148#[doc(alias = "GST_VALIDATE_ISSUE_FLAGS_NO_BACKTRACE")]
149const NO_BACKTRACE = ffi::GST_VALIDATE_ISSUE_FLAGS_NO_BACKTRACE as _;
150/// Always generate backtrace, even if not a critical issue
151#[doc(alias = "GST_VALIDATE_ISSUE_FLAGS_FORCE_BACKTRACE")]
152const FORCE_BACKTRACE = ffi::GST_VALIDATE_ISSUE_FLAGS_FORCE_BACKTRACE as _;
153 }
154}
155156#[doc(hidden)]
157impl IntoGlib for IssueFlags {
158type GlibType = ffi::GstValidateIssueFlags;
159160#[inline]
161fn into_glib(self) -> ffi::GstValidateIssueFlags {
162self.bits()
163 }
164}
165166#[doc(hidden)]
167impl FromGlib<ffi::GstValidateIssueFlags> for IssueFlags {
168#[inline]
169unsafe fn from_glib(value: ffi::GstValidateIssueFlags) -> Self {
170skip_assert_initialized!();
171Self::from_bits_truncate(value)
172 }
173}
174175impl StaticType for IssueFlags {
176#[inline]
177 #[doc(alias = "gst_validate_issue_flags_get_type")]
178fn static_type() -> glib::Type {
179unsafe { from_glib(ffi::gst_validate_issue_flags_get_type()) }
180 }
181}
182183impl glib::HasParamSpec for IssueFlags {
184type ParamSpec = glib::ParamSpecFlags;
185type SetValue = Self;
186type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
187188fn param_spec_builder() -> Self::BuilderFn {
189Self::ParamSpec::builder
190 }
191}
192193impl glib::value::ValueType for IssueFlags {
194type Type = Self;
195}
196197unsafe impl<'a> glib::value::FromValue<'a> for IssueFlags {
198type Checker = glib::value::GenericValueTypeChecker<Self>;
199200#[inline]
201unsafe fn from_value(value: &'a glib::Value) -> Self {
202skip_assert_initialized!();
203 from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
204 }
205}
206207impl ToValue for IssueFlags {
208#[inline]
209fn to_value(&self) -> glib::Value {
210let mut value = glib::Value::for_value_type::<Self>();
211unsafe {
212 glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
213 }
214 value
215 }
216217#[inline]
218fn value_type(&self) -> glib::Type {
219Self::static_type()
220 }
221}
222223impl From<IssueFlags> for glib::Value {
224#[inline]
225fn from(v: IssueFlags) -> Self {
226skip_assert_initialized!();
227 ToValue::to_value(&v)
228 }
229}