diff --git a/Tests/MarkersExtractorTests/BasicMarkersOutOfClipBoundsTests.swift b/Tests/MarkersExtractorTests/BasicMarkersOutOfClipBoundsTests.swift index 96f7095..de3c0b2 100644 --- a/Tests/MarkersExtractorTests/BasicMarkersOutOfClipBoundsTests.swift +++ b/Tests/MarkersExtractorTests/BasicMarkersOutOfClipBoundsTests.swift @@ -6,6 +6,7 @@ import XCTest @testable import MarkersExtractor +import DAWFileKit import TimecodeKit final class BasicMarkersOutOfClipBoundsTests: XCTestCase { @@ -25,22 +26,26 @@ final class BasicMarkersOutOfClipBoundsTests: XCTestCase { let fr: TimecodeFrameRate = .fps25 let clip1ParentInfo = Marker.ParentInfo( + clipType: FinalCutPro.FCPXML.ClipType.assetClip.name, clipName: "Marker Test", clipFilename: "Marker Test.m4v", clipInTime: tc("00:00:00:00", at: fr), clipOutTime: tc("00:00:20:20", at: fr), eventName: "Test Event", projectName: "Out of Bounds Markers", + projectStartTime: tc("00:00:00:00", at: fr), libraryName: "MyLibrary" ) let clip2ParentInfo = Marker.ParentInfo( + clipType: FinalCutPro.FCPXML.ClipType.assetClip.name, clipName: "Marker Test", clipFilename: "Marker Test.m4v", clipInTime: tc("00:00:20:20", at: fr), clipOutTime: tc("00:00:41:15", at: fr), eventName: "Test Event", projectName: "Out of Bounds Markers", + projectStartTime: tc("00:00:00:00", at: fr), libraryName: "MyLibrary" ) diff --git a/Tests/MarkersExtractorTests/BasicMarkersTests.swift b/Tests/MarkersExtractorTests/BasicMarkersTests.swift index 58e7e79..56e00bd 100644 --- a/Tests/MarkersExtractorTests/BasicMarkersTests.swift +++ b/Tests/MarkersExtractorTests/BasicMarkersTests.swift @@ -6,6 +6,7 @@ import XCTest @testable import MarkersExtractor +import DAWFileKit import TimecodeKit final class BasicMarkersTests: XCTestCase { @@ -31,12 +32,14 @@ final class BasicMarkersTests: XCTestCase { let fr: TimecodeFrameRate = .fps29_97 let parentInfo = Marker.ParentInfo( + clipType: FinalCutPro.FCPXML.ClipType.title.name, clipName: "Basic Title", clipFilename: "", clipInTime: tc("00:00:00:00", at: fr), clipOutTime: tc("00:01:03:29", at: fr), eventName: "Test Event", projectName: "Test Project", + projectStartTime: tc("00:00:00:00", at: fr), libraryName: "MyLibrary" ) diff --git a/Tests/MarkersExtractorTests/MarkersExtractorTests.swift b/Tests/MarkersExtractorTests/MarkersExtractorTests.swift index 2fc5064..26a1bfa 100644 --- a/Tests/MarkersExtractorTests/MarkersExtractorTests.swift +++ b/Tests/MarkersExtractorTests/MarkersExtractorTests.swift @@ -6,6 +6,7 @@ import XCTest @testable import MarkersExtractor +import DAWFileKit import TimecodeKit final class MarkersExtractorTests: XCTestCase { @@ -26,12 +27,14 @@ final class MarkersExtractorTests: XCTestCase { roles: .init(video: "Video", audio: ""), position: tc(position, at: .fps24), parentInfo: .init( + clipType: FinalCutPro.FCPXML.ClipType.video.name, clipName: "Some Clip", clipFilename: "", clipInTime: tc("00:00:00:00", at: .fps24), clipOutTime: tc("01:00:00:00", at: .fps24), eventName: "Some Event", - projectName: "MyProject", + projectName: "MyProject", + projectStartTime: tc("01:00:00:00", at: .fps24), libraryName: "MyLibrary" ) ) @@ -80,12 +83,14 @@ final class MarkersExtractorTests: XCTestCase { roles: .init(video: "Video", audio: ""), position: tc(position, at: .fps24), parentInfo: .init( + clipType: FinalCutPro.FCPXML.ClipType.video.name, clipName: "Some Clip", clipFilename: "", clipInTime: tc("00:00:00:00", at: .fps24), clipOutTime: tc("01:00:00:00", at: .fps24), eventName: "Some Event", projectName: "MyProject", + projectStartTime: tc("01:00:00:00", at: .fps24), libraryName: "MyLibrary" ) ) diff --git a/Tests/MarkersExtractorTests/ProgressTests.swift b/Tests/MarkersExtractorTests/ProgressTests.swift index 4f6bb37..7589a8c 100644 --- a/Tests/MarkersExtractorTests/ProgressTests.swift +++ b/Tests/MarkersExtractorTests/ProgressTests.swift @@ -30,7 +30,12 @@ final class ProgressTests: XCTestCase { let videoPlaceholder = try TemporaryMediaFile(withData: videoData) let range = tc("00:00:00:00", at: .fps24) ... tc("00:00:00:10", at: .fps24) let descriptors: [ImageDescriptor] = range.map { - ImageDescriptor(timecode: $0, filename: UUID().uuidString, label: nil) + ImageDescriptor( + absoluteTimecode: $0, + offsetFromVideoStart: $0, + filename: UUID().uuidString, + label: nil + ) } let outputFolder = FileManager.default.temporaryDirectory let outputFile = outputFolder.appendingPathComponent(UUID().uuidString + ".gif") @@ -76,7 +81,12 @@ final class ProgressTests: XCTestCase { let videoPlaceholder = try TemporaryMediaFile(withData: videoData) let range = tc("00:00:00:00", at: .fps24) ... tc("00:00:00:10", at: .fps24) let descriptors: [ImageDescriptor] = range.map { - ImageDescriptor(timecode: $0, filename: UUID().uuidString, label: nil) + ImageDescriptor( + absoluteTimecode: $0, + offsetFromVideoStart: $0, + filename: UUID().uuidString, + label: nil + ) } let outputFolder = FileManager.default.temporaryDirectory