Skip to content

Conversation

@hwilkes-igalia
Copy link
Contributor

Adds effects and markers support to the xges adapter.

GESEffects found below an xges clip translate to otio item effects.
GESMarkers found in an xges timeline translate to otio stack markers.

Also:

  • GstStructure was improved
  • GstCaps and GstCapsFeatures schemas were added
  • added tests
  • made small fixes and tidies

@codecov-io
Copy link

codecov-io commented Nov 11, 2019

Codecov Report

Merging #609 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #609      +/-   ##
==========================================
+ Coverage   81.69%   81.71%   +0.01%     
==========================================
  Files          72       72              
  Lines        2732     2729       -3     
==========================================
- Hits         2232     2230       -2     
+ Misses        500      499       -1
Flag Coverage Δ
#py27 81.71% <ø> (+0.03%) ⬆️
#py36 ?
#py37 ?
Impacted Files Coverage Δ
...ntimelineio/opentimelineio-bindings/otio_utils.cpp 87.05% <0%> (-0.16%) ⬇️
...eio/opentimelineio-bindings/otio_anyDictionary.cpp 100% <0%> (ø) ⬆️
...elineio/opentimelineio-bindings/otio_anyVector.cpp 100% <0%> (ø) ⬆️
...imelineio/opentimelineio-bindings/otio_anyVector.h 48.64% <0%> (+2.7%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afc69b9...466d94e. Read the comment docs.

@thiblahute
Copy link
Contributor

This looks pretty good to me, could we get a review?

@hwilkes-igalia It looks like this is still marked as WIP but afaik it is not a draft anymore, could you remove the flag?

@hwilkes-igalia
Copy link
Contributor Author

hwilkes-igalia commented Jan 31, 2020

@thiblahute

This looks pretty good to me, could we get a review?

@hwilkes-igalia It looks like this is still marked as WIP but afaik it is not a draft anymore, could you remove the flag?

Thanks for looking through.
I just changed the effect behaviour to write the GES bin-description into the metadata of an otio effect. When converting from otio to xges, we now use this bin-description. If it is not available, we give a warning and use the effect_name attribute of the otio effect as the bin-description.
Prior to this change, I just used the effect_name without a warning. But it is likely that an arbitrary effect_name would not work in GES as a bin-description.

In the future, if otio has standardised the effect names, this will need to be revised so we can properly convert effect_name into a bin description used in GES.

I'll remove the WIP now.

@hwilkes-igalia hwilkes-igalia marked this pull request as ready for review January 31, 2020 12:49
<effect>s and GESTransitionClip <clip>s both have children-properties.
For methods that didn't use the class instance itself and only perform
a supplementary role.
Adding this method reduces repeated code.
xges files that include sub-projects are at least version 0.6. We'll
assume this highest version.
Previously, names found in the otio metadata properties were not checked
to be unique, leaving a window open for two clips to have the same name.
Also, we don't need the project name to be unique.
Moved the clip properties and metadatas to a sub-dictionary within the
otio metadata so that an otio_stack can also store the properties and
metadatas for corresponding xges clip.
Added some tests to ensure properties and metadatas are being correctly
set on xges elements.
Also added some assertions to ensure all clips/assets/layers elements
contain certain attributes.
Added basic support for effects found under xges clips/under otio items.
Moved setting the name and metadata of otio_composables to
_create_otio_composables_from_layer_clips() to reduce repeated code.
Also added some warnings if unsupported track_types are found.
Rename to _otio_reference_from_id to follow the naming convention of
other methods.
Store layer properties and metadatas in otio tracks.
Also namespace the otio tracks (as otio_track, etc) and otio stacks in
XGES, to follow the naming convention, and help distinguish them from
the xges tracks (which are quite different) and the track_type(s).
In particular, the initialization method is now split in two to make it
more explicit. The default initialization accepts the name and fields
arguments as they would be stored internally. For string values, the
new_from_str class method is used for deserializing.

Also:
+ Added the exception DeserializeError.
+ Moved conversions of unicode types in python2 to the function
  unicode_to_str. This should make it easier to remove this step once
  python2 has ended.
+ Added new methods, and use them in the adapters
GstCaps is a schema that holds an array of GstStructures, with each
being associated with some GstCapsFeatures.

The XgesTrack schema now uses GstCaps for the caps attribute.
In addition, the _get_from_caps method in XGES now uses the GstCaps
class to search for the given field.

GstCaps are also used in the GES library for serializing/deserializing
markers, so their inclusion will make it easier to eventually extract
markers from the xges element metadatas attribute.
Add support for finding serialized structures or caps in a GstStructure
string. This allows for nested structures/caps.
Added the GESMarker and GESMarkerList schemas and used them to support
converting xges markers into otio markers, and back.
Convert a track effect to a GESEffectClip that covers all the other
clips in the layer.
Test that clips have the correct layer-priority and have unique ids.
The value and method were unused.
Prepended a '_' to some private methods
This should make it easier to maintain, and for new contributors.
Make sure that unsupported track types found in xges do not cause
problems for the other track types.
Previously, the method would assume that the asset-id stored in the otio
metadata by the xges adapter was sufficient to determine whether the
sub-project found in the otio stack was equivalent. However, the otio
object may be edited in between, which can lead to different
sub-projects. Although, not always.
Also, there was a bug in the previous code that meant a None asset id
was returned by _serialize_stack_to_ressource if the asset id already
existed.
Instead, we now explicitly test whether the corresponding sub-projects are
equivalent, and share the asset id only if they are.

Added a test for these cases.
@ssteinbach ssteinbach merged commit 0421b89 into AcademySoftwareFoundation:master Apr 15, 2020
@tsaunier
Copy link

Thanks :-)

