Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAFReader: Added kind support for auxiliary AAF tracks (#28) #27

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/otio_aaf_adapter/adapters/advanced_authoring_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,8 @@ def _transcribe(item, parents, edit_rate, indent=0):
elif media_kind in ("SoundMasterTrack", "Sound"):
result.kind = otio.schema.TrackKind.Audio
else:
# Timecode, Edgecode, others?
result.kind = ""
# Timecode, Edgecode, Data, ...
result.kind = f"AAF_{media_kind}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, here are the DataDefs that drive the media kind that's used from @markreidvfx


# Done!
return result
Expand Down
Binary file added tests/sample_data/avid_data_track_example.aaf
Binary file not shown.
11 changes: 11 additions & 0 deletions tests/test_aaf_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@
"marker-over-audio.aaf"
)

AVID_DATA_TRACK_EXAMPLE_PATH = os.path.join(
SAMPLE_DATA_DIR,
"avid_data_track_example.aaf"
)


try:
lib_path = os.environ.get("OTIO_AAF_PYTHON_LIB")
Expand Down Expand Up @@ -1547,6 +1552,12 @@ def get_expected_dict(timeline):
self.assertEqual(get_expected_dict(tl_unbaked), expected_unbaked)
self.assertEqual(get_expected_dict(tl_baked), expected_baked)

def test_non_av_track_kind(self):
timeline = otio.adapters.read_from_file(AVID_DATA_TRACK_EXAMPLE_PATH)
self.assertEqual([t.kind for t in timeline.tracks],
["Video", "AAF_DataEssenceTrack"]
)


class AAFWriterTests(unittest.TestCase):
def test_aaf_writer_gaps(self):
Expand Down