From 1a7972246c5e1acd0de4f21480333b3843b92bd5 Mon Sep 17 00:00:00 2001 From: Lucas McGartland Date: Fri, 9 Apr 2021 11:37:09 -0700 Subject: [PATCH] gstreamer-editing-services: Add bindings for (Base)TransitionClip and OperationClip --- docs/gstreamer-editing-services/docs.md | 244 ++++++++- gstreamer-editing-services/Gir.toml | 4 + .../src/auto/base_transition_clip.rs | 22 + gstreamer-editing-services/src/auto/enums.rs | 463 ++++++++++++++++++ gstreamer-editing-services/src/auto/mod.rs | 12 + .../src/auto/operation_clip.rs | 21 + .../src/auto/transition_clip.rs | 104 ++++ 7 files changed, 866 insertions(+), 4 deletions(-) create mode 100644 gstreamer-editing-services/src/auto/base_transition_clip.rs create mode 100644 gstreamer-editing-services/src/auto/operation_clip.rs create mode 100644 gstreamer-editing-services/src/auto/transition_clip.rs diff --git a/docs/gstreamer-editing-services/docs.md b/docs/gstreamer-editing-services/docs.md index a54793d6f..640f49dfd 100644 --- a/docs/gstreamer-editing-services/docs.md +++ b/docs/gstreamer-editing-services/docs.md @@ -422,6 +422,8 @@ Note that a constant-rate-change effect that is not extremely fast or slow would satisfy these conditions. For such effects, you may wish to use `EffectClass::register_rate_property`. +This is an Abstract Base Class, you cannot instantiate it. + # Implements [`BaseEffectExt`](trait.BaseEffectExt.html), [`TrackElementExt`](trait.TrackElementExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html), [`TimelineElementExtManual`](prelude/trait.TimelineElementExtManual.html) @@ -503,6 +505,14 @@ Method to call to destroy # Returns `true` if the translation functions were set. + + + +This is an Abstract Base Class, you cannot instantiate it. + +# Implements + +[`OperationClipExt`](trait.OperationClipExt.html), [`ClipExt`](trait.ClipExt.html), [`GESContainerExt`](trait.GESContainerExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html), [`TimelineElementExtManual`](prelude/trait.TimelineElementExtManual.html) `Clip`-s are the core objects of a `Layer`. Each clip may exist in a single layer but may control several `TrackElement`-s that span @@ -682,6 +692,8 @@ do_time_effect_change (GESClip * clip) } ``` +This is an Abstract Base Class, you cannot instantiate it. + # Implements [`ClipExt`](trait.ClipExt.html), [`GESContainerExt`](trait.GESContainerExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html), [`TimelineElementExtManual`](prelude/trait.TimelineElementExtManual.html) @@ -690,7 +702,7 @@ Trait containing all `Clip` methods. # Implementors -[`Clip`](struct.Clip.html) +[`Clip`](struct.Clip.html), [`OperationClip`](struct.OperationClip.html) Extracts a `TrackElement` from an asset and adds it to the clip. This can be used to add effects that derive from the asset to the @@ -1156,6 +1168,8 @@ accordingly adjust and move its children. Similarly, a change in one of its children may prompt the parent to correspondingly change its siblings. +This is an Abstract Base Class, you cannot instantiate it. + # Implements [`GESContainerExt`](trait.GESContainerExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html), [`TimelineElementExtManual`](prelude/trait.TimelineElementExtManual.html) @@ -1513,7 +1527,7 @@ Trait containing all `Extractable` methods. # Implementors -[`BaseEffect`](struct.BaseEffect.html), [`Clip`](struct.Clip.html), [`Container`](struct.Container.html), [`Effect`](struct.Effect.html), [`Extractable`](struct.Extractable.html), [`Group`](struct.Group.html), [`Layer`](struct.Layer.html), [`TimelineElement`](struct.TimelineElement.html), [`Timeline`](struct.Timeline.html), [`TrackElement`](struct.TrackElement.html), [`UriClip`](struct.UriClip.html) +[`BaseEffect`](struct.BaseEffect.html), [`BaseTransitionClip`](struct.BaseTransitionClip.html), [`Clip`](struct.Clip.html), [`Container`](struct.Container.html), [`Effect`](struct.Effect.html), [`Extractable`](struct.Extractable.html), [`Group`](struct.Group.html), [`Layer`](struct.Layer.html), [`OperationClip`](struct.OperationClip.html), [`TimelineElement`](struct.TimelineElement.html), [`Timeline`](struct.Timeline.html), [`TrackElement`](struct.TrackElement.html), [`TransitionClip`](struct.TransitionClip.html), [`UriClip`](struct.UriClip.html) Get the asset that has been set on the extractable object. @@ -1935,6 +1949,14 @@ for the change to be taken into account. use `TimelineExt::move_layer` instead. This deprecation means that you will not need to handle layer priorities at all yourself, GES will make sure there is never 'gaps' between layer priorities. + +Operations are any kind of object that both outputs AND consumes data. + +This is an Abstract Base Class, you cannot instantiate it. + +# Implements + +[`ClipExt`](trait.ClipExt.html), [`GESContainerExt`](trait.GESContainerExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html), [`TimelineElementExtManual`](prelude/trait.TimelineElementExtManual.html) A `Pipeline` can take an audio-video `Timeline` and conveniently link its `Track`-s to an internal `playsink` element, for @@ -2059,7 +2081,7 @@ The mode to set for `self` `true` if the mode of `self` was successfully set to `mode`. -Specifies the encoding to be used by the pipeline to render its +Specifies encoding setting to be used by the pipeline to render its `Pipeline:timeline`, and where the result should be written to. This method **must** be called before setting the pipeline mode to @@ -2154,7 +2176,9 @@ forced decoding (the underlying `encodebin` has its Render the `Pipeline:timeline`, avoiding decoding/reencoding (the underlying `encodebin` has its -`encodebin:avoid-reencoding` property set to `true`) +`encodebin:avoid-reencoding` property set to `true`). +> NOTE: Smart rendering can not work in tracks where `Track:mixing` +> is enabled. The `Project` is used to control a set of `Asset` and is a `Asset` with `GES_TYPE_TIMELINE` as `extractable_type` itself. That @@ -2884,6 +2908,21 @@ The layer that was added to `timeline` Will be emitted after the layer is removed from the timeline. ## `layer` The layer that was removed from `timeline` + +Simplified version of `Timeline::select-tracks-for-object` which only +allows `track_element` to be added to a single `Track`. + +Feature: `v1_18` + +## `clip` +The clip that `track_element` is being added to +## `track_element` +The element being added + +# Returns + +A track to put `track_element` into, or `None` if +it should be discarded. This will be emitted whenever the timeline needs to determine which tracks a clip's children should be added to. The track element will @@ -3094,6 +3133,8 @@ properties; for example, to expose part of an underlying `gst::Element` that is used internally. The registered properties can be listed with `TimelineElementExt::list_children_properties`. +This is an Abstract Base Class, you cannot instantiate it. + # Implements [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html), [`TimelineElementExtManual`](prelude/trait.TimelineElementExtManual.html) @@ -3993,6 +4034,9 @@ Sets the `Track:mixing` for the track. Whether `self` should be mixing Sets the `Track:restriction-caps` for the track. + +> **NOTE**: Restriction caps are **not** taken into account when +> using `Pipeline:mode`=`PipelineFlags::SmartRender`. ## `caps` The new restriction-caps for `self` @@ -4158,6 +4202,8 @@ these will be updated to lie between the `TimelineElement:in-point` and out-point of the element. This can be switched off by setting `TrackElement:auto-clamp-control-sources` to `false`. +This is an Abstract Base Class, you cannot instantiate it. + # Implements [`TrackElementExt`](trait.TrackElementExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html), [`TimelineElementExtManual`](prelude/trait.TimelineElementExtManual.html) @@ -4714,6 +4760,51 @@ A video track A text (subtitle) track A custom-content track + +Creates an object that mixes together the two underlying objects, A and B. +The A object is assumed to have a higher prioirity (lower number) than the +B object. At the transition in point, only A will be visible, and by the +end only B will be visible. + +The shape of the video transition depends on the value of the "vtype" +property. The default value is "crossfade". For audio, only "crossfade" is +supported. + +The ID of the ExtractableType is the nickname of the vtype property value. Note +that this value can be changed after creation and the GESExtractable.asset value +will be updated when needed. + +# Implements + +[`TransitionClipExt`](trait.TransitionClipExt.html), [`BaseTransitionClipExt`](trait.BaseTransitionClipExt.html), [`OperationClipExt`](trait.OperationClipExt.html), [`ClipExt`](trait.ClipExt.html), [`GESContainerExt`](trait.GESContainerExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html), [`TimelineElementExtManual`](prelude/trait.TimelineElementExtManual.html) + +Trait containing all `TransitionClip` methods. + +# Implementors + +[`TransitionClip`](struct.TransitionClip.html) + +Creates a new `TransitionClip`. +## `vtype` +the type of transition to create + +# Returns + +a newly created `TransitionClip`, +or `None` if something went wrong. + +Creates a new `TransitionClip` for the provided `nick`. +## `nick` +a string representing the type of transition to create + +# Returns + +The newly created `TransitionClip`, +or `None` if something went wrong + +a `VideoStandardTransitionType` representing the wipe to use + +a `VideoStandardTransitionType` representing the wipe to use Represents all the output streams from a particular uri. It is assumed that the URI points to a file of some type. @@ -4939,3 +5030,148 @@ Feature: `v1_18` `true` if the video stream corresponds to an image (i.e. only contains one frame) + + +Transition type has not been set, + +A bar moves from left to right, + +A bar moves from top to bottom, + +A box expands from the upper-left corner to the lower-right corner, + +A box expands from the upper-right corner to the lower-left corner, + +A box expands from the lower-right corner to the upper-left corner, + +A box expands from the lower-left corner to the upper-right corner, + +A box shape expands from each of the four corners toward the center, + +A box shape expands from the center of each quadrant toward the corners of each quadrant, + +A central, vertical line splits and expands toward the left and right edges, + +A central, horizontal line splits and expands toward the top and bottom edges, + +A box expands from the top edge's midpoint to the bottom corners, + +A box expands from the right edge's midpoint to the left corners, + +A box expands from the bottom edge's midpoint to the top corners, + +A box expands from the left edge's midpoint to the right corners, + +A diagonal line moves from the upper-left corner to the lower-right corner, + +A diagonal line moves from the upper right corner to the lower-left corner, + +Two wedge shapes slide in from the top and bottom edges toward the center, + +Two wedge shapes slide in from the left and right edges toward the center, + +A diagonal line from the lower-left to upper-right corners splits and expands toward the opposite corners, + +A diagonal line from upper-left to lower-right corners splits and expands toward the opposite corners, + +Four wedge shapes split from the center and retract toward the four edges, + +A diamond connecting the four edge midpoints simultaneously contracts toward the center and expands toward the edges, + +A wedge shape moves from top to bottom, + +A wedge shape moves from right to left, + +A wedge shape moves from bottom to top, + +A wedge shape moves from left to right, + +A 'V' shape extending from the bottom edge's midpoint to the opposite corners contracts toward the center and expands toward the edges, + +A 'V' shape extending from the left edge's midpoint to the opposite corners contracts toward the center and expands toward the edges, + +A 'V' shape extending from the top edge's midpoint to the opposite corners contracts toward the center and expands toward the edges, + +A 'V' shape extending from the right edge's midpoint to the opposite corners contracts toward the center and expands toward the edges, + +A rectangle expands from the center., + +A radial hand sweeps clockwise from the twelve o'clock position, + +A radial hand sweeps clockwise from the three o'clock position, + +A radial hand sweeps clockwise from the six o'clock position, + +A radial hand sweeps clockwise from the nine o'clock position, + +Two radial hands sweep clockwise from the twelve and six o'clock positions, + +Two radial hands sweep clockwise from the nine and three o'clock positions, + +Four radial hands sweep clockwise, + +A fan unfolds from the top edge, the fan axis at the center, + +A fan unfolds from the right edge, the fan axis at the center, + +Two fans, their axes at the center, unfold from the top and bottom, + +Two fans, their axes at the center, unfold from the left and right, + +A radial hand sweeps clockwise from the top edge's midpoint, + +A radial hand sweeps clockwise from the right edge's midpoint, + +A radial hand sweeps clockwise from the bottom edge's midpoint, + +A radial hand sweeps clockwise from the left edge's midpoint, + +Two radial hands sweep clockwise and counter-clockwise from the top and bottom edges' midpoints, + +Two radial hands sweep clockwise and counter-clockwise from the left and right edges' midpoints, + +Two radial hands attached at the top and bottom edges' midpoints sweep from right to left, + +Two radial hands attached at the left and right edges' midpoints sweep from top to bottom, + +A fan unfolds from the bottom, the fan axis at the top edge's midpoint, + +A fan unfolds from the left, the fan axis at the right edge's midpoint, + +A fan unfolds from the top, the fan axis at the bottom edge's midpoint, + +A fan unfolds from the right, the fan axis at the left edge's midpoint, + +Two fans, their axes at the top and bottom, unfold from the center, + +Two fans, their axes at the left and right, unfold from the center, + +A radial hand sweeps clockwise from the upper-left corner, + +A radial hand sweeps counter-clockwise from the lower-left corner., + +A radial hand sweeps clockwise from the lower-right corner, + +A radial hand sweeps counter-clockwise from the upper-right corner, + +Two radial hands attached at the upper-left and lower-right corners sweep down and up, + +Two radial hands attached at the lower-left and upper-right corners sweep down and up, + +Two radial hands attached at the upper-left and upper-right corners sweep down, + +Two radial hands attached at the upper-left and lower-left corners sweep to the right, + +Two radial hands attached at the lower-left and lower-right corners sweep up, + +Two radial hands attached at the upper-right and lower-right corners sweep to the left, + +Two radial hands attached at the midpoints of the top and bottom halves sweep from right to left, + +Two radial hands attached at the midpoints of the left and right halves sweep from top to bottom, + +Two sets of radial hands attached at the midpoints of the top and bottom halves sweep from top to bottom and bottom to top, + +Two sets of radial hands attached at the midpoints of the left and right halves sweep from left to right and right to left, + +Crossfade diff --git a/gstreamer-editing-services/Gir.toml b/gstreamer-editing-services/Gir.toml index 509fdf882..291293975 100644 --- a/gstreamer-editing-services/Gir.toml +++ b/gstreamer-editing-services/Gir.toml @@ -40,6 +40,10 @@ generate = [ "GES.Group", "GES.UriClipAsset", "GES.UriSourceAsset", + "GES.OperationClip", + "GES.TransitionClip", + "GES.BaseTransitionClip", + "GES.VideoStandardTransitionType", ] [[object]] diff --git a/gstreamer-editing-services/src/auto/base_transition_clip.rs b/gstreamer-editing-services/src/auto/base_transition_clip.rs new file mode 100644 index 000000000..a8427f2cf --- /dev/null +++ b/gstreamer-editing-services/src/auto/base_transition_clip.rs @@ -0,0 +1,22 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) +// DO NOT EDIT + +use crate::Clip; +use crate::Container; +use crate::Extractable; +use crate::OperationClip; +use crate::TimelineElement; + +glib::wrapper! { + pub struct BaseTransitionClip(Object) @extends OperationClip, Clip, Container, TimelineElement, @implements Extractable; + + match fn { + get_type => || ffi::ges_base_transition_clip_get_type(), + } +} + +impl BaseTransitionClip {} + +pub const NONE_BASE_TRANSITION_CLIP: Option<&BaseTransitionClip> = None; diff --git a/gstreamer-editing-services/src/auto/enums.rs b/gstreamer-editing-services/src/auto/enums.rs index a36e7146f..969f5fbd7 100644 --- a/gstreamer-editing-services/src/auto/enums.rs +++ b/gstreamer-editing-services/src/auto/enums.rs @@ -203,3 +203,466 @@ impl SetValue for EditMode { glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } + +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] +#[non_exhaustive] +#[doc(alias = "GESVideoStandardTransitionType")] +pub enum VideoStandardTransitionType { + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE")] + None, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR")] + BarWipeLr, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB")] + BarWipeTb, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL")] + BoxWipeTl, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR")] + BoxWipeTr, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR")] + BoxWipeBr, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL")] + BoxWipeBl, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI")] + FourBoxWipeCi, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO")] + FourBoxWipeCo, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V")] + BarndoorV, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H")] + BarndoorH, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC")] + BoxWipeTc, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC")] + BoxWipeRc, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC")] + BoxWipeBc, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC")] + BoxWipeLc, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL")] + DiagonalTl, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR")] + DiagonalTr, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V")] + BowtieV, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H")] + BowtieH, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL")] + BarndoorDbl, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL")] + BarndoorDtl, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD")] + MiscDiagonalDbd, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD")] + MiscDiagonalDd, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D")] + VeeD, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L")] + VeeL, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U")] + VeeU, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R")] + VeeR, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D")] + BarnveeD, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L")] + BarnveeL, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U")] + BarnveeU, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R")] + BarnveeR, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT")] + IrisRect, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12")] + ClockCw12, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3")] + ClockCw3, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6")] + ClockCw6, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9")] + ClockCw9, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV")] + PinwheelTbv, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH")] + PinwheelTbh, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB")] + PinwheelFb, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT")] + FanCt, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR")] + FanCr, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV")] + DoublefanFov, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH")] + DoublefanFoh, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT")] + SinglesweepCwt, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR")] + SinglesweepCwr, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB")] + SinglesweepCwb, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL")] + SinglesweepCwl, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV")] + DoublesweepPv, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD")] + DoublesweepPd, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV")] + DoublesweepOv, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH")] + DoublesweepOh, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T")] + FanT, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R")] + FanR, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B")] + FanB, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L")] + FanL, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV")] + DoublefanFiv, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH")] + DoublefanFih, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL")] + SinglesweepCwtl, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL")] + SinglesweepCwbl, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR")] + SinglesweepCwbr, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR")] + SinglesweepCwtr, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL")] + DoublesweepPdtl, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL")] + DoublesweepPdbl, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T")] + SaloondoorT, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L")] + SaloondoorL, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B")] + SaloondoorB, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R")] + SaloondoorR, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R")] + WindshieldR, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U")] + WindshieldU, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V")] + WindshieldV, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H")] + WindshieldH, + #[doc(alias = "GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE")] + Crossfade, + #[doc(hidden)] + __Unknown(i32), +} + +#[doc(hidden)] +impl ToGlib for VideoStandardTransitionType { + type GlibType = ffi::GESVideoStandardTransitionType; + + fn to_glib(&self) -> ffi::GESVideoStandardTransitionType { + match *self { + VideoStandardTransitionType::None => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE, + VideoStandardTransitionType::BarWipeLr => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR + } + VideoStandardTransitionType::BarWipeTb => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB + } + VideoStandardTransitionType::BoxWipeTl => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL + } + VideoStandardTransitionType::BoxWipeTr => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR + } + VideoStandardTransitionType::BoxWipeBr => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR + } + VideoStandardTransitionType::BoxWipeBl => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL + } + VideoStandardTransitionType::FourBoxWipeCi => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI + } + VideoStandardTransitionType::FourBoxWipeCo => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO + } + VideoStandardTransitionType::BarndoorV => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V + } + VideoStandardTransitionType::BarndoorH => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H + } + VideoStandardTransitionType::BoxWipeTc => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC + } + VideoStandardTransitionType::BoxWipeRc => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC + } + VideoStandardTransitionType::BoxWipeBc => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC + } + VideoStandardTransitionType::BoxWipeLc => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC + } + VideoStandardTransitionType::DiagonalTl => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL + } + VideoStandardTransitionType::DiagonalTr => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR + } + VideoStandardTransitionType::BowtieV => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V + } + VideoStandardTransitionType::BowtieH => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H + } + VideoStandardTransitionType::BarndoorDbl => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL + } + VideoStandardTransitionType::BarndoorDtl => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL + } + VideoStandardTransitionType::MiscDiagonalDbd => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD + } + VideoStandardTransitionType::MiscDiagonalDd => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD + } + VideoStandardTransitionType::VeeD => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D, + VideoStandardTransitionType::VeeL => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L, + VideoStandardTransitionType::VeeU => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U, + VideoStandardTransitionType::VeeR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R, + VideoStandardTransitionType::BarnveeD => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D + } + VideoStandardTransitionType::BarnveeL => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L + } + VideoStandardTransitionType::BarnveeU => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U + } + VideoStandardTransitionType::BarnveeR => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R + } + VideoStandardTransitionType::IrisRect => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT + } + VideoStandardTransitionType::ClockCw12 => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12 + } + VideoStandardTransitionType::ClockCw3 => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3 + } + VideoStandardTransitionType::ClockCw6 => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6 + } + VideoStandardTransitionType::ClockCw9 => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9 + } + VideoStandardTransitionType::PinwheelTbv => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV + } + VideoStandardTransitionType::PinwheelTbh => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH + } + VideoStandardTransitionType::PinwheelFb => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB + } + VideoStandardTransitionType::FanCt => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT, + VideoStandardTransitionType::FanCr => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR, + VideoStandardTransitionType::DoublefanFov => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV + } + VideoStandardTransitionType::DoublefanFoh => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH + } + VideoStandardTransitionType::SinglesweepCwt => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT + } + VideoStandardTransitionType::SinglesweepCwr => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR + } + VideoStandardTransitionType::SinglesweepCwb => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB + } + VideoStandardTransitionType::SinglesweepCwl => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL + } + VideoStandardTransitionType::DoublesweepPv => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV + } + VideoStandardTransitionType::DoublesweepPd => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD + } + VideoStandardTransitionType::DoublesweepOv => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV + } + VideoStandardTransitionType::DoublesweepOh => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH + } + VideoStandardTransitionType::FanT => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T, + VideoStandardTransitionType::FanR => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R, + VideoStandardTransitionType::FanB => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B, + VideoStandardTransitionType::FanL => ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L, + VideoStandardTransitionType::DoublefanFiv => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV + } + VideoStandardTransitionType::DoublefanFih => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH + } + VideoStandardTransitionType::SinglesweepCwtl => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL + } + VideoStandardTransitionType::SinglesweepCwbl => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL + } + VideoStandardTransitionType::SinglesweepCwbr => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR + } + VideoStandardTransitionType::SinglesweepCwtr => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR + } + VideoStandardTransitionType::DoublesweepPdtl => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL + } + VideoStandardTransitionType::DoublesweepPdbl => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL + } + VideoStandardTransitionType::SaloondoorT => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T + } + VideoStandardTransitionType::SaloondoorL => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L + } + VideoStandardTransitionType::SaloondoorB => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B + } + VideoStandardTransitionType::SaloondoorR => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R + } + VideoStandardTransitionType::WindshieldR => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R + } + VideoStandardTransitionType::WindshieldU => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U + } + VideoStandardTransitionType::WindshieldV => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V + } + VideoStandardTransitionType::WindshieldH => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H + } + VideoStandardTransitionType::Crossfade => { + ffi::GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE + } + VideoStandardTransitionType::__Unknown(value) => value, + } + } +} + +#[doc(hidden)] +impl FromGlib for VideoStandardTransitionType { + unsafe fn from_glib(value: ffi::GESVideoStandardTransitionType) -> Self { + skip_assert_initialized!(); + match value { + 0 => VideoStandardTransitionType::None, + 1 => VideoStandardTransitionType::BarWipeLr, + 2 => VideoStandardTransitionType::BarWipeTb, + 3 => VideoStandardTransitionType::BoxWipeTl, + 4 => VideoStandardTransitionType::BoxWipeTr, + 5 => VideoStandardTransitionType::BoxWipeBr, + 6 => VideoStandardTransitionType::BoxWipeBl, + 7 => VideoStandardTransitionType::FourBoxWipeCi, + 8 => VideoStandardTransitionType::FourBoxWipeCo, + 21 => VideoStandardTransitionType::BarndoorV, + 22 => VideoStandardTransitionType::BarndoorH, + 23 => VideoStandardTransitionType::BoxWipeTc, + 24 => VideoStandardTransitionType::BoxWipeRc, + 25 => VideoStandardTransitionType::BoxWipeBc, + 26 => VideoStandardTransitionType::BoxWipeLc, + 41 => VideoStandardTransitionType::DiagonalTl, + 42 => VideoStandardTransitionType::DiagonalTr, + 43 => VideoStandardTransitionType::BowtieV, + 44 => VideoStandardTransitionType::BowtieH, + 45 => VideoStandardTransitionType::BarndoorDbl, + 46 => VideoStandardTransitionType::BarndoorDtl, + 47 => VideoStandardTransitionType::MiscDiagonalDbd, + 48 => VideoStandardTransitionType::MiscDiagonalDd, + 61 => VideoStandardTransitionType::VeeD, + 62 => VideoStandardTransitionType::VeeL, + 63 => VideoStandardTransitionType::VeeU, + 64 => VideoStandardTransitionType::VeeR, + 65 => VideoStandardTransitionType::BarnveeD, + 66 => VideoStandardTransitionType::BarnveeL, + 67 => VideoStandardTransitionType::BarnveeU, + 68 => VideoStandardTransitionType::BarnveeR, + 101 => VideoStandardTransitionType::IrisRect, + 201 => VideoStandardTransitionType::ClockCw12, + 202 => VideoStandardTransitionType::ClockCw3, + 203 => VideoStandardTransitionType::ClockCw6, + 204 => VideoStandardTransitionType::ClockCw9, + 205 => VideoStandardTransitionType::PinwheelTbv, + 206 => VideoStandardTransitionType::PinwheelTbh, + 207 => VideoStandardTransitionType::PinwheelFb, + 211 => VideoStandardTransitionType::FanCt, + 212 => VideoStandardTransitionType::FanCr, + 213 => VideoStandardTransitionType::DoublefanFov, + 214 => VideoStandardTransitionType::DoublefanFoh, + 221 => VideoStandardTransitionType::SinglesweepCwt, + 222 => VideoStandardTransitionType::SinglesweepCwr, + 223 => VideoStandardTransitionType::SinglesweepCwb, + 224 => VideoStandardTransitionType::SinglesweepCwl, + 225 => VideoStandardTransitionType::DoublesweepPv, + 226 => VideoStandardTransitionType::DoublesweepPd, + 227 => VideoStandardTransitionType::DoublesweepOv, + 228 => VideoStandardTransitionType::DoublesweepOh, + 231 => VideoStandardTransitionType::FanT, + 232 => VideoStandardTransitionType::FanR, + 233 => VideoStandardTransitionType::FanB, + 234 => VideoStandardTransitionType::FanL, + 235 => VideoStandardTransitionType::DoublefanFiv, + 236 => VideoStandardTransitionType::DoublefanFih, + 241 => VideoStandardTransitionType::SinglesweepCwtl, + 242 => VideoStandardTransitionType::SinglesweepCwbl, + 243 => VideoStandardTransitionType::SinglesweepCwbr, + 244 => VideoStandardTransitionType::SinglesweepCwtr, + 245 => VideoStandardTransitionType::DoublesweepPdtl, + 246 => VideoStandardTransitionType::DoublesweepPdbl, + 251 => VideoStandardTransitionType::SaloondoorT, + 252 => VideoStandardTransitionType::SaloondoorL, + 253 => VideoStandardTransitionType::SaloondoorB, + 254 => VideoStandardTransitionType::SaloondoorR, + 261 => VideoStandardTransitionType::WindshieldR, + 262 => VideoStandardTransitionType::WindshieldU, + 263 => VideoStandardTransitionType::WindshieldV, + 264 => VideoStandardTransitionType::WindshieldH, + 512 => VideoStandardTransitionType::Crossfade, + value => VideoStandardTransitionType::__Unknown(value), + } + } +} + +impl StaticType for VideoStandardTransitionType { + fn static_type() -> Type { + unsafe { from_glib(ffi::ges_video_standard_transition_type_get_type()) } + } +} + +impl<'a> FromValueOptional<'a> for VideoStandardTransitionType { + unsafe fn from_value_optional(value: &glib::Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +impl<'a> FromValue<'a> for VideoStandardTransitionType { + unsafe fn from_value(value: &glib::Value) -> Self { + from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) + } +} + +impl SetValue for VideoStandardTransitionType { + unsafe fn set_value(value: &mut glib::Value, this: &Self) { + glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) + } +} diff --git a/gstreamer-editing-services/src/auto/mod.rs b/gstreamer-editing-services/src/auto/mod.rs index 6a6726b75..c731b703d 100644 --- a/gstreamer-editing-services/src/auto/mod.rs +++ b/gstreamer-editing-services/src/auto/mod.rs @@ -11,6 +11,9 @@ mod base_effect; pub use self::base_effect::BaseEffectExt; pub use self::base_effect::{BaseEffect, NONE_BASE_EFFECT}; +mod base_transition_clip; +pub use self::base_transition_clip::{BaseTransitionClip, NONE_BASE_TRANSITION_CLIP}; + mod clip; pub use self::clip::ClipExt; pub use self::clip::{Clip, NONE_CLIP}; @@ -35,6 +38,9 @@ mod layer; pub use self::layer::LayerExt; pub use self::layer::{Layer, NONE_LAYER}; +mod operation_clip; +pub use self::operation_clip::{OperationClip, NONE_OPERATION_CLIP}; + mod pipeline; pub use self::pipeline::GESPipelineExt; pub use self::pipeline::{Pipeline, NONE_PIPELINE}; @@ -59,6 +65,10 @@ mod track_element; pub use self::track_element::TrackElementExt; pub use self::track_element::{TrackElement, NONE_TRACK_ELEMENT}; +mod transition_clip; +pub use self::transition_clip::TransitionClipExt; +pub use self::transition_clip::{TransitionClip, NONE_TRANSITION_CLIP}; + mod uri_clip; pub use self::uri_clip::UriClipExt; pub use self::uri_clip::{UriClip, NONE_URI_CLIP}; @@ -74,6 +84,7 @@ pub use self::uri_source_asset::{UriSourceAsset, NONE_URI_SOURCE_ASSET}; mod enums; pub use self::enums::Edge; pub use self::enums::EditMode; +pub use self::enums::VideoStandardTransitionType; mod flags; pub use self::flags::PipelineFlags; @@ -98,6 +109,7 @@ pub mod traits { pub use super::TimelineElementExt; pub use super::TimelineExt; pub use super::TrackElementExt; + pub use super::TransitionClipExt; pub use super::UriClipAssetExt; pub use super::UriClipExt; pub use super::UriSourceAssetExt; diff --git a/gstreamer-editing-services/src/auto/operation_clip.rs b/gstreamer-editing-services/src/auto/operation_clip.rs new file mode 100644 index 000000000..b67266484 --- /dev/null +++ b/gstreamer-editing-services/src/auto/operation_clip.rs @@ -0,0 +1,21 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) +// DO NOT EDIT + +use crate::Clip; +use crate::Container; +use crate::Extractable; +use crate::TimelineElement; + +glib::wrapper! { + pub struct OperationClip(Object) @extends Clip, Container, TimelineElement, @implements Extractable; + + match fn { + get_type => || ffi::ges_operation_clip_get_type(), + } +} + +impl OperationClip {} + +pub const NONE_OPERATION_CLIP: Option<&OperationClip> = None; diff --git a/gstreamer-editing-services/src/auto/transition_clip.rs b/gstreamer-editing-services/src/auto/transition_clip.rs new file mode 100644 index 000000000..851eb5c00 --- /dev/null +++ b/gstreamer-editing-services/src/auto/transition_clip.rs @@ -0,0 +1,104 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) +// DO NOT EDIT + +use crate::BaseTransitionClip; +use crate::Clip; +use crate::Container; +use crate::Extractable; +use crate::OperationClip; +use crate::TimelineElement; +use crate::VideoStandardTransitionType; +use glib::object::Cast; +use glib::object::IsA; +use glib::signal::connect_raw; +use glib::signal::SignalHandlerId; +use glib::translate::*; +use glib::StaticType; +use std::boxed::Box as Box_; +use std::mem::transmute; + +glib::wrapper! { + pub struct TransitionClip(Object) @extends BaseTransitionClip, OperationClip, Clip, Container, TimelineElement, @implements Extractable; + + match fn { + get_type => || ffi::ges_transition_clip_get_type(), + } +} + +impl TransitionClip { + #[doc(alias = "ges_transition_clip_new")] + pub fn new(vtype: VideoStandardTransitionType) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ffi::ges_transition_clip_new(vtype.to_glib())) } + } + + #[doc(alias = "ges_transition_clip_new_for_nick")] + pub fn new_for_nick(nick: &str) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ffi::ges_transition_clip_new_for_nick(nick.to_glib_none().0)) } + } +} + +pub const NONE_TRANSITION_CLIP: Option<&TransitionClip> = None; + +pub trait TransitionClipExt: 'static { + fn get_property_vtype(&self) -> VideoStandardTransitionType; + + fn set_property_vtype(&self, vtype: VideoStandardTransitionType); + + fn connect_property_vtype_notify(&self, f: F) -> SignalHandlerId; +} + +impl> TransitionClipExt for O { + fn get_property_vtype(&self) -> VideoStandardTransitionType { + unsafe { + let mut value = + glib::Value::from_type(::static_type()); + glib::gobject_ffi::g_object_get_property( + self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, + b"vtype\0".as_ptr() as *const _, + value.to_glib_none_mut().0, + ); + value + .get() + .expect("Return Value for property `vtype` getter") + .unwrap() + } + } + + fn set_property_vtype(&self, vtype: VideoStandardTransitionType) { + unsafe { + glib::gobject_ffi::g_object_set_property( + self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, + b"vtype\0".as_ptr() as *const _, + glib::Value::from(&vtype).to_glib_none().0, + ); + } + } + + fn connect_property_vtype_notify(&self, f: F) -> SignalHandlerId { + unsafe extern "C" fn notify_vtype_trampoline( + this: *mut ffi::GESTransitionClip, + _param_spec: glib::ffi::gpointer, + f: glib::ffi::gpointer, + ) where + P: IsA, + { + let f: &F = &*(f as *const F); + f(&TransitionClip::from_glib_borrow(this).unsafe_cast_ref()) + } + unsafe { + let f: Box_ = Box_::new(f); + connect_raw( + self.as_ptr() as *mut _, + b"notify::vtype\0".as_ptr() as *const _, + Some(transmute::<_, unsafe extern "C" fn()>( + notify_vtype_trampoline:: as *const (), + )), + Box_::into_raw(f), + ) + } + } +}