Skip to content

Commit 153800d

Browse files
authored
Merge pull request #28 from Synopsis/development
Development
2 parents 16fcd26 + 4e9b050 commit 153800d

File tree

4 files changed

+105
-8
lines changed

4 files changed

+105
-8
lines changed

OpenTimelineIO-Sample/OpenTimelineIO-Reader.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
179179
CODE_SIGN_ENTITLEMENTS = "OpenTimelineIO-Reader/OpenTimelineIO_Reader.entitlements";
180180
CODE_SIGN_STYLE = Automatic;
181-
CURRENT_PROJECT_VERSION = 3;
181+
CURRENT_PROJECT_VERSION = 4;
182182
DEVELOPMENT_ASSET_PATHS = "\"OpenTimelineIO-Reader/Preview Content\"";
183183
DEVELOPMENT_TEAM = SHG3AW6YV7;
184184
ENABLE_HARDENED_RUNTIME = YES;
@@ -201,7 +201,7 @@
201201
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
202202
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
203203
MACOSX_DEPLOYMENT_TARGET = 13.5;
204-
MARKETING_VERSION = "1.0 Beta 3";
204+
MARKETING_VERSION = "1.0 Beta 4";
205205
PRODUCT_BUNDLE_IDENTIFIER = "ai.ozu.OpenTimelineIO-Reader";
206206
PRODUCT_NAME = "$(TARGET_NAME)";
207207
SDKROOT = auto;
@@ -220,7 +220,7 @@
220220
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
221221
CODE_SIGN_ENTITLEMENTS = "OpenTimelineIO-Reader/OpenTimelineIO_Reader.entitlements";
222222
CODE_SIGN_STYLE = Automatic;
223-
CURRENT_PROJECT_VERSION = 3;
223+
CURRENT_PROJECT_VERSION = 4;
224224
DEVELOPMENT_ASSET_PATHS = "\"OpenTimelineIO-Reader/Preview Content\"";
225225
DEVELOPMENT_TEAM = SHG3AW6YV7;
226226
ENABLE_HARDENED_RUNTIME = YES;
@@ -243,7 +243,7 @@
243243
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
244244
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
245245
MACOSX_DEPLOYMENT_TARGET = 13.5;
246-
MARKETING_VERSION = "1.0 Beta 3";
246+
MARKETING_VERSION = "1.0 Beta 4";
247247
PRODUCT_BUNDLE_IDENTIFIER = "ai.ozu.OpenTimelineIO-Reader";
248248
PRODUCT_NAME = "$(TARGET_NAME)";
249249
SDKROOT = auto;
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1600"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES"
8+
buildArchitectures = "Automatic">
9+
<BuildActionEntries>
10+
<BuildActionEntry
11+
buildForTesting = "YES"
12+
buildForRunning = "YES"
13+
buildForProfiling = "YES"
14+
buildForArchiving = "YES"
15+
buildForAnalyzing = "YES">
16+
<BuildableReference
17+
BuildableIdentifier = "primary"
18+
BlueprintIdentifier = "1B25C3E62CA5E11100815620"
19+
BuildableName = "OpenTimelineIO-Reader.app"
20+
BlueprintName = "OpenTimelineIO-Reader"
21+
ReferencedContainer = "container:OpenTimelineIO-Reader.xcodeproj">
22+
</BuildableReference>
23+
</BuildActionEntry>
24+
</BuildActionEntries>
25+
</BuildAction>
26+
<TestAction
27+
buildConfiguration = "Debug"
28+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
29+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
30+
shouldUseLaunchSchemeArgsEnv = "YES"
31+
shouldAutocreateTestPlan = "YES">
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "1B25C3E62CA5E11100815620"
48+
BuildableName = "OpenTimelineIO-Reader.app"
49+
BlueprintName = "OpenTimelineIO-Reader"
50+
ReferencedContainer = "container:OpenTimelineIO-Reader.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "1B25C3E62CA5E11100815620"
65+
BuildableName = "OpenTimelineIO-Reader.app"
66+
BlueprintName = "OpenTimelineIO-Reader"
67+
ReferencedContainer = "container:OpenTimelineIO-Reader.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

Sources/OpenTimelineIO-AVFoundation/OpenTimelineIO-Extensions/Clip.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ extension Clip
4343

4444
var minFrameDuration:RationalTime? = nil
4545
if let videoTrack = asset.tracks(withMediaType: .video).first,
46-
rescaleToAsset
46+
rescaleToAsset,
47+
videoTrack.minFrameDuration.isValid,
48+
videoTrack.minFrameDuration != .zero
4749
{
4850
minFrameDuration = videoTrack.minFrameDuration.toOTIORationalTime()
4951
}

Sources/OpenTimelineIO-AVFoundation/OpenTimelineIO-Extensions/ExternalReference.swift

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,23 @@ extension ExternalReference
8181
return self.tryLoadAssetAtResolvedURL(url: sourceURL)
8282
}
8383
}
84+
85+
// edge case -
86+
// if a OTIO file was packaged with media but paths werent linked, we should check CWD for the file
87+
// as a last case attempt.
88+
if let filename = path.components(separatedBy: "/").last
89+
{
90+
let newFileURL = baseURL.appending(component: filename)
91+
92+
return self.tryLoadAssetAtResolvedURL(url: newFileURL)
93+
}
94+
95+
8496
}
8597

98+
99+
100+
86101
let missingMediaURL = Bundle.main.url(forResource: "MediaNotFound", withExtension: "mp4")!
87102

88103
return AVURLAsset(url: missingMediaURL)
@@ -102,7 +117,9 @@ extension ExternalReference
102117
supported = true
103118
case "m4v":
104119
supported = true
105-
120+
case "mxf":
121+
supported = true
122+
106123

107124
case "m4a":
108125
supported = true
@@ -120,12 +137,12 @@ extension ExternalReference
120137

121138
if supported
122139
{
123-
return AVURLAsset(url: url)
140+
return AVURLAsset(url: url, options: [AVURLAssetPreferPreciseDurationAndTimingKey : true])
124141
}
125142

126143
let notSupportedMedia = Bundle.main.url(forResource: "MediaNotSupported", withExtension: "mp4")!
127144

128-
return AVURLAsset(url: notSupportedMedia)
145+
return AVURLAsset(url: notSupportedMedia, options: [AVURLAssetPreferPreciseDurationAndTimingKey : true])
129146

130147
}
131148

0 commit comments

Comments
 (0)