andrewmoore-nz added a commit to andrewmoore-nz/OpenTimelineIO that referenced this pull request Apr 19, 2020
* master: (23 commits)
  Indicate Empty track in otioview and display track name (AcademySoftwareFoundation#677)
  FCP 7 XML - Fix failure on empty name tags (AcademySoftwareFoundation#674)
  xges: Effects and Markers Support (AcademySoftwareFoundation#609)
  Add List of Supported Formats to Conform.py Help Text (AcademySoftwareFoundation#676)
  Update Copyright/License on ffmpeg_burnins.py (AcademySoftwareFoundation#679)
  Fix the windows build (AcademySoftwareFoundation#669)
  Version bump to beta 13
  Set final version for beta 12.0 (AcademySoftwareFoundation#665)
  Rodeofx fix cmx 3600 multiple markers per clip issue 593 (AcademySoftwareFoundation#664)
  Tweaks to cmake so that pip and local builds both work (AcademySoftwareFoundation#663)
  Fixed issue where CMX3600 adapter would try to add the same clip to multiple tracks. Also moved some code out of a loop it didn't need to be in. (AcademySoftwareFoundation#644)
  RV adapter metadata updates (AcademySoftwareFoundation#640)
  Expose json indent to the otio_json adapter (AcademySoftwareFoundation#641)
  fix otioconvert for Kdenlive with python3 (AcademySoftwareFoundation#646)
  Add basic debugging instructions to quickstart. (AcademySoftwareFoundation#655)
  Add kdenlive adapter to adapters list. (AcademySoftwareFoundation#661)
  Timecode rate is ignored (AcademySoftwareFoundation#612)
  Detect if plugin doesn't have a docstring and return an error which says which plugin it is that doesn't have the docstring. (AcademySoftwareFoundation#635)
  Add hook function args to otioview and otioconvert (AcademySoftwareFoundation#651)
  Updating Copyright notices (AcademySoftwareFoundation#660)
  ...

# Conflicts:
#	contrib/opentimelineio_contrib/adapters/advanced_authoring_format.py
#	src/py-opentimelineio/opentimelineio/adapters/fcp_xml.py
@ssteinbach ssteinbach added this to the Public Beta 13 milestone Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants