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#[doc(alias = "GST_VALIDATE_ACTION_TYPE_INTERLACED")]
27const INTERLACED = ffi::GST_VALIDATE_ACTION_TYPE_INTERLACED as _;
28/// The action will be executed on 'element-added'
29 /// for a particular element type if no playback-time
30 /// is specified
31#[doc(alias = "GST_VALIDATE_ACTION_TYPE_CAN_EXECUTE_ON_ADDITION")]
32const CAN_EXECUTE_ON_ADDITION = ffi::GST_VALIDATE_ACTION_TYPE_CAN_EXECUTE_ON_ADDITION as _;
33/// The pipeline will need to be synchronized with the clock
34 /// for that action type to be used.
35#[doc(alias = "GST_VALIDATE_ACTION_TYPE_NEEDS_CLOCK")]
36const NEEDS_CLOCK = ffi::GST_VALIDATE_ACTION_TYPE_NEEDS_CLOCK as _;
37/// Do not consider the non execution of the action
38 /// as a fatal error.
39#[doc(alias = "GST_VALIDATE_ACTION_TYPE_NO_EXECUTION_NOT_FATAL")]
40const NO_EXECUTION_NOT_FATAL = ffi::GST_VALIDATE_ACTION_TYPE_NO_EXECUTION_NOT_FATAL as _;
41/// The action can use the 'optional' keyword. Such action
42 /// instances will have the [`NO_EXECUTION_NOT_FATAL`][Self::NO_EXECUTION_NOT_FATAL]
43 /// flag set and won't be considered as fatal if they fail.
44#[doc(alias = "GST_VALIDATE_ACTION_TYPE_CAN_BE_OPTIONAL")]
45const CAN_BE_OPTIONAL = ffi::GST_VALIDATE_ACTION_TYPE_CAN_BE_OPTIONAL as _;
46#[doc(alias = "GST_VALIDATE_ACTION_TYPE_DOESNT_NEED_PIPELINE")]
47const DOESNT_NEED_PIPELINE = ffi::GST_VALIDATE_ACTION_TYPE_DOESNT_NEED_PIPELINE as _;
48/// The action can be used in config files even if it is not strictly a config
49 /// action (ie. it needs a scenario to run).
50#[doc(alias = "GST_VALIDATE_ACTION_TYPE_HANDLED_IN_CONFIG")]
51const HANDLED_IN_CONFIG = ffi::GST_VALIDATE_ACTION_TYPE_HANDLED_IN_CONFIG as _;
52/// The action is checking some state from objects in the pipeline. It means that it can
53 /// be used as 'check' in different action which have a `check` "sub action", such as the 'wait' action type.
54 /// This implies that the action can be executed from any thread and not only from the scenario thread as other
55 /// types.
56#[doc(alias = "GST_VALIDATE_ACTION_TYPE_CHECK")]
57const CHECK = ffi::GST_VALIDATE_ACTION_TYPE_CHECK as _;
58 }
59}
6061#[doc(hidden)]
62impl IntoGlib for ActionTypeFlags {
63type GlibType = ffi::GstValidateActionTypeFlags;
6465#[inline]
66fn into_glib(self) -> ffi::GstValidateActionTypeFlags {
67self.bits()
68 }
69}
7071#[doc(hidden)]
72impl FromGlib<ffi::GstValidateActionTypeFlags> for ActionTypeFlags {
73#[inline]
74unsafe fn from_glib(value: ffi::GstValidateActionTypeFlags) -> Self {
75skip_assert_initialized!();
76Self::from_bits_truncate(value)
77 }
78}
7980impl StaticType for ActionTypeFlags {
81#[inline]
82 #[doc(alias = "gst_validate_action_type_flags_get_type")]
83fn static_type() -> glib::Type {
84unsafe { from_glib(ffi::gst_validate_action_type_flags_get_type()) }
85 }
86}
8788impl glib::HasParamSpec for ActionTypeFlags {
89type ParamSpec = glib::ParamSpecFlags;
90type SetValue = Self;
91type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
9293fn param_spec_builder() -> Self::BuilderFn {
94Self::ParamSpec::builder
95 }
96}
9798impl glib::value::ValueType for ActionTypeFlags {
99type Type = Self;
100}
101102unsafe impl<'a> glib::value::FromValue<'a> for ActionTypeFlags {
103type Checker = glib::value::GenericValueTypeChecker<Self>;
104105#[inline]
106unsafe fn from_value(value: &'a glib::Value) -> Self {
107skip_assert_initialized!();
108 from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
109 }
110}
111112impl ToValue for ActionTypeFlags {
113#[inline]
114fn to_value(&self) -> glib::Value {
115let mut value = glib::Value::for_value_type::<Self>();
116unsafe {
117 glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
118 }
119 value
120 }
121122#[inline]
123fn value_type(&self) -> glib::Type {
124Self::static_type()
125 }
126}
127128impl From<ActionTypeFlags> for glib::Value {
129#[inline]
130fn from(v: ActionTypeFlags) -> Self {
131skip_assert_initialized!();
132 ToValue::to_value(&v)
133 }
134}
135136bitflags! {
137/// GST_VALIDATE_ISSUE_FLAGS_NONE: No special flags for the issue type
138 /// GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS: Always show all occurrences of the issue in full details
139 /// GST_VALIDATE_ISSUE_FLAGS_NO_BACKTRACE: Do not generate backtrace for the issue type
140#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
141 #[doc(alias = "GstValidateIssueFlags")]
142pub struct IssueFlags: u32 {
143#[doc(alias = "GST_VALIDATE_ISSUE_FLAGS_NONE")]
144const NONE = ffi::GST_VALIDATE_ISSUE_FLAGS_NONE as _;
145#[doc(alias = "GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS")]
146const FULL_DETAILS = ffi::GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS as _;
147#[doc(alias = "GST_VALIDATE_ISSUE_FLAGS_NO_BACKTRACE")]
148const NO_BACKTRACE = ffi::GST_VALIDATE_ISSUE_FLAGS_NO_BACKTRACE as _;
149/// Always generate backtrace, even if not a critical issue
150#[doc(alias = "GST_VALIDATE_ISSUE_FLAGS_FORCE_BACKTRACE")]
151const FORCE_BACKTRACE = ffi::GST_VALIDATE_ISSUE_FLAGS_FORCE_BACKTRACE as _;
152 }
153}
154155#[doc(hidden)]
156impl IntoGlib for IssueFlags {
157type GlibType = ffi::GstValidateIssueFlags;
158159#[inline]
160fn into_glib(self) -> ffi::GstValidateIssueFlags {
161self.bits()
162 }
163}
164165#[doc(hidden)]
166impl FromGlib<ffi::GstValidateIssueFlags> for IssueFlags {
167#[inline]
168unsafe fn from_glib(value: ffi::GstValidateIssueFlags) -> Self {
169skip_assert_initialized!();
170Self::from_bits_truncate(value)
171 }
172}
173174impl StaticType for IssueFlags {
175#[inline]
176 #[doc(alias = "gst_validate_issue_flags_get_type")]
177fn static_type() -> glib::Type {
178unsafe { from_glib(ffi::gst_validate_issue_flags_get_type()) }
179 }
180}
181182impl glib::HasParamSpec for IssueFlags {
183type ParamSpec = glib::ParamSpecFlags;
184type SetValue = Self;
185type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
186187fn param_spec_builder() -> Self::BuilderFn {
188Self::ParamSpec::builder
189 }
190}
191192impl glib::value::ValueType for IssueFlags {
193type Type = Self;
194}
195196unsafe impl<'a> glib::value::FromValue<'a> for IssueFlags {
197type Checker = glib::value::GenericValueTypeChecker<Self>;
198199#[inline]
200unsafe fn from_value(value: &'a glib::Value) -> Self {
201skip_assert_initialized!();
202 from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
203 }
204}
205206impl ToValue for IssueFlags {
207#[inline]
208fn to_value(&self) -> glib::Value {
209let mut value = glib::Value::for_value_type::<Self>();
210unsafe {
211 glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
212 }
213 value
214 }
215216#[inline]
217fn value_type(&self) -> glib::Type {
218Self::static_type()
219 }
220}
221222impl From<IssueFlags> for glib::Value {
223#[inline]
224fn from(v: IssueFlags) -> Self {
225skip_assert_initialized!();
226 ToValue::to_value(&v)
227 }
228}