Conversion to AVKit more or less works

This commit is contained in:
Matthias Neeracher 2016-10-03 03:26:35 +02:00
parent 0fb5718725
commit e3fb8d3425
20 changed files with 697 additions and 4589 deletions

View File

@ -7,6 +7,8 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
950737F11D5FAA0F00737CDE /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 950737F01D5FAA0F00737CDE /* AVFoundation.framework */; };
950737F31D5FAA1600737CDE /* AVKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 950737F21D5FAA1600737CDE /* AVKit.framework */; };
950BB66B13F1F26200D8E669 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 950BB66A13F1F26200D8E669 /* Cocoa.framework */; }; 950BB66B13F1F26200D8E669 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 950BB66A13F1F26200D8E669 /* Cocoa.framework */; };
950BB67513F1F26200D8E669 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 950BB67313F1F26200D8E669 /* InfoPlist.strings */; }; 950BB67513F1F26200D8E669 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 950BB67313F1F26200D8E669 /* InfoPlist.strings */; };
950BB67713F1F26200D8E669 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 950BB67613F1F26200D8E669 /* main.m */; }; 950BB67713F1F26200D8E669 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 950BB67613F1F26200D8E669 /* main.m */; };
@ -16,7 +18,6 @@
950BB68413F1F26200D8E669 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 950BB68213F1F26200D8E669 /* MainMenu.xib */; }; 950BB68413F1F26200D8E669 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 950BB68213F1F26200D8E669 /* MainMenu.xib */; };
950BB68713F1F26200D8E669 /* MADocument.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 950BB68513F1F26200D8E669 /* MADocument.xcdatamodeld */; }; 950BB68713F1F26200D8E669 /* MADocument.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 950BB68513F1F26200D8E669 /* MADocument.xcdatamodeld */; };
950BB68F13F1F29D00D8E669 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 950BB68D13F1F29D00D8E669 /* CoreData.framework */; }; 950BB68F13F1F29D00D8E669 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 950BB68D13F1F29D00D8E669 /* CoreData.framework */; };
950BB69013F1F29D00D8E669 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 950BB68E13F1F29D00D8E669 /* QTKit.framework */; };
950BB69A13F2C6B400D8E669 /* MATag.mm in Sources */ = {isa = PBXBuildFile; fileRef = 950BB69913F2C6B400D8E669 /* MATag.mm */; }; 950BB69A13F2C6B400D8E669 /* MATag.mm in Sources */ = {isa = PBXBuildFile; fileRef = 950BB69913F2C6B400D8E669 /* MATag.mm */; };
950BB69D13F2C6B400D8E669 /* MAAnno.mm in Sources */ = {isa = PBXBuildFile; fileRef = 950BB69C13F2C6B400D8E669 /* MAAnno.mm */; }; 950BB69D13F2C6B400D8E669 /* MAAnno.mm in Sources */ = {isa = PBXBuildFile; fileRef = 950BB69C13F2C6B400D8E669 /* MAAnno.mm */; };
950BB6A013F2C6B400D8E669 /* MAMedia.mm in Sources */ = {isa = PBXBuildFile; fileRef = 950BB69F13F2C6B400D8E669 /* MAMedia.mm */; }; 950BB6A013F2C6B400D8E669 /* MAMedia.mm in Sources */ = {isa = PBXBuildFile; fileRef = 950BB69F13F2C6B400D8E669 /* MAMedia.mm */; };
@ -50,6 +51,8 @@
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
950737F01D5FAA0F00737CDE /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
950737F21D5FAA1600737CDE /* AVKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVKit.framework; path = System/Library/Frameworks/AVKit.framework; sourceTree = SDKROOT; };
950BB66613F1F26200D8E669 /* Medianno.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Medianno.app; sourceTree = BUILT_PRODUCTS_DIR; }; 950BB66613F1F26200D8E669 /* Medianno.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Medianno.app; sourceTree = BUILT_PRODUCTS_DIR; };
950BB66A13F1F26200D8E669 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 950BB66A13F1F26200D8E669 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
950BB67213F1F26200D8E669 /* Medianno-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Medianno-Info.plist"; sourceTree = "<group>"; }; 950BB67213F1F26200D8E669 /* Medianno-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Medianno-Info.plist"; sourceTree = "<group>"; };
@ -63,7 +66,6 @@
950BB68313F1F26200D8E669 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; }; 950BB68313F1F26200D8E669 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
950BB68613F1F26200D8E669 /* MADocument.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MADocument.xcdatamodel; sourceTree = "<group>"; }; 950BB68613F1F26200D8E669 /* MADocument.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MADocument.xcdatamodel; sourceTree = "<group>"; };
950BB68D13F1F29D00D8E669 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 950BB68D13F1F29D00D8E669 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
950BB68E13F1F29D00D8E669 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = System/Library/Frameworks/QTKit.framework; sourceTree = SDKROOT; };
950BB69813F2C6B400D8E669 /* MATag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MATag.h; sourceTree = "<group>"; }; 950BB69813F2C6B400D8E669 /* MATag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MATag.h; sourceTree = "<group>"; };
950BB69913F2C6B400D8E669 /* MATag.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MATag.mm; sourceTree = "<group>"; }; 950BB69913F2C6B400D8E669 /* MATag.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MATag.mm; sourceTree = "<group>"; };
950BB69B13F2C6B400D8E669 /* MAAnno.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MAAnno.h; sourceTree = "<group>"; }; 950BB69B13F2C6B400D8E669 /* MAAnno.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MAAnno.h; sourceTree = "<group>"; };
@ -116,8 +118,9 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
950737F31D5FAA1600737CDE /* AVKit.framework in Frameworks */,
950737F11D5FAA0F00737CDE /* AVFoundation.framework in Frameworks */,
950BB68F13F1F29D00D8E669 /* CoreData.framework in Frameworks */, 950BB68F13F1F29D00D8E669 /* CoreData.framework in Frameworks */,
950BB69013F1F29D00D8E669 /* QTKit.framework in Frameworks */,
950BB66B13F1F26200D8E669 /* Cocoa.framework in Frameworks */, 950BB66B13F1F26200D8E669 /* Cocoa.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
@ -145,8 +148,9 @@
950BB66913F1F26200D8E669 /* Frameworks */ = { 950BB66913F1F26200D8E669 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
950737F21D5FAA1600737CDE /* AVKit.framework */,
950737F01D5FAA0F00737CDE /* AVFoundation.framework */,
950BB68D13F1F29D00D8E669 /* CoreData.framework */, 950BB68D13F1F29D00D8E669 /* CoreData.framework */,
950BB68E13F1F29D00D8E669 /* QTKit.framework */,
950BB66A13F1F26200D8E669 /* Cocoa.framework */, 950BB66A13F1F26200D8E669 /* Cocoa.framework */,
); );
name = Frameworks; name = Frameworks;
@ -505,11 +509,11 @@
950BB68B13F1F26200D8E669 /* Debug */ = { 950BB68B13F1F26200D8E669 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
GCC_ENABLE_OBJC_GC = unsupported; GCC_ENABLE_OBJC_GC = unsupported;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Medianno/Medianno-Prefix.pch"; GCC_PREFIX_HEADER = "Medianno/Medianno-Prefix.pch";
INFOPLIST_FILE = "Medianno/Medianno-Info.plist"; INFOPLIST_FILE = "Medianno/Medianno-Info.plist";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_BUNDLE_IDENTIFIER = "org.aereperennius.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_BUNDLE_IDENTIFIER = "org.aereperennius.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx; SDKROOT = macosx;
@ -520,11 +524,11 @@
950BB68C13F1F26200D8E669 /* Release */ = { 950BB68C13F1F26200D8E669 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
GCC_ENABLE_OBJC_GC = unsupported; GCC_ENABLE_OBJC_GC = unsupported;
GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Medianno/Medianno-Prefix.pch"; GCC_PREFIX_HEADER = "Medianno/Medianno-Prefix.pch";
INFOPLIST_FILE = "Medianno/Medianno-Info.plist"; INFOPLIST_FILE = "Medianno/Medianno-Info.plist";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_BUNDLE_IDENTIFIER = "org.aereperennius.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_BUNDLE_IDENTIFIER = "org.aereperennius.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx; SDKROOT = macosx;

View File

@ -50,7 +50,6 @@ static NSDictionary * sDateHypotheses;
{ {
[self window]; [self window];
[self willChangeValueForKey:@"dateFormats"]; [self willChangeValueForKey:@"dateFormats"];
[dateFormats release];
dateFormats = nil; dateFormats = nil;
while ([dateFormatMenu numberOfItems] > 2) while ([dateFormatMenu numberOfItems] > 2)
[dateFormatMenu removeItemAtIndex:2]; [dateFormatMenu removeItemAtIndex:2];
@ -104,7 +103,7 @@ static NSDictionary * sDateHypotheses;
} }
} }
if ([formats count] > 0) if ([formats count] > 0)
dateFormats = [formats retain]; dateFormats = formats;
[self didChangeValueForKey:@"dateFormats"]; [self didChangeValueForKey:@"dateFormats"];
} }
@ -116,7 +115,7 @@ static NSDictionary * sDateHypotheses;
[m addObject:[NSMutableDictionary dictionaryWithObject:url forKey:@"url"]]; [m addObject:[NSMutableDictionary dictionaryWithObject:url forKey:@"url"]];
media = m; media = m;
[self useModificationDates:self]; [self useModificationDates:self];
[NSApp beginSheet:[self window] modalForWindow:[parent window] didEndBlock:^(NSInteger returnCode) { [[parent window] beginSheet:[self window] completionHandler:^(NSModalResponse returnCode) {
if (returnCode == NSAlertFirstButtonReturn) { if (returnCode == NSAlertFirstButtonReturn) {
MADocument * doc = [parent document]; MADocument * doc = [parent document];
[media enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { [media enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
@ -127,8 +126,6 @@ static NSDictionary * sDateHypotheses;
}]; }];
} }
[[self window] orderOut:self]; [[self window] orderOut:self];
[self autorelease];
[media release];
media = nil; media = nil;
}]; }];
} }

