From 4ef15e5499fb5a2216440680590bd957645c59b1 Mon Sep 17 00:00:00 2001 From: Luke McGartland Date: Fri, 9 Apr 2021 00:13:09 +0000 Subject: [PATCH] Update GES generated docs and add bindings for OperationClip, TransitionClip, BaseTransitionClip, and VideoStandardTransitionType --- Gir_GstEditingServices.toml | 4 + docs/gstreamer-editing-services/docs.md | 230 +++++++++- .../src/auto/base_transition_clip.rs | 23 + gstreamer-editing-services/src/auto/enums.rs | 394 ++++++++++++++++++ gstreamer-editing-services/src/auto/mod.rs | 14 + .../src/auto/operation_clip.rs | 22 + .../src/auto/transition_clip.rs | 109 +++++ 7 files changed, 792 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/Gir_GstEditingServices.toml b/Gir_GstEditingServices.toml index 482e64b7d..4772a0a39 100644 --- a/Gir_GstEditingServices.toml +++ b/Gir_GstEditingServices.toml @@ -45,6 +45,10 @@ generate = [ "GES.Group", "GES.UriClipAsset", "GES.UriSourceAsset", + "GES.OperationClip", + "GES.TransitionClip", + "GES.BaseTransitionClip", + "GES.VideoStandardTransitionType", ] [[object]] diff --git a/docs/gstreamer-editing-services/docs.md b/docs/gstreamer-editing-services/docs.md index a54793d6f..20b7436f2 100644 --- a/docs/gstreamer-editing-services/docs.md +++ b/docs/gstreamer-editing-services/docs.md @@ -503,6 +503,12 @@ Method to call to destroy # Returns `true` if the translation functions were set. + + + +# 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 @@ -690,7 +696,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 @@ -1513,7 +1519,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 +1941,12 @@ 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. + +# 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 +2071,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 +2166,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 +2898,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 @@ -3993,6 +4022,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` @@ -4714,6 +4746,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 +5016,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/src/auto/base_transition_clip.rs b/gstreamer-editing-services/src/auto/base_transition_clip.rs new file mode 100644 index 000000000..d47a48cae --- /dev/null +++ b/gstreamer-editing-services/src/auto/base_transition_clip.rs @@ -0,0 +1,23 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use ges_sys; +use glib::translate::*; +use Clip; +use Container; +use Extractable; +use OperationClip; +use TimelineElement; + +glib_wrapper! { + pub struct BaseTransitionClip(Object) @extends OperationClip, Clip, Container, TimelineElement, @implements Extractable; + + match fn { + get_type => || ges_sys::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 cffb2fd03..3de2827d2 100644 --- a/gstreamer-editing-services/src/auto/enums.rs +++ b/gstreamer-editing-services/src/auto/enums.rs @@ -139,3 +139,397 @@ impl SetValue for EditMode { gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } + +#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] +#[non_exhaustive] +pub enum VideoStandardTransitionType { + None, + BarWipeLr, + BarWipeTb, + BoxWipeTl, + BoxWipeTr, + BoxWipeBr, + BoxWipeBl, + FourBoxWipeCi, + FourBoxWipeCo, + BarndoorV, + BarndoorH, + BoxWipeTc, + BoxWipeRc, + BoxWipeBc, + BoxWipeLc, + DiagonalTl, + DiagonalTr, + BowtieV, + BowtieH, + BarndoorDbl, + BarndoorDtl, + MiscDiagonalDbd, + MiscDiagonalDd, + VeeD, + VeeL, + VeeU, + VeeR, + BarnveeD, + BarnveeL, + BarnveeU, + BarnveeR, + IrisRect, + ClockCw12, + ClockCw3, + ClockCw6, + ClockCw9, + PinwheelTbv, + PinwheelTbh, + PinwheelFb, + FanCt, + FanCr, + DoublefanFov, + DoublefanFoh, + SinglesweepCwt, + SinglesweepCwr, + SinglesweepCwb, + SinglesweepCwl, + DoublesweepPv, + DoublesweepPd, + DoublesweepOv, + DoublesweepOh, + FanT, + FanR, + FanB, + FanL, + DoublefanFiv, + DoublefanFih, + SinglesweepCwtl, + SinglesweepCwbl, + SinglesweepCwbr, + SinglesweepCwtr, + DoublesweepPdtl, + DoublesweepPdbl, + SaloondoorT, + SaloondoorL, + SaloondoorB, + SaloondoorR, + WindshieldR, + WindshieldU, + WindshieldV, + WindshieldH, + Crossfade, + #[doc(hidden)] + __Unknown(i32), +} + +#[doc(hidden)] +impl ToGlib for VideoStandardTransitionType { + type GlibType = ges_sys::GESVideoStandardTransitionType; + + fn to_glib(&self) -> ges_sys::GESVideoStandardTransitionType { + match *self { + VideoStandardTransitionType::None => ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_NONE, + VideoStandardTransitionType::BarWipeLr => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_LR + } + VideoStandardTransitionType::BarWipeTb => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BAR_WIPE_TB + } + VideoStandardTransitionType::BoxWipeTl => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TL + } + VideoStandardTransitionType::BoxWipeTr => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TR + } + VideoStandardTransitionType::BoxWipeBr => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BR + } + VideoStandardTransitionType::BoxWipeBl => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BL + } + VideoStandardTransitionType::FourBoxWipeCi => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CI + } + VideoStandardTransitionType::FourBoxWipeCo => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_FOUR_BOX_WIPE_CO + } + VideoStandardTransitionType::BarndoorV => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_V + } + VideoStandardTransitionType::BarndoorH => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_H + } + VideoStandardTransitionType::BoxWipeTc => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_TC + } + VideoStandardTransitionType::BoxWipeRc => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_RC + } + VideoStandardTransitionType::BoxWipeBc => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_BC + } + VideoStandardTransitionType::BoxWipeLc => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOX_WIPE_LC + } + VideoStandardTransitionType::DiagonalTl => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TL + } + VideoStandardTransitionType::DiagonalTr => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DIAGONAL_TR + } + VideoStandardTransitionType::BowtieV => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_V + } + VideoStandardTransitionType::BowtieH => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BOWTIE_H + } + VideoStandardTransitionType::BarndoorDbl => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DBL + } + VideoStandardTransitionType::BarndoorDtl => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNDOOR_DTL + } + VideoStandardTransitionType::MiscDiagonalDbd => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DBD + } + VideoStandardTransitionType::MiscDiagonalDd => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_MISC_DIAGONAL_DD + } + VideoStandardTransitionType::VeeD => ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_D, + VideoStandardTransitionType::VeeL => ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_L, + VideoStandardTransitionType::VeeU => ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_U, + VideoStandardTransitionType::VeeR => ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_VEE_R, + VideoStandardTransitionType::BarnveeD => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_D + } + VideoStandardTransitionType::BarnveeL => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_L + } + VideoStandardTransitionType::BarnveeU => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_U + } + VideoStandardTransitionType::BarnveeR => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_BARNVEE_R + } + VideoStandardTransitionType::IrisRect => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_IRIS_RECT + } + VideoStandardTransitionType::ClockCw12 => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW12 + } + VideoStandardTransitionType::ClockCw3 => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW3 + } + VideoStandardTransitionType::ClockCw6 => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW6 + } + VideoStandardTransitionType::ClockCw9 => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_CLOCK_CW9 + } + VideoStandardTransitionType::PinwheelTbv => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBV + } + VideoStandardTransitionType::PinwheelTbh => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_TBH + } + VideoStandardTransitionType::PinwheelFb => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_PINWHEEL_FB + } + VideoStandardTransitionType::FanCt => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CT + } + VideoStandardTransitionType::FanCr => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_CR + } + VideoStandardTransitionType::DoublefanFov => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOV + } + VideoStandardTransitionType::DoublefanFoh => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FOH + } + VideoStandardTransitionType::SinglesweepCwt => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWT + } + VideoStandardTransitionType::SinglesweepCwr => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWR + } + VideoStandardTransitionType::SinglesweepCwb => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWB + } + VideoStandardTransitionType::SinglesweepCwl => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWL + } + VideoStandardTransitionType::DoublesweepPv => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PV + } + VideoStandardTransitionType::DoublesweepPd => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PD + } + VideoStandardTransitionType::DoublesweepOv => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OV + } + VideoStandardTransitionType::DoublesweepOh => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_OH + } + VideoStandardTransitionType::FanT => ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_T, + VideoStandardTransitionType::FanR => ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_R, + VideoStandardTransitionType::FanB => ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_B, + VideoStandardTransitionType::FanL => ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_FAN_L, + VideoStandardTransitionType::DoublefanFiv => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIV + } + VideoStandardTransitionType::DoublefanFih => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLEFAN_FIH + } + VideoStandardTransitionType::SinglesweepCwtl => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTL + } + VideoStandardTransitionType::SinglesweepCwbl => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBL + } + VideoStandardTransitionType::SinglesweepCwbr => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWBR + } + VideoStandardTransitionType::SinglesweepCwtr => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SINGLESWEEP_CWTR + } + VideoStandardTransitionType::DoublesweepPdtl => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDTL + } + VideoStandardTransitionType::DoublesweepPdbl => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_DOUBLESWEEP_PDBL + } + VideoStandardTransitionType::SaloondoorT => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_T + } + VideoStandardTransitionType::SaloondoorL => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_L + } + VideoStandardTransitionType::SaloondoorB => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_B + } + VideoStandardTransitionType::SaloondoorR => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_SALOONDOOR_R + } + VideoStandardTransitionType::WindshieldR => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_R + } + VideoStandardTransitionType::WindshieldU => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_U + } + VideoStandardTransitionType::WindshieldV => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_V + } + VideoStandardTransitionType::WindshieldH => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_WINDSHIELD_H + } + VideoStandardTransitionType::Crossfade => { + ges_sys::GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE + } + VideoStandardTransitionType::__Unknown(value) => value, + } + } +} + +#[doc(hidden)] +impl FromGlib for VideoStandardTransitionType { + fn from_glib(value: ges_sys::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(ges_sys::ges_video_standard_transition_type_get_type()) } + } +} + +impl<'a> FromValueOptional<'a> for VideoStandardTransitionType { + unsafe fn from_value_optional(value: &Value) -> Option { + Some(FromValue::from_value(value)) + } +} + +impl<'a> FromValue<'a> for VideoStandardTransitionType { + unsafe fn from_value(value: &Value) -> Self { + from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0)) + } +} + +impl SetValue for VideoStandardTransitionType { + unsafe fn set_value(value: &mut Value, this: &Self) { + gobject_sys::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 c4659b3d0..b56fe94e5 100644 --- a/gstreamer-editing-services/src/auto/mod.rs +++ b/gstreamer-editing-services/src/auto/mod.rs @@ -10,6 +10,11 @@ mod base_effect; pub use self::base_effect::BaseEffectExt; pub use self::base_effect::{BaseEffect, BaseEffectClass, NONE_BASE_EFFECT}; +mod base_transition_clip; +pub use self::base_transition_clip::{ + BaseTransitionClip, BaseTransitionClipClass, NONE_BASE_TRANSITION_CLIP, +}; + mod clip; pub use self::clip::ClipExt; pub use self::clip::{Clip, ClipClass, NONE_CLIP}; @@ -34,6 +39,9 @@ mod layer; pub use self::layer::LayerExt; pub use self::layer::{Layer, LayerClass, NONE_LAYER}; +mod operation_clip; +pub use self::operation_clip::{OperationClip, OperationClipClass, NONE_OPERATION_CLIP}; + mod pipeline; pub use self::pipeline::GESPipelineExt; pub use self::pipeline::{Pipeline, PipelineClass, NONE_PIPELINE}; @@ -58,6 +66,10 @@ mod track_element; pub use self::track_element::TrackElementExt; pub use self::track_element::{TrackElement, TrackElementClass, NONE_TRACK_ELEMENT}; +mod transition_clip; +pub use self::transition_clip::TransitionClipExt; +pub use self::transition_clip::{TransitionClip, TransitionClipClass, NONE_TRANSITION_CLIP}; + mod uri_clip; pub use self::uri_clip::UriClipExt; pub use self::uri_clip::{UriClip, UriClipClass, NONE_URI_CLIP}; @@ -73,6 +85,7 @@ pub use self::uri_source_asset::{UriSourceAsset, UriSourceAssetClass, NONE_URI_S mod enums; pub use self::enums::Edge; pub use self::enums::EditMode; +pub use self::enums::VideoStandardTransitionType; mod flags; pub use self::flags::PipelineFlags; @@ -97,6 +110,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..e2d962a8b --- /dev/null +++ b/gstreamer-editing-services/src/auto/operation_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) +// DO NOT EDIT + +use ges_sys; +use glib::translate::*; +use Clip; +use Container; +use Extractable; +use TimelineElement; + +glib_wrapper! { + pub struct OperationClip(Object) @extends Clip, Container, TimelineElement, @implements Extractable; + + match fn { + get_type => || ges_sys::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..f7ba23b25 --- /dev/null +++ b/gstreamer-editing-services/src/auto/transition_clip.rs @@ -0,0 +1,109 @@ +// This file was generated by gir (https://github.com/gtk-rs/gir) +// from gir-files (https://github.com/gtk-rs/gir-files) +// DO NOT EDIT + +use ges_sys; +use glib::object::Cast; +use glib::object::IsA; +use glib::signal::connect_raw; +use glib::signal::SignalHandlerId; +use glib::translate::*; +use glib::StaticType; +use glib::Value; +use glib_sys; +use gobject_sys; +use std::boxed::Box as Box_; +use std::mem::transmute; +use BaseTransitionClip; +use Clip; +use Container; +use Extractable; +use OperationClip; +use TimelineElement; +use VideoStandardTransitionType; + +glib_wrapper! { + pub struct TransitionClip(Object) @extends BaseTransitionClip, OperationClip, Clip, Container, TimelineElement, @implements Extractable; + + match fn { + get_type => || ges_sys::ges_transition_clip_get_type(), + } +} + +impl TransitionClip { + pub fn new(vtype: VideoStandardTransitionType) -> Option { + assert_initialized_main_thread!(); + unsafe { from_glib_none(ges_sys::ges_transition_clip_new(vtype.to_glib())) } + } + + pub fn new_for_nick(nick: &str) -> Option { + assert_initialized_main_thread!(); + unsafe { + from_glib_none(ges_sys::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 = + Value::from_type(::static_type()); + gobject_sys::g_object_get_property( + self.to_glib_none().0 as *mut gobject_sys::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 { + gobject_sys::g_object_set_property( + self.to_glib_none().0 as *mut gobject_sys::GObject, + b"vtype\0".as_ptr() as *const _, + 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 ges_sys::GESTransitionClip, + _param_spec: glib_sys::gpointer, + f: glib_sys::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), + ) + } + } +}