Skip to content
Closed
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ htmlcov
# These files are generated, don't put them into source control
docs/api
.tox

# cmake & inst
inst
CMakeFiles
CMakeCache.txt

33 changes: 33 additions & 0 deletions src/swift-opentimelineio/Demo app/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//
// AppDelegate.swift
// Demo app
//
// Created by Julian Yu-Chung Chen on 4/26/19.
//

import Cocoa

import OTIO_Swift

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {



func applicationDidFinishLaunching(_ aNotification: Notification) {

NSLog("---> [DEBUG] \(type(of: self)): \(#function)#\(#line): Hello OTIO!")

let t1 = RationalTime(value: 30.2)
let t2 = RationalTime(value: 30.2)

NSLog("---> [OTIO] \(type(of: self)): \(#function)#\(#line): times: \(t1) and \(t2)")
}

func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"images" : [
{
"idiom" : "mac",
"size" : "16x16",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "16x16",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "32x32",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "32x32",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "128x128",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "128x128",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "256x256",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "256x256",
"scale" : "2x"
},
{
"idiom" : "mac",
"size" : "512x512",
"scale" : "1x"
},
{
"idiom" : "mac",
"size" : "512x512",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
717 changes: 717 additions & 0 deletions src/swift-opentimelineio/Demo app/Base.lproj/Main.storyboard

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/swift-opentimelineio/Demo app/Demo_app.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
</dict>
</plist>
30 changes: 30 additions & 0 deletions src/swift-opentimelineio/Demo app/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
26 changes: 26 additions & 0 deletions src/swift-opentimelineio/Demo app/ViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// ViewController.swift
// Demo app
//
// Created by Julian Yu-Chung Chen on 4/26/19.
//

import Cocoa

class ViewController: NSViewController {

override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
}

override var representedObject: Any? {
didSet {
// Update the view, if already loaded.
}
}


}

4 changes: 2 additions & 2 deletions src/swift-opentimelineio/Gap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Gap : Item {
public convenience init<ST : Sequence>(name: String? = nil,
sourceRange: TimeRange? = nil,
effects: [Effect]? = nil,
markers: [Marker]? = nil,
markers: [MMarker]? = nil,
metadata: ST? = nil) where ST.Element == Metadata.Dictionary.Element {
self.init()
metadataInit(name, metadata)
Expand All @@ -30,7 +30,7 @@ public class Gap : Item {
public convenience init(name: String? = nil,
sourceRange: TimeRange? = nil,
effects: [Effect]? = nil,
markers: [Marker]? = nil) {
markers: [MMarker]? = nil) {
self.init(name: name, sourceRange: sourceRange, effects: effects, markers: markers,
metadata: Metadata.Dictionary.none)
}
Expand Down
8 changes: 4 additions & 4 deletions src/swift-opentimelineio/Item.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class Item : Composable {
public convenience init<ST : Sequence>(name: String? = nil,
sourceRange: TimeRange? = nil,
effects: [Effect]? = nil,
markers: [Marker]? = nil,
markers: [MMarker]? = nil,
metadata: ST? = nil) where ST.Element == Metadata.Dictionary.Element {
self.init()
metadataInit(name, metadata)
Expand All @@ -34,7 +34,7 @@ public class Item : Composable {
public convenience init(name: String? = nil,
sourceRange: TimeRange? = nil,
effects: [Effect]? = nil,
markers: [Marker]? = nil) {
markers: [MMarker]? = nil) {
self.init(name: name, sourceRange: sourceRange, effects: effects, markers: markers,
metadata: Metadata.Dictionary.none)
}
Expand All @@ -57,9 +57,9 @@ public class Item : Composable {
lazy var _markersProperty = { create_item_markers_vector_property(self) }()
lazy var _effectsProperty = { create_item_effects_vector_property(self) }()

public var markers: SerializableObject.Vector<Marker> {
public var markers: SerializableObject.Vector<MMarker> {
get {
return SerializableObject.Vector<Marker>(_markersProperty)
return SerializableObject.Vector<MMarker>(_markersProperty)
}
set {
_markersProperty.copyContents(newValue.cxxVectorProperty)
Expand Down
2 changes: 1 addition & 1 deletion src/swift-opentimelineio/Marker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import Foundation

public class Marker : SerializableObjectWithMetadata {
public class MMarker : SerializableObjectWithMetadata {
override public init() {
super.init(otio_new_marker())
}
Expand Down
22 changes: 22 additions & 0 deletions src/swift-opentimelineio/OTIO-Swift/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>
20 changes: 20 additions & 0 deletions src/swift-opentimelineio/OTIO-Swift/OTIO_Swift.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// OTIO_Swift.h
// OTIO-Swift
//
// Created by Julian Yu-Chung Chen on 4/26/19.
//

#import <Cocoa/Cocoa.h>

//! Project version number for OTIO_Swift.
FOUNDATION_EXPORT double OTIO_SwiftVersionNumber;

//! Project version string for OTIO_Swift.
FOUNDATION_EXPORT const unsigned char OTIO_SwiftVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <OTIO_Swift/PublicHeader.h>

#import "errorStruct.h"
#import "opentime.h"
#import "opentimelineio.h"
22 changes: 22 additions & 0 deletions src/swift-opentimelineio/OTIO-SwiftTests/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Loading