View File

@ -8,21 +8,19 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <CoreData/CoreData.h> #import <CoreData/CoreData.h>
#import <QTKit/QTKit.h>
@class MATag; @class MATag;
@class MAMedia; @class MAMedia;
@class MADocument; @class MADocument;
@interface MAAnno : NSManagedObject { @interface MAAnno : NSManagedObject {
@private
} }
@property (nonatomic, retain) NSString * location; @property (nonatomic, retain) NSString * location;
@property (nonatomic, retain) NSString * notes; @property (nonatomic, retain) NSString * notes;
@property (nonatomic, retain) NSSet *tags; @property (nonatomic, retain) NSSet *tags;
@property (nonatomic, retain) NSManagedObject *media; @property (nonatomic, retain) NSManagedObject *media;
- (QTTime)qtLocation; - (CFTimeInterval)avLocation;
- (NSString *)exportText; - (NSString *)exportText;
- (MAAnno *)copyToDocument:(MADocument *)doc withMedia:(MAMedia *)media; - (MAAnno *)copyToDocument:(MADocument *)doc withMedia:(MAMedia *)media;

View File

@ -10,6 +10,7 @@
#import "MATag.h" #import "MATag.h"
#import "MATagDescription.h" #import "MATagDescription.h"
#import "MADocument.h" #import "MADocument.h"
#import "MAShortenQTTime.h"
#import <vector> #import <vector>
@ -33,20 +34,14 @@
- (id)initWithArray:(NSArray *)array - (id)initWithArray:(NSArray *)array
{ {
contents = [array retain]; contents = array;
return self; return self;
} }
- (void)dealloc
{
[contents release];
[super dealloc];
}
+ (id)arrayWithArray:(NSArray *)array + (id)arrayWithArray:(NSArray *)array
{ {
return [[[MANotAnArray alloc] initWithArray:array] autorelease]; return [[MANotAnArray alloc] initWithArray:array];
} }
- (BOOL)isEqual:(id)object - (BOOL)isEqual:(id)object
@ -76,9 +71,9 @@
@dynamic tags; @dynamic tags;
@dynamic media; @dynamic media;
- (QTTime)qtLocation - (CFTimeInterval)avLocation;
{ {
return QTTimeFromString(self.location); return MATimeFromString(self.location);
} }
- (NSArray *)tagDescriptions - (NSArray *)tagDescriptions
@ -126,7 +121,7 @@
- (MAAnno *)copyToDocument:(MADocument *)doc withMedia:(MAMedia *)media; - (MAAnno *)copyToDocument:(MADocument *)doc withMedia:(MAMedia *)media;
{ {
MAAnno * anno = [doc addAnnotationForMedia:media location:QTTimeFromString(self.location)]; MAAnno * anno = [doc addAnnotationForMedia:media location:MATimeFromString(self.location)];
anno.notes = self.notes; anno.notes = self.notes;
NSMutableArray * tagDescs = [NSMutableArray array]; NSMutableArray * tagDescs = [NSMutableArray array];
for (MATagDescription * tag in self.tagDescriptions) for (MATagDescription * tag in self.tagDescriptions)

View File

@ -12,14 +12,6 @@
@class MAMovieWindow; @class MAMovieWindow;
@class MATagWindow; @class MATagWindow;
typedef void (^MASheetBlock)(NSInteger returnCode);
@interface NSApplication (SheetAdditions)
- (void)beginSheet: (NSWindow *)sheet modalForWindow:(NSWindow *)docWindow didEndBlock: (MASheetBlock)block;
@end
@interface MAAppController : NSObject <NSApplicationDelegate> { @interface MAAppController : NSObject <NSApplicationDelegate> {
} }

View File

@ -18,23 +18,3 @@
} }
@end @end
@implementation NSApplication (SheetAdditions)
- (void)beginSheet: (NSWindow *)sheet modalForWindow:(NSWindow *)docWindow didEndBlock: (MASheetBlock)block
{
[self beginSheet: sheet
modalForWindow: docWindow
modalDelegate: self
didEndSelector: @selector(my_blockSheetDidEnd:returnCode:contextInfo:)
contextInfo: Block_copy(block)];
}
- (void)my_blockSheetDidEnd: (NSWindow *)sheet returnCode: (NSInteger)returnCode contextInfo: (void *)contextInfo
{
MASheetBlock block = (MASheetBlock)contextInfo;
block(returnCode);
Block_release(block);
}
@end

View File

@ -7,8 +7,7 @@
// //
#import "MAColorForURL.h" #import "MAColorForURL.h"
#import <AVFoundation/AVFoundation.h>
#import <QTKit/QTKit.h>
@implementation MAColorForURL @implementation MAColorForURL
@ -25,7 +24,7 @@
- (id)transformedValue:(id)value - (id)transformedValue:(id)value
{ {
NSURL * mediaURL = [NSURL URLWithString:value]; NSURL * mediaURL = [NSURL URLWithString:value];
if ([QTMovie canInitWithURL:mediaURL]) if ([[AVAsset assetWithURL:mediaURL] isPlayable])
return [NSColor blackColor]; return [NSColor blackColor];
else else
return [NSColor redColor]; return [NSColor redColor];

View File

@ -7,7 +7,8 @@
// //
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <QTKit/QTKit.h> #import <AVKit/AVKit.h>
#import <AVFoundation/AVFoundation.h>
@class MAMovieWindow; @class MAMovieWindow;
@class MAMedia; @class MAMedia;
@ -17,18 +18,18 @@
{ {
IBOutlet NSArrayController* mediaController; IBOutlet NSArrayController* mediaController;
IBOutlet NSArrayController* annotationController; IBOutlet NSArrayController* annotationController;
IBOutlet QTMovieView * movieView; IBOutlet AVPlayerView * movieView;
IBOutlet NSTableView * mediaTable; IBOutlet NSTableView * mediaTable;
IBOutlet NSTableView * annotationTable; IBOutlet NSTableView * annotationTable;
IBOutlet NSView * textExportAccessoryView; IBOutlet NSView * textExportAccessoryView;
QTMovie * currentMovie; AVPlayer * currentMovie;
NSString * currentMovieTitle; NSString * currentMovieTitle;
QTTime lastMovieTime;
} }
@property BOOL exportAnnotations; @property BOOL exportAnnotations;
@property BOOL exportTags; @property BOOL exportTags;
@property (nonatomic,retain)NSString * searchString; @property (nonatomic,retain)NSString * searchString;
@property (readonly) NSNumber * currentMovieTime;
- (IBAction)addMediaFiles:(id)sender; - (IBAction)addMediaFiles:(id)sender;
- (IBAction)importText:(id)sender; - (IBAction)importText:(id)sender;
@ -40,7 +41,6 @@
- (IBAction)mediaSkipForward:(id)sender; - (IBAction)mediaSkipForward:(id)sender;
- (IBAction)toggleMediaPlay:(id)sender; - (IBAction)toggleMediaPlay:(id)sender;
- (IBAction)delete:(id)sender; - (IBAction)delete:(id)sender;
- (QTTime)currentMovieTime;
- (void)moviePanelDidAppear; - (void)moviePanelDidAppear;
- (void)moviePanelDidClose; - (void)moviePanelDidClose;
- (MAMedia *)currentMedia; - (MAMedia *)currentMedia;

View File

@ -6,8 +6,6 @@
// Copyright 2011 Matthias Neeracher. All rights reserved. // Copyright 2011 Matthias Neeracher. All rights reserved.
// //
#import <QTKit/QTKit.h>
#import "MADocWindow.h" #import "MADocWindow.h"
#import "MAAddMediaSheet.h" #import "MAAddMediaSheet.h"
#import "MADocument.h" #import "MADocument.h"
@ -19,6 +17,7 @@
#import "MATagWindow.h" #import "MATagWindow.h"
#import "MAAppController.h" #import "MAAppController.h"
#import "MADragging.h" #import "MADragging.h"
#import "MAShortenQTTime.h"
#include <algorithm> #include <algorithm>
@ -38,19 +37,11 @@ static const char * kMADocWindowObserver = "MADocWindowObserver";
return self; return self;
} }
- (void)dealloc
{
[currentMovie release];
[searchString release];
[super dealloc];
}
- (void)windowDidLoad - (void)windowDidLoad
{ {
[super windowDidLoad]; [super windowDidLoad];
[mediaController setSortDescriptors:[NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"date" ascending:YES]]]; [mediaController setSortDescriptors:[NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"date" ascending:YES]]];
[annotationController setSortDescriptors:[NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"location" ascending:YES]]]; [annotationController setSortDescriptors:[NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"location" ascending:YES]]];
[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(updateMovieTime:) userInfo:nil repeats:YES];
[mediaController addObserver:self forKeyPath:@"selection.media" options:0 context:&kMADocWindowObserver]; [mediaController addObserver:self forKeyPath:@"selection.media" options:0 context:&kMADocWindowObserver];
[mediaController addObserver:self forKeyPath:@"selection.name" options:0 context:&kMADocWindowObserver]; [mediaController addObserver:self forKeyPath:@"selection.name" options:0 context:&kMADocWindowObserver];
[self registerOurDragTypes]; [self registerOurDragTypes];
@ -68,9 +59,9 @@ static const char * kMADocWindowObserver = "MADocWindowObserver";
- (void)moviePanelDidAppear - (void)moviePanelDidAppear
{ {
[movieView setMovie:nil]; [movieView setPlayer:nil];
if (![[self moviePanel] shouldDisplayMovie:currentMovie withTitle:currentMovieTitle]) if (![[self moviePanel] shouldDisplayMovie:currentMovie withTitle:currentMovieTitle])
[movieView setMovie:currentMovie]; [movieView setPlayer:currentMovie];
} }
- (void)windowDidBecomeMain:(NSNotification *)notification - (void)windowDidBecomeMain:(NSNotification *)notification
@ -82,7 +73,7 @@ static const char * kMADocWindowObserver = "MADocWindowObserver";
- (void)moviePanelDidClose - (void)moviePanelDidClose
{ {
[[self moviePanel] shouldDisplayMovie:nil withTitle:@""]; [[self moviePanel] shouldDisplayMovie:nil withTitle:@""];
[movieView setMovie:currentMovie]; [movieView setPlayer:currentMovie];
} }
- (void)windowDidResignMain:(NSNotification *)notification - (void)windowDidResignMain:(NSNotification *)notification
@ -98,17 +89,16 @@ static const char * kMADocWindowObserver = "MADocWindowObserver";
// //
// Current movie changed // Current movie changed
// //
[currentMovie release]; [self willChangeValueForKey:@"currentMovie"];
if (MAMedia * currentMedia = [self currentMedia]) { if (MAMedia * currentMedia = [self currentMedia]) {
NSURL * mediaURL = [NSURL URLWithString:[currentMedia media]]; NSURL * mediaURL = [NSURL URLWithString:[currentMedia media]];
currentMovie = [[QTMovie alloc] initWithURL:mediaURL error:nil]; currentMovie = [AVPlayer playerWithURL:mediaURL];
currentMovieTitle = [currentMedia name]; currentMovieTitle = [currentMedia name];
} else { } else {
currentMovie = nil; currentMovie = nil;
currentMovieTitle = @""; currentMovieTitle = @"";
} }
lastMovieTime = QTMakeTime(-1, 600); [self didChangeValueForKey:@"currentMovie"];
[self updateMovieTime:nil];
} }
[self moviePanelDidAppear]; [self moviePanelDidAppear];
} }
@ -124,25 +114,22 @@ static const char * kMADocWindowObserver = "MADocWindowObserver";
return nil; return nil;
} }
- (QTTime)currentMovieTime + (NSSet *)keyPathsForValuesAffectingCurrentMovieTime
{ {
return [currentMovie currentTime]; return [NSSet setWithObject:@"currentMovie.currentTime"];
} }
- (void)updateMovieTime:(NSTimer *)timer - (NSNumber *)currentMovieTime
{ {
QTTime currentTime = [self currentMovieTime]; CMTime time = [currentMovie currentTime];
if (QTTimeCompare(currentTime, lastMovieTime)) {
[self willChangeValueForKey:@"currentMovieTime"]; return [NSNumber numberWithDouble:(double)time.value/time.timescale];
lastMovieTime = currentTime;
[self didChangeValueForKey:@"currentMovieTime"];
}
} }
- (IBAction)addMediaFiles:(id)sender - (IBAction)addMediaFiles:(id)sender
{ {
NSOpenPanel * openPanel = [NSOpenPanel openPanel]; NSOpenPanel * openPanel = [NSOpenPanel openPanel];
[openPanel setAllowedFileTypes:[QTMovie movieFileTypes:QTIncludeCommonTypes]]; [openPanel setAllowedFileTypes:[AVMovie movieTypes]];
[openPanel setAllowsMultipleSelection:YES]; [openPanel setAllowsMultipleSelection:YES];
[openPanel setCanChooseDirectories:YES]; [openPanel setCanChooseDirectories:YES];
[openPanel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) { [openPanel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) {
@ -180,7 +167,7 @@ static const char * kMADocWindowObserver = "MADocWindowObserver";
NSNumber * isDirectory; NSNumber * isDirectory;
[url getResourceValue:&isDirectory forKey:NSURLIsDirectoryKey error:nil]; [url getResourceValue:&isDirectory forKey:NSURLIsDirectoryKey error:nil];
if ([isDirectory boolValue]) { if ([isDirectory boolValue]) {
[self addMediaTypes:[QTMovie movieFileTypes:QTIncludeCommonTypes] inDirectory:url toList:expandedURLs]; [self addMediaTypes:[AVMovie movieTypes] inDirectory:url toList:expandedURLs];
continue; continue;
} }
} }
@ -189,6 +176,7 @@ static const char * kMADocWindowObserver = "MADocWindowObserver";
[[[MAAddMediaSheet alloc] init] runWithParentWindow:self media:expandedURLs]; [[[MAAddMediaSheet alloc] init] runWithParentWindow:self media:expandedURLs];
} }
#if 0
- (void)exportMediaToURL:(NSURL *)url - (void)exportMediaToURL:(NSURL *)url
{ {
NSIndexSet * selection = [annotationController selectionIndexes]; NSIndexSet * selection = [annotationController selectionIndexes];
@ -257,6 +245,8 @@ static const char * kMADocWindowObserver = "MADocWindowObserver";
}]; }];
} }
#endif
- (void)delete:(id)sender - (void)delete:(id)sender
{ {
NSResponder * responder = [[self window] firstResponder]; NSResponder * responder = [[self window] firstResponder];
@ -275,7 +265,7 @@ static const char * kMADocWindowObserver = "MADocWindowObserver";
- (IBAction)toggleMediaPlay:(id)sender - (IBAction)toggleMediaPlay:(id)sender
{ {
if ([currentMovie rate] > 0.0f) if ([currentMovie rate] > 0.0f)
[currentMovie stop]; [currentMovie pause];
else else
[currentMovie play]; [currentMovie play];
} }
@ -316,7 +306,7 @@ static const char * kMADocWindowObserver = "MADocWindowObserver";
#pragma mark Media navigation #pragma mark Media navigation
static NSTimeInterval sLastSkip = 0.0; static CFTimeInterval sLastSkip = 0.0;
- (void)resetSkipFactor:(id)sender - (void)resetSkipFactor:(id)sender
{ {
@ -325,17 +315,12 @@ static NSTimeInterval sLastSkip = 0.0;
- (void)skipTimeInterval - (void)skipTimeInterval
{ {
QTTime interval = QTMakeTimeWithTimeInterval(fabs(sLastSkip)); CMTime current = [currentMovie currentTime];
QTTime current = [currentMovie currentTime]; current.value += static_cast<CMTimeValue>(sLastSkip*current.timescale);
if (sLastSkip > 0) [currentMovie seekToTime:current];
current = QTTimeIncrement(current, interval);
else
current = QTTimeDecrement(current, interval);
[currentMovie setCurrentTime:current];
sLastSkip *= 1.1; sLastSkip *= 1.1;
[NSRunLoop cancelPreviousPerformRequestsWithTarget:self selector:@selector(resetSkipFactor:) object:self]; [NSRunLoop cancelPreviousPerformRequestsWithTarget:self selector:@selector(resetSkipFactor:) object:self];
[self performSelector:@selector(resetSkipFactor:) withObject:self afterDelay:0.5]; [self performSelector:@selector(resetSkipFactor:) withObject:self afterDelay:0.5];
[self updateMovieTime:nil];
} }
- (IBAction)mediaSkipBackward:(id)sender - (IBAction)mediaSkipBackward:(id)sender
@ -395,15 +380,20 @@ static NSTimeInterval sLastSkip = 0.0;
{ {
NSArray * selection = [annotationController selectedObjects]; NSArray * selection = [annotationController selectedObjects];
if ([selection count]) if ([selection count])
if (MAAnno * firstSelectedAnno = [selection objectAtIndex:0]) if (MAAnno * firstSelectedAnno = [selection objectAtIndex:0]) {
[currentMovie setCurrentTime:[firstSelectedAnno qtLocation]]; CFTimeInterval avLocation = [firstSelectedAnno avLocation];
CMTime newTime = currentMovie.currentTime;
newTime.value = static_cast<CMTimeValue>(avLocation*newTime.timescale);
[currentMovie seekToTime:newTime];
}
} }
- (IBAction)addAnnotation:(id)sender - (IBAction)addAnnotation:(id)sender
{ {
[currentMovie stop]; [currentMovie pause];
QTTime location = [self currentMovieTime]; CMTime time = currentMovie.currentTime;
MAAnno * anno = [[self document] addAnnotationForMedia:[self currentMedia] location:location]; CFTimeInterval loc = static_cast<CFTimeInterval>(time.value)/time.timescale;
MAAnno * anno = [[self document] addAnnotationForMedia:[self currentMedia] location:loc];
[annotationController setSelectedObjects:[NSArray arrayWithObject:anno]]; [annotationController setSelectedObjects:[NSArray arrayWithObject:anno]];
[annotationTable editColumn:[annotationTable columnWithIdentifier:@"tags"] [annotationTable editColumn:[annotationTable columnWithIdentifier:@"tags"]
row:[annotationController selectionIndex] row:[annotationController selectionIndex]
@ -484,8 +474,8 @@ static NSTimeInterval sLastSkip = 0.0;
} else if (nextIsTag) { } else if (nextIsTag) {
if (!media) if (!media)
break; break;
QTTime location= QTTimeFromString([components objectAtIndex:0]); CFTimeInterval location = MATimeFromString([components objectAtIndex:0]);
MAAnno * anno = [doc addAnnotationForMedia:media location:location]; MAAnno * anno = [doc addAnnotationForMedia:media location:location];
[anno setNotes:[components objectAtIndex:1]]; [anno setNotes:[components objectAtIndex:1]];
NSMutableArray * tagDescs = [NSMutableArray array]; NSMutableArray * tagDescs = [NSMutableArray array];
for (NSUInteger i = 2; i<numComp; ++i) for (NSUInteger i = 2; i<numComp; ++i)
@ -517,8 +507,7 @@ static NSTimeInterval sLastSkip = 0.0;
{ {
[self willChangeValueForKey:@"searchString"]; [self willChangeValueForKey:@"searchString"];
if (searchString != str) { if (searchString != str) {
[searchString release]; searchString = str;
searchString = [str retain];
} }
if (!searchString || [searchString isEqual:@""]) { if (!searchString || [searchString isEqual:@""]) {
[mediaController setFilterPredicate:nil]; [mediaController setFilterPredicate:nil];

View File

@ -7,7 +7,6 @@
// //
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <QTKit/QTKit.h>
@class MAMedia; @class MAMedia;
@class MATagDescription; @class MATagDescription;
@ -18,7 +17,7 @@
} }
- (MAMedia *)addMediaURL:(NSURL *)url name:(NSString *)name date:(NSDate *)date; - (MAMedia *)addMediaURL:(NSURL *)url name:(NSString *)name date:(NSDate *)date;
- (MAAnno *)addAnnotationForMedia:(MAMedia *)media location:(QTTime)location; - (MAAnno *)addAnnotationForMedia:(MAMedia *)media location:(CFTimeInterval)location;
- (MATagDescription *)tagDescriptionForName:(NSString *)name; - (MATagDescription *)tagDescriptionForName:(NSString *)name;
- (MATagDescription *)tagDescriptionForName:(NSString *)name notes:(NSString *)notes; - (MATagDescription *)tagDescriptionForName:(NSString *)name notes:(NSString *)notes;
- (NSArray *)tagNamesMatchingPrefix:(NSString *)prefix; - (NSArray *)tagNamesMatchingPrefix:(NSString *)prefix;

View File

@ -11,6 +11,7 @@
#import "MAMedia.h" #import "MAMedia.h"
#import "MAAnno.h" #import "MAAnno.h"
#import "MATagDescription.h" #import "MATagDescription.h"
#import "MAShortenQTTime.h"
#pragma mark MADocument #pragma mark MADocument
@ -31,7 +32,6 @@
{ {
MADocWindow * windowController = [[MADocWindow alloc] initWithWindowNibName:[self windowNibName]]; MADocWindow * windowController = [[MADocWindow alloc] initWithWindowNibName:[self windowNibName]];
[self addWindowController:windowController]; [self addWindowController:windowController];
[windowController release];
} }
+ (BOOL)autosavesInPlace + (BOOL)autosavesInPlace
@ -81,12 +81,12 @@
#pragma mark Annotation management #pragma mark Annotation management
- (MAAnno *)addAnnotationForMedia:(MAMedia *)media location:(QTTime)location - (MAAnno *)addAnnotationForMedia:(MAMedia *)media location:(CFTimeInterval)location
{ {
NSManagedObjectContext *moc = [self managedObjectContext]; NSManagedObjectContext *moc = [self managedObjectContext];
MAAnno * annotation = [NSEntityDescription insertNewObjectForEntityForName:@"MAAnno" inManagedObjectContext:moc]; MAAnno * annotation = [NSEntityDescription insertNewObjectForEntityForName:@"MAAnno" inManagedObjectContext:moc];
annotation.media = media; annotation.media = media;
annotation.location = QTStringFromTime(location); annotation.location = MAStringFromTime(location);
annotation.notes = @""; annotation.notes = @"";
return annotation; return annotation;

View File

@ -10,12 +10,14 @@
#import "MATagDescription.h" #import "MATagDescription.h"
#import "MAAnno.h" #import "MAAnno.h"
#import "MAMedia.h" #import "MAMedia.h"
#import "MADocument.h"
#include <algorithm> #include <algorithm>
#define kMADragType @"org.aereperennius.medianno" #define kMADragType @"org.aereperennius.medianno"
static NSPointerArray * sValidPasteboardData; static NSArray * sCurrentPasteboardData;
static long sPasteboardGeneration = 0;
@interface MAPasteboardData : NSObject <NSPasteboardWriting> { @interface MAPasteboardData : NSObject <NSPasteboardWriting> {
NSArray * contents; NSArray * contents;
@ -31,29 +33,25 @@ static NSPointerArray * sValidPasteboardData;
- (id)initWithArray:(NSArray *)array - (id)initWithArray:(NSArray *)array
{ {
if (!sValidPasteboardData)
sValidPasteboardData = [[NSPointerArray alloc] initWithOptions:NSPointerFunctionsZeroingWeakMemory];
self = [super init]; self = [super init];
contents = array; contents = array;
if ([sValidPasteboardData count] > 10) sCurrentPasteboardData = contents;
[sValidPasteboardData compact]; ++sPasteboardGeneration;
[sValidPasteboardData addPointer:contents];
return self; return self;
} }
+ (id)pasteboardDataWithArray:(NSArray *)array + (id)pasteboardDataWithArray:(NSArray *)array
{ {
return [[[MAPasteboardData alloc] initWithArray:array] autorelease]; return [[MAPasteboardData alloc] initWithArray:array];
} }
+ (NSArray *)arrayFromPasteboard:(NSPasteboard *)pboard + (NSArray *)arrayFromPasteboard:(NSPasteboard *)pboard
{ {
if (NSNumber * drag = [pboard propertyListForType:kMADragType]) { if (NSNumber * drag = [pboard propertyListForType:kMADragType]) {
NSArray * possibleArray = (NSArray *)[drag longValue]; if (sPasteboardGeneration == [drag longValue]) {
for (NSUInteger count = [sValidPasteboardData count]; count--; ) return sCurrentPasteboardData;
if ([sValidPasteboardData pointerAtIndex:count] == possibleArray) }
return possibleArray;
} }
return nil; return nil;
} }
@ -77,7 +75,7 @@ static NSPointerArray * sValidPasteboardData;
- (id)pasteboardPropertyListForType:(NSString *)type - (id)pasteboardPropertyListForType:(NSString *)type
{ {
if ([type isEqual:kMADragType]) { if ([type isEqual:kMADragType]) {
return [NSNumber numberWithLong:(long)contents]; return [NSNumber numberWithLong:sPasteboardGeneration];
} else if ([type isEqual:(NSString *)kUTTypeUTF8PlainText]) { } else if ([type isEqual:(NSString *)kUTTypeUTF8PlainText]) {
NSMutableString * stringBuffer = [NSMutableString string]; NSMutableString * stringBuffer = [NSMutableString string];
for (id obj in contents) for (id obj in contents)

View File

@ -8,7 +8,6 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <CoreData/CoreData.h> #import <CoreData/CoreData.h>
#import <QTKit/QTKit.h>
@class MAAnno, MADocument; @class MAAnno, MADocument;

View File

@ -7,13 +7,14 @@
// //
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
#import <QTKit/QTKit.h> #import <AVKit/AVKit.h>
#import <AVFoundation/AVFoundation.h>
@interface MAMovieWindow : NSWindowController <NSWindowDelegate> { @interface MAMovieWindow : NSWindowController <NSWindowDelegate> {
IBOutlet QTMovieView * panelMovieView; IBOutlet AVPlayerView * panelMovieView;
} }
- (BOOL)shouldDisplayMovie:(QTMovie *)movie withTitle:(NSString *)title; - (BOOL)shouldDisplayMovie:(AVPlayer *)movie withTitle:(NSString *)title;
- (IBAction)toggleWindow:(id)sender; - (IBAction)toggleWindow:(id)sender;
@end @end

View File

@ -23,14 +23,14 @@
[super windowDidLoad]; [super windowDidLoad];
} }
- (BOOL)shouldDisplayMovie:(QTMovie *)movie withTitle:(NSString *)title - (BOOL)shouldDisplayMovie:(AVPlayer *)movie withTitle:(NSString *)title
{ {
if ([self isWindowLoaded] && [[self window] isVisible]) { if ([self isWindowLoaded] && [[self window] isVisible]) {
[panelMovieView setMovie:movie]; [panelMovieView setPlayer:movie];
[[self window] setTitle:title]; [[self window] setTitle:title];
return YES; return YES;
} else { } else {
[panelMovieView setMovie:nil]; [panelMovieView setPlayer:nil];
[[self window] setTitle:@""]; [[self window] setTitle:@""];
return NO; return NO;
} }
@ -60,4 +60,4 @@
return NO; return NO;
} }
@end @end

View File

@ -8,6 +8,9 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
NSString * MAStringFromTime(CFTimeInterval time);
CFTimeInterval MATimeFromString(NSString * timeStr);
@interface MAShortenQTTime : NSValueTransformer @interface MAShortenQTTime : NSValueTransformer
@end @end

View File

@ -7,7 +7,45 @@
// //
#import "MAShortenQTTime.h" #import "MAShortenQTTime.h"
#import <QTKit/QTKit.h>
NSString * MAStringFromTime(CFTimeInterval time)
{
const char * sign = "";
if (time < 0) {
sign = "-";
time = -time;
}
NSUInteger seconds = (NSUInteger)time;
NSUInteger millis = (NSUInteger)((time-seconds)*1000);
NSUInteger minutes = seconds / 60;
seconds %= 60;
NSUInteger hours = minutes / 60;
minutes %= 60;
NSUInteger days = hours / 24;
hours %= 24;
return [NSString stringWithFormat:@"%s%tu:%02tu:%02tu:%02tu.%03tu/600", sign, days, hours, minutes, seconds, millis];
}
CFTimeInterval MATimeFromString(NSString * timeStr)
{
const char * time = [timeStr UTF8String];
int sign = 1;
if (time[0] == '-') {
++time;
sign = -1;
}
NSInteger days, hours, minutes;
double seconds;
if (sscanf(time, "%td:%td:%td:%lf", &days, &hours, &minutes, &seconds) == 4)
return sign*(((days*24 + hours)*60 + minutes)*60 + seconds);
else
return -1.0;
}
@implementation MAShortenQTTime @implementation MAShortenQTTime
@ -21,31 +59,25 @@
return NO; return NO;
} }
- (id)transformedValue:(id)value { - (id)transformedValue:(id)value
NSString * fullTime = [value isKindOfClass:[NSString class]] ? value : QTStringFromTime([value QTTimeValue]); {
NSRange rangeToUse = {0,0}; NSUInteger seconds = [value unsignedIntegerValue];
// if (NSUInteger minutes = seconds/60) {
// Trim leading zeros, up to a point seconds %= 60;
// if (NSUInteger hours = minutes/60) {
while (rangeToUse.location < 6) { minutes %= 60;
switch ([fullTime characterAtIndex:rangeToUse.location]) { if (NSUInteger days = hours/24) {
case '0': hours %= 24;
case ':': return [NSString stringWithFormat:@"%tu:%02tu:%02tu:%02tu", days, hours, minutes, seconds];
++rangeToUse.location; } else {
continue; return [NSString stringWithFormat:@"%tu:%02tu:%02tu", hours, minutes, seconds];
}
} else {
return [NSString stringWithFormat:@"%tu:%02tu", minutes, seconds];
} }
break; } else {
return [NSString stringWithFormat:@"0:%02tu", seconds];
} }
//
// Trim fractions of seconds
//
for (rangeToUse.length = [fullTime length]-rangeToUse.location; rangeToUse.length-- > 0; )
if ([fullTime characterAtIndex:rangeToUse.location+rangeToUse.length] == '.')
break;
if (!rangeToUse.length)
rangeToUse.length = [fullTime length]-rangeToUse.location;
return [fullTime substringWithRange:rangeToUse];
} }
@end @end

View File

@ -15,7 +15,7 @@ static NSCharacterSet * sOverrideTokenizingCharacters;
- (NSCharacterSet *)tokenizingCharacterSet - (NSCharacterSet *)tokenizingCharacterSet
{ {
if (!sOverrideTokenizingCharacters) if (!sOverrideTokenizingCharacters)
sOverrideTokenizingCharacters = [[NSCharacterSet characterSetWithCharactersInString:@";"] retain]; sOverrideTokenizingCharacters = [NSCharacterSet characterSetWithCharactersInString:@";"];
return sOverrideTokenizingCharacters; return sOverrideTokenizingCharacters;
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,277 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11191" systemVersion="16A323" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<data> <dependencies>
<int key="IBDocument.SystemTarget">1070</int> <deployment identifier="macosx"/>
<string key="IBDocument.SystemVersion">11B26</string> <plugIn identifier="com.apple.AVKitIBPlugin" version="11191"/>
<string key="IBDocument.InterfaceBuilderVersion">1617</string> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11191"/>
<string key="IBDocument.AppKitVersion">1138</string> </dependencies>
<string key="IBDocument.HIToolboxVersion">566.00</string> <objects>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <customObject id="-2" userLabel="File's Owner" customClass="MAMovieWindow">
<bool key="EncodedWithXMLCoder">YES</bool> <connections>
<object class="NSArray" key="dict.sortedKeys"> <outlet property="panelMovieView" destination="s8w-Lv-MOu" id="eOg-QR-Hs2"/>
<bool key="EncodedWithXMLCoder">YES</bool> <outlet property="window" destination="3" id="5"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string> </connections>
<string>com.apple.QTKitIBPlugin</string> </customObject>
</object> <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<object class="NSMutableArray" key="dict.values"> <customObject id="-3" userLabel="Application"/>
<bool key="EncodedWithXMLCoder">YES</bool> <window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" hidesOnDeactivate="YES" oneShot="NO" showsToolbarButton="NO" visibleAtLaunch="NO" frameAutosaveName="MAMoviePanel" animationBehavior="default" id="3" customClass="MAMovieWin">
<string>1617</string> <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" utility="YES" documentModal="YES"/>
<string>518</string> <windowPositionMask key="initialPositionMask" rightStrut="YES" topStrut="YES"/>
</object> <rect key="contentRect" x="1887" y="836" width="640" height="496"/>
</object> <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies"> <view key="contentView" id="4">
<bool key="EncodedWithXMLCoder">YES</bool> <rect key="frame" x="0.0" y="0.0" width="640" height="496"/>
<string>NSWindowTemplate</string> <autoresizingMask key="autoresizingMask"/>
<string>NSView</string> <subviews>
<string>QTMovieView</string> <avPlayerView misplaced="YES" controlsStyle="inline" id="s8w-Lv-MOu">
<string>NSCustomObject</string> <rect key="frame" x="0.0" y="0.0" width="640" height="496"/>
</object> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<object class="NSArray" key="IBDocument.PluginDependencies"> </avPlayerView>
<bool key="EncodedWithXMLCoder">YES</bool> </subviews>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string> </view>
<string>com.apple.QTKitIBPlugin</string> <connections>
</object> <outlet property="delegate" destination="-2" id="13"/>
<object class="NSMutableDictionary" key="IBDocument.Metadata"> </connections>
<bool key="EncodedWithXMLCoder">YES</bool> </window>
<object class="NSArray" key="dict.sortedKeys" id="0"> </objects>
<bool key="EncodedWithXMLCoder">YES</bool> </document>
</object>
<reference key="dict.values" ref="0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
<string key="NSClassName">MAMovieWindow</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
</object>
<object class="NSCustomObject" id="1004">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSWindowTemplate" id="633460828">
<int key="NSWindowStyleMask">95</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{1887, 836}, {640, 496}}</string>
<int key="NSWTFlags">-1540357120</int>
<string key="NSWindowTitle">Window</string>
<string key="NSWindowClass">MAMovieWin</string>
<nil key="NSViewClass"/>
<nil key="NSUserInterfaceItemIdentifier"/>
<object class="NSView" key="NSWindowView" id="607284987">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="QTMovieView" id="187692734">
<reference key="NSNextResponder" ref="607284987"/>
<int key="NSvFlags">274</int>
<object class="NSMutableSet" key="NSDragTypes">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="set.sortedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>Apple URL pasteboard type</string>
<string>CorePasteboardFlavorType 0x6D6F6F76</string>
<string>NSFilenamesPboardType</string>
<string>QTMoviePasteboardType</string>
</object>
</object>
<string key="NSFrameSize">{640, 496}</string>
<reference key="NSSuperview" ref="607284987"/>
<string key="NSReuseIdentifierKey">_NS:46</string>
<object class="NSColor" key="kCoderFillColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
<boolean value="YES" key="kCoderControllerVisible"/>
<boolean value="YES" key="kCoderPreservesAspectRatio"/>
<nil key="kCoderMovie"/>
<boolean value="NO" key="kCoderEditable"/>
</object>
</object>
<string key="NSFrameSize">{640, 496}</string>
<reference key="NSSuperview"/>
<reference key="NSNextKeyView" ref="187692734"/>
<string key="NSReuseIdentifierKey">_NS:2837</string>
</object>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<string key="NSFrameAutosaveName">MAMoviePanel</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="633460828"/>
</object>
<int key="connectionID">5</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">panelMovieView</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="187692734"/>
</object>
<int key="connectionID">12</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="633460828"/>
<reference key="destination" ref="1001"/>
</object>
<int key="connectionID">13</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<reference key="object" ref="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="1001"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="1003"/>
<reference key="parent" ref="0"/>
<string key="objectName">First Responder</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="1004"/>
<reference key="parent" ref="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="633460828"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="607284987"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">4</int>
<reference key="object" ref="607284987"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="187692734"/>
</object>
<reference key="parent" ref="633460828"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
<reference key="object" ref="187692734"/>
<reference key="parent" ref="607284987"/>
<string key="objectName">Movie View</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.IBPluginDependency</string>
<string>-2.IBPluginDependency</string>
<string>-3.IBPluginDependency</string>
<string>3.IBNSWindowAutoPositionCentersHorizontal</string>
<string>3.IBNSWindowAutoPositionCentersVertical</string>
<string>3.IBPluginDependency</string>
<string>3.NSWindowTemplate.visibleAtLaunch</string>
<string>4.IBPluginDependency</string>
<string>6.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO"/>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.QTKitIBPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">13</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">MAMovieWin</string>
<string key="superclassName">NSPanel</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/MAMovieWin.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">MAMovieWindow</string>
<string key="superclassName">NSWindowController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">toggleWindow:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">toggleWindow:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">toggleWindow:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">panelMovieView</string>
<string key="NS.object.0">QTMovieView</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">panelMovieView</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">panelMovieView</string>
<string key="candidateClassName">QTMovieView</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/MAMovieWindow.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
</data>
</archive>