diff --git a/Medianno.xcodeproj/project.pbxproj b/Medianno.xcodeproj/project.pbxproj index 9fd339a..00f2eff 100644 --- a/Medianno.xcodeproj/project.pbxproj +++ b/Medianno.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* 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 */; }; 950BB67513F1F26200D8E669 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 950BB67313F1F26200D8E669 /* InfoPlist.strings */; }; 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 */; }; 950BB68713F1F26200D8E669 /* MADocument.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 950BB68513F1F26200D8E669 /* MADocument.xcdatamodeld */; }; 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 */; }; 950BB69D13F2C6B400D8E669 /* MAAnno.mm in Sources */ = {isa = PBXBuildFile; fileRef = 950BB69C13F2C6B400D8E669 /* MAAnno.mm */; }; 950BB6A013F2C6B400D8E669 /* MAMedia.mm in Sources */ = {isa = PBXBuildFile; fileRef = 950BB69F13F2C6B400D8E669 /* MAMedia.mm */; }; @@ -50,6 +51,8 @@ /* End PBXBuildFile 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; }; 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 = ""; }; @@ -63,7 +66,6 @@ 950BB68313F1F26200D8E669 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; 950BB68613F1F26200D8E669 /* MADocument.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = MADocument.xcdatamodel; sourceTree = ""; }; 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 = ""; }; 950BB69913F2C6B400D8E669 /* MATag.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MATag.mm; sourceTree = ""; }; 950BB69B13F2C6B400D8E669 /* MAAnno.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MAAnno.h; sourceTree = ""; }; @@ -116,8 +118,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 950737F31D5FAA1600737CDE /* AVKit.framework in Frameworks */, + 950737F11D5FAA0F00737CDE /* AVFoundation.framework in Frameworks */, 950BB68F13F1F29D00D8E669 /* CoreData.framework in Frameworks */, - 950BB69013F1F29D00D8E669 /* QTKit.framework in Frameworks */, 950BB66B13F1F26200D8E669 /* Cocoa.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -145,8 +148,9 @@ 950BB66913F1F26200D8E669 /* Frameworks */ = { isa = PBXGroup; children = ( + 950737F21D5FAA1600737CDE /* AVKit.framework */, + 950737F01D5FAA0F00737CDE /* AVFoundation.framework */, 950BB68D13F1F29D00D8E669 /* CoreData.framework */, - 950BB68E13F1F29D00D8E669 /* QTKit.framework */, 950BB66A13F1F26200D8E669 /* Cocoa.framework */, ); name = Frameworks; @@ -505,11 +509,11 @@ 950BB68B13F1F26200D8E669 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; GCC_ENABLE_OBJC_GC = unsupported; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Medianno/Medianno-Prefix.pch"; INFOPLIST_FILE = "Medianno/Medianno-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_BUNDLE_IDENTIFIER = "org.aereperennius.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -520,11 +524,11 @@ 950BB68C13F1F26200D8E669 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; GCC_ENABLE_OBJC_GC = unsupported; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Medianno/Medianno-Prefix.pch"; INFOPLIST_FILE = "Medianno/Medianno-Info.plist"; - MACOSX_DEPLOYMENT_TARGET = 10.7; PRODUCT_BUNDLE_IDENTIFIER = "org.aereperennius.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; diff --git a/Medianno/MAAddMediaSheet.mm b/Medianno/MAAddMediaSheet.mm index 44d1edd..0126a32 100644 --- a/Medianno/MAAddMediaSheet.mm +++ b/Medianno/MAAddMediaSheet.mm @@ -50,7 +50,6 @@ static NSDictionary * sDateHypotheses; { [self window]; [self willChangeValueForKey:@"dateFormats"]; - [dateFormats release]; dateFormats = nil; while ([dateFormatMenu numberOfItems] > 2) [dateFormatMenu removeItemAtIndex:2]; @@ -104,7 +103,7 @@ static NSDictionary * sDateHypotheses; } } if ([formats count] > 0) - dateFormats = [formats retain]; + dateFormats = formats; [self didChangeValueForKey:@"dateFormats"]; } @@ -116,7 +115,7 @@ static NSDictionary * sDateHypotheses; [m addObject:[NSMutableDictionary dictionaryWithObject:url forKey:@"url"]]; media = m; [self useModificationDates:self]; - [NSApp beginSheet:[self window] modalForWindow:[parent window] didEndBlock:^(NSInteger returnCode) { + [[parent window] beginSheet:[self window] completionHandler:^(NSModalResponse returnCode) { if (returnCode == NSAlertFirstButtonReturn) { MADocument * doc = [parent document]; [media enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { @@ -127,8 +126,6 @@ static NSDictionary * sDateHypotheses; }]; } [[self window] orderOut:self]; - [self autorelease]; - [media release]; media = nil; }]; } diff --git a/Medianno/MAAnno.h b/Medianno/MAAnno.h index 582fe97..3930271 100644 --- a/Medianno/MAAnno.h +++ b/Medianno/MAAnno.h @@ -8,21 +8,19 @@ #import #import -#import @class MATag; @class MAMedia; @class MADocument; @interface MAAnno : NSManagedObject { -@private } @property (nonatomic, retain) NSString * location; @property (nonatomic, retain) NSString * notes; @property (nonatomic, retain) NSSet *tags; @property (nonatomic, retain) NSManagedObject *media; -- (QTTime)qtLocation; +- (CFTimeInterval)avLocation; - (NSString *)exportText; - (MAAnno *)copyToDocument:(MADocument *)doc withMedia:(MAMedia *)media; diff --git a/Medianno/MAAnno.mm b/Medianno/MAAnno.mm index 5f42280..a298ac3 100644 --- a/Medianno/MAAnno.mm +++ b/Medianno/MAAnno.mm @@ -10,6 +10,7 @@ #import "MATag.h" #import "MATagDescription.h" #import "MADocument.h" +#import "MAShortenQTTime.h" #import @@ -33,20 +34,14 @@ - (id)initWithArray:(NSArray *)array { - contents = [array retain]; + contents = array; return self; } -- (void)dealloc -{ - [contents release]; - [super dealloc]; -} - + (id)arrayWithArray:(NSArray *)array { - return [[[MANotAnArray alloc] initWithArray:array] autorelease]; + return [[MANotAnArray alloc] initWithArray:array]; } - (BOOL)isEqual:(id)object @@ -76,9 +71,9 @@ @dynamic tags; @dynamic media; -- (QTTime)qtLocation +- (CFTimeInterval)avLocation; { - return QTTimeFromString(self.location); + return MATimeFromString(self.location); } - (NSArray *)tagDescriptions @@ -126,7 +121,7 @@ - (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; NSMutableArray * tagDescs = [NSMutableArray array]; for (MATagDescription * tag in self.tagDescriptions) diff --git a/Medianno/MAAppController.h b/Medianno/MAAppController.h index 0e36201..f67b6fa 100644 --- a/Medianno/MAAppController.h +++ b/Medianno/MAAppController.h @@ -12,14 +12,6 @@ @class MAMovieWindow; @class MATagWindow; -typedef void (^MASheetBlock)(NSInteger returnCode); - -@interface NSApplication (SheetAdditions) - -- (void)beginSheet: (NSWindow *)sheet modalForWindow:(NSWindow *)docWindow didEndBlock: (MASheetBlock)block; - -@end - @interface MAAppController : NSObject { } diff --git a/Medianno/MAAppController.mm b/Medianno/MAAppController.mm index 10f3d86..1fd81a5 100644 --- a/Medianno/MAAppController.mm +++ b/Medianno/MAAppController.mm @@ -18,23 +18,3 @@ } @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 diff --git a/Medianno/MAColorForURL.mm b/Medianno/MAColorForURL.mm index a145718..f224102 100644 --- a/Medianno/MAColorForURL.mm +++ b/Medianno/MAColorForURL.mm @@ -7,8 +7,7 @@ // #import "MAColorForURL.h" - -#import +#import @implementation MAColorForURL @@ -25,7 +24,7 @@ - (id)transformedValue:(id)value { NSURL * mediaURL = [NSURL URLWithString:value]; - if ([QTMovie canInitWithURL:mediaURL]) + if ([[AVAsset assetWithURL:mediaURL] isPlayable]) return [NSColor blackColor]; else return [NSColor redColor]; diff --git a/Medianno/MADocWindow.h b/Medianno/MADocWindow.h index d90f154..5a264d3 100644 --- a/Medianno/MADocWindow.h +++ b/Medianno/MADocWindow.h @@ -7,7 +7,8 @@ // #import -#import +#import +#import @class MAMovieWindow; @class MAMedia; @@ -17,18 +18,18 @@ { IBOutlet NSArrayController* mediaController; IBOutlet NSArrayController* annotationController; - IBOutlet QTMovieView * movieView; + IBOutlet AVPlayerView * movieView; IBOutlet NSTableView * mediaTable; IBOutlet NSTableView * annotationTable; IBOutlet NSView * textExportAccessoryView; - QTMovie * currentMovie; + AVPlayer * currentMovie; NSString * currentMovieTitle; - QTTime lastMovieTime; } @property BOOL exportAnnotations; @property BOOL exportTags; @property (nonatomic,retain)NSString * searchString; +@property (readonly) NSNumber * currentMovieTime; - (IBAction)addMediaFiles:(id)sender; - (IBAction)importText:(id)sender; @@ -40,7 +41,6 @@ - (IBAction)mediaSkipForward:(id)sender; - (IBAction)toggleMediaPlay:(id)sender; - (IBAction)delete:(id)sender; -- (QTTime)currentMovieTime; - (void)moviePanelDidAppear; - (void)moviePanelDidClose; - (MAMedia *)currentMedia; diff --git a/Medianno/MADocWindow.mm b/Medianno/MADocWindow.mm index 7c23436..3abb6d9 100644 --- a/Medianno/MADocWindow.mm +++ b/Medianno/MADocWindow.mm @@ -6,8 +6,6 @@ // Copyright 2011 Matthias Neeracher. All rights reserved. // -#import - #import "MADocWindow.h" #import "MAAddMediaSheet.h" #import "MADocument.h" @@ -19,6 +17,7 @@ #import "MATagWindow.h" #import "MAAppController.h" #import "MADragging.h" +#import "MAShortenQTTime.h" #include @@ -38,19 +37,11 @@ static const char * kMADocWindowObserver = "MADocWindowObserver"; return self; } -- (void)dealloc -{ - [currentMovie release]; - [searchString release]; - [super dealloc]; -} - - (void)windowDidLoad { [super windowDidLoad]; [mediaController setSortDescriptors:[NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"date" 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.name" options:0 context:&kMADocWindowObserver]; [self registerOurDragTypes]; @@ -68,9 +59,9 @@ static const char * kMADocWindowObserver = "MADocWindowObserver"; - (void)moviePanelDidAppear { - [movieView setMovie:nil]; + [movieView setPlayer:nil]; if (![[self moviePanel] shouldDisplayMovie:currentMovie withTitle:currentMovieTitle]) - [movieView setMovie:currentMovie]; + [movieView setPlayer:currentMovie]; } - (void)windowDidBecomeMain:(NSNotification *)notification @@ -82,7 +73,7 @@ static const char * kMADocWindowObserver = "MADocWindowObserver"; - (void)moviePanelDidClose { [[self moviePanel] shouldDisplayMovie:nil withTitle:@""]; - [movieView setMovie:currentMovie]; + [movieView setPlayer:currentMovie]; } - (void)windowDidResignMain:(NSNotification *)notification @@ -98,17 +89,16 @@ static const char * kMADocWindowObserver = "MADocWindowObserver"; // // Current movie changed // - [currentMovie release]; + [self willChangeValueForKey:@"currentMovie"]; if (MAMedia * currentMedia = [self currentMedia]) { NSURL * mediaURL = [NSURL URLWithString:[currentMedia media]]; - currentMovie = [[QTMovie alloc] initWithURL:mediaURL error:nil]; + currentMovie = [AVPlayer playerWithURL:mediaURL]; currentMovieTitle = [currentMedia name]; } else { currentMovie = nil; currentMovieTitle = @""; } - lastMovieTime = QTMakeTime(-1, 600); - [self updateMovieTime:nil]; + [self didChangeValueForKey:@"currentMovie"]; } [self moviePanelDidAppear]; } @@ -124,25 +114,22 @@ static const char * kMADocWindowObserver = "MADocWindowObserver"; return nil; } -- (QTTime)currentMovieTime ++ (NSSet *)keyPathsForValuesAffectingCurrentMovieTime { - return [currentMovie currentTime]; + return [NSSet setWithObject:@"currentMovie.currentTime"]; } -- (void)updateMovieTime:(NSTimer *)timer +- (NSNumber *)currentMovieTime { - QTTime currentTime = [self currentMovieTime]; - if (QTTimeCompare(currentTime, lastMovieTime)) { - [self willChangeValueForKey:@"currentMovieTime"]; - lastMovieTime = currentTime; - [self didChangeValueForKey:@"currentMovieTime"]; - } + CMTime time = [currentMovie currentTime]; + + return [NSNumber numberWithDouble:(double)time.value/time.timescale]; } - (IBAction)addMediaFiles:(id)sender { NSOpenPanel * openPanel = [NSOpenPanel openPanel]; - [openPanel setAllowedFileTypes:[QTMovie movieFileTypes:QTIncludeCommonTypes]]; + [openPanel setAllowedFileTypes:[AVMovie movieTypes]]; [openPanel setAllowsMultipleSelection:YES]; [openPanel setCanChooseDirectories:YES]; [openPanel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) { @@ -180,7 +167,7 @@ static const char * kMADocWindowObserver = "MADocWindowObserver"; NSNumber * isDirectory; [url getResourceValue:&isDirectory forKey:NSURLIsDirectoryKey error:nil]; if ([isDirectory boolValue]) { - [self addMediaTypes:[QTMovie movieFileTypes:QTIncludeCommonTypes] inDirectory:url toList:expandedURLs]; + [self addMediaTypes:[AVMovie movieTypes] inDirectory:url toList:expandedURLs]; continue; } } @@ -189,6 +176,7 @@ static const char * kMADocWindowObserver = "MADocWindowObserver"; [[[MAAddMediaSheet alloc] init] runWithParentWindow:self media:expandedURLs]; } +#if 0 - (void)exportMediaToURL:(NSURL *)url { NSIndexSet * selection = [annotationController selectionIndexes]; @@ -257,6 +245,8 @@ static const char * kMADocWindowObserver = "MADocWindowObserver"; }]; } +#endif + - (void)delete:(id)sender { NSResponder * responder = [[self window] firstResponder]; @@ -275,7 +265,7 @@ static const char * kMADocWindowObserver = "MADocWindowObserver"; - (IBAction)toggleMediaPlay:(id)sender { if ([currentMovie rate] > 0.0f) - [currentMovie stop]; + [currentMovie pause]; else [currentMovie play]; } @@ -316,7 +306,7 @@ static const char * kMADocWindowObserver = "MADocWindowObserver"; #pragma mark Media navigation -static NSTimeInterval sLastSkip = 0.0; +static CFTimeInterval sLastSkip = 0.0; - (void)resetSkipFactor:(id)sender { @@ -325,17 +315,12 @@ static NSTimeInterval sLastSkip = 0.0; - (void)skipTimeInterval { - QTTime interval = QTMakeTimeWithTimeInterval(fabs(sLastSkip)); - QTTime current = [currentMovie currentTime]; - if (sLastSkip > 0) - current = QTTimeIncrement(current, interval); - else - current = QTTimeDecrement(current, interval); - [currentMovie setCurrentTime:current]; + CMTime current = [currentMovie currentTime]; + current.value += static_cast(sLastSkip*current.timescale); + [currentMovie seekToTime:current]; sLastSkip *= 1.1; [NSRunLoop cancelPreviousPerformRequestsWithTarget:self selector:@selector(resetSkipFactor:) object:self]; [self performSelector:@selector(resetSkipFactor:) withObject:self afterDelay:0.5]; - [self updateMovieTime:nil]; } - (IBAction)mediaSkipBackward:(id)sender @@ -395,15 +380,20 @@ static NSTimeInterval sLastSkip = 0.0; { NSArray * selection = [annotationController selectedObjects]; if ([selection count]) - if (MAAnno * firstSelectedAnno = [selection objectAtIndex:0]) - [currentMovie setCurrentTime:[firstSelectedAnno qtLocation]]; + if (MAAnno * firstSelectedAnno = [selection objectAtIndex:0]) { + CFTimeInterval avLocation = [firstSelectedAnno avLocation]; + CMTime newTime = currentMovie.currentTime; + newTime.value = static_cast(avLocation*newTime.timescale); + [currentMovie seekToTime:newTime]; + } } - (IBAction)addAnnotation:(id)sender { - [currentMovie stop]; - QTTime location = [self currentMovieTime]; - MAAnno * anno = [[self document] addAnnotationForMedia:[self currentMedia] location:location]; + [currentMovie pause]; + CMTime time = currentMovie.currentTime; + CFTimeInterval loc = static_cast(time.value)/time.timescale; + MAAnno * anno = [[self document] addAnnotationForMedia:[self currentMedia] location:loc]; [annotationController setSelectedObjects:[NSArray arrayWithObject:anno]]; [annotationTable editColumn:[annotationTable columnWithIdentifier:@"tags"] row:[annotationController selectionIndex] @@ -484,8 +474,8 @@ static NSTimeInterval sLastSkip = 0.0; } else if (nextIsTag) { if (!media) break; - QTTime location= QTTimeFromString([components objectAtIndex:0]); - MAAnno * anno = [doc addAnnotationForMedia:media location:location]; + CFTimeInterval location = MATimeFromString([components objectAtIndex:0]); + MAAnno * anno = [doc addAnnotationForMedia:media location:location]; [anno setNotes:[components objectAtIndex:1]]; NSMutableArray * tagDescs = [NSMutableArray array]; for (NSUInteger i = 2; i -#import @class MAMedia; @class MATagDescription; @@ -18,7 +17,7 @@ } - (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 notes:(NSString *)notes; - (NSArray *)tagNamesMatchingPrefix:(NSString *)prefix; diff --git a/Medianno/MADocument.mm b/Medianno/MADocument.mm index a7c6d27..be9b1ff 100644 --- a/Medianno/MADocument.mm +++ b/Medianno/MADocument.mm @@ -11,6 +11,7 @@ #import "MAMedia.h" #import "MAAnno.h" #import "MATagDescription.h" +#import "MAShortenQTTime.h" #pragma mark MADocument @@ -31,7 +32,6 @@ { MADocWindow * windowController = [[MADocWindow alloc] initWithWindowNibName:[self windowNibName]]; [self addWindowController:windowController]; - [windowController release]; } + (BOOL)autosavesInPlace @@ -81,12 +81,12 @@ #pragma mark Annotation management -- (MAAnno *)addAnnotationForMedia:(MAMedia *)media location:(QTTime)location +- (MAAnno *)addAnnotationForMedia:(MAMedia *)media location:(CFTimeInterval)location { NSManagedObjectContext *moc = [self managedObjectContext]; MAAnno * annotation = [NSEntityDescription insertNewObjectForEntityForName:@"MAAnno" inManagedObjectContext:moc]; annotation.media = media; - annotation.location = QTStringFromTime(location); + annotation.location = MAStringFromTime(location); annotation.notes = @""; return annotation; diff --git a/Medianno/MADragging.mm b/Medianno/MADragging.mm index 170c597..0ae5d13 100644 --- a/Medianno/MADragging.mm +++ b/Medianno/MADragging.mm @@ -10,12 +10,14 @@ #import "MATagDescription.h" #import "MAAnno.h" #import "MAMedia.h" +#import "MADocument.h" #include #define kMADragType @"org.aereperennius.medianno" -static NSPointerArray * sValidPasteboardData; +static NSArray * sCurrentPasteboardData; +static long sPasteboardGeneration = 0; @interface MAPasteboardData : NSObject { NSArray * contents; @@ -31,29 +33,25 @@ static NSPointerArray * sValidPasteboardData; - (id)initWithArray:(NSArray *)array { - if (!sValidPasteboardData) - sValidPasteboardData = [[NSPointerArray alloc] initWithOptions:NSPointerFunctionsZeroingWeakMemory]; self = [super init]; contents = array; - if ([sValidPasteboardData count] > 10) - [sValidPasteboardData compact]; - [sValidPasteboardData addPointer:contents]; - + sCurrentPasteboardData = contents; + ++sPasteboardGeneration; + return self; } + (id)pasteboardDataWithArray:(NSArray *)array { - return [[[MAPasteboardData alloc] initWithArray:array] autorelease]; + return [[MAPasteboardData alloc] initWithArray:array]; } + (NSArray *)arrayFromPasteboard:(NSPasteboard *)pboard { if (NSNumber * drag = [pboard propertyListForType:kMADragType]) { - NSArray * possibleArray = (NSArray *)[drag longValue]; - for (NSUInteger count = [sValidPasteboardData count]; count--; ) - if ([sValidPasteboardData pointerAtIndex:count] == possibleArray) - return possibleArray; + if (sPasteboardGeneration == [drag longValue]) { + return sCurrentPasteboardData; + } } return nil; } @@ -77,7 +75,7 @@ static NSPointerArray * sValidPasteboardData; - (id)pasteboardPropertyListForType:(NSString *)type { if ([type isEqual:kMADragType]) { - return [NSNumber numberWithLong:(long)contents]; + return [NSNumber numberWithLong:sPasteboardGeneration]; } else if ([type isEqual:(NSString *)kUTTypeUTF8PlainText]) { NSMutableString * stringBuffer = [NSMutableString string]; for (id obj in contents) diff --git a/Medianno/MAMedia.h b/Medianno/MAMedia.h index 549c8a0..37b0f11 100644 --- a/Medianno/MAMedia.h +++ b/Medianno/MAMedia.h @@ -8,7 +8,6 @@ #import #import -#import @class MAAnno, MADocument; diff --git a/Medianno/MAMovieWindow.h b/Medianno/MAMovieWindow.h index 966569e..8064bb5 100644 --- a/Medianno/MAMovieWindow.h +++ b/Medianno/MAMovieWindow.h @@ -7,13 +7,14 @@ // #import -#import +#import +#import @interface MAMovieWindow : NSWindowController { - IBOutlet QTMovieView * panelMovieView; + IBOutlet AVPlayerView * panelMovieView; } -- (BOOL)shouldDisplayMovie:(QTMovie *)movie withTitle:(NSString *)title; +- (BOOL)shouldDisplayMovie:(AVPlayer *)movie withTitle:(NSString *)title; - (IBAction)toggleWindow:(id)sender; @end diff --git a/Medianno/MAMovieWindow.mm b/Medianno/MAMovieWindow.mm index 26dfc09..ea2b33a 100644 --- a/Medianno/MAMovieWindow.mm +++ b/Medianno/MAMovieWindow.mm @@ -23,14 +23,14 @@ [super windowDidLoad]; } -- (BOOL)shouldDisplayMovie:(QTMovie *)movie withTitle:(NSString *)title +- (BOOL)shouldDisplayMovie:(AVPlayer *)movie withTitle:(NSString *)title { if ([self isWindowLoaded] && [[self window] isVisible]) { - [panelMovieView setMovie:movie]; + [panelMovieView setPlayer:movie]; [[self window] setTitle:title]; return YES; } else { - [panelMovieView setMovie:nil]; + [panelMovieView setPlayer:nil]; [[self window] setTitle:@""]; return NO; } @@ -60,4 +60,4 @@ return NO; } -@end \ No newline at end of file +@end diff --git a/Medianno/MAShortenQTTime.h b/Medianno/MAShortenQTTime.h index a03b52c..87f3cba 100644 --- a/Medianno/MAShortenQTTime.h +++ b/Medianno/MAShortenQTTime.h @@ -8,6 +8,9 @@ #import +NSString * MAStringFromTime(CFTimeInterval time); +CFTimeInterval MATimeFromString(NSString * timeStr); + @interface MAShortenQTTime : NSValueTransformer @end diff --git a/Medianno/MAShortenQTTime.mm b/Medianno/MAShortenQTTime.mm index 51ab073..10a77d4 100644 --- a/Medianno/MAShortenQTTime.mm +++ b/Medianno/MAShortenQTTime.mm @@ -7,7 +7,45 @@ // #import "MAShortenQTTime.h" -#import + +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 @@ -21,31 +59,25 @@ return NO; } -- (id)transformedValue:(id)value { - NSString * fullTime = [value isKindOfClass:[NSString class]] ? value : QTStringFromTime([value QTTimeValue]); - NSRange rangeToUse = {0,0}; - // - // Trim leading zeros, up to a point - // - while (rangeToUse.location < 6) { - switch ([fullTime characterAtIndex:rangeToUse.location]) { - case '0': - case ':': - ++rangeToUse.location; - continue; +- (id)transformedValue:(id)value +{ + NSUInteger seconds = [value unsignedIntegerValue]; + if (NSUInteger minutes = seconds/60) { + seconds %= 60; + if (NSUInteger hours = minutes/60) { + minutes %= 60; + if (NSUInteger days = hours/24) { + hours %= 24; + return [NSString stringWithFormat:@"%tu:%02tu:%02tu:%02tu", days, hours, minutes, seconds]; + } else { + 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 diff --git a/Medianno/MATokenFieldCell.mm b/Medianno/MATokenFieldCell.mm index c0585fa..21633b7 100644 --- a/Medianno/MATokenFieldCell.mm +++ b/Medianno/MATokenFieldCell.mm @@ -15,7 +15,7 @@ static NSCharacterSet * sOverrideTokenizingCharacters; - (NSCharacterSet *)tokenizingCharacterSet { if (!sOverrideTokenizingCharacters) - sOverrideTokenizingCharacters = [[NSCharacterSet characterSetWithCharactersInString:@";"] retain]; + sOverrideTokenizingCharacters = [NSCharacterSet characterSetWithCharactersInString:@";"]; return sOverrideTokenizingCharacters; } diff --git a/Medianno/en.lproj/MADocument.xib b/Medianno/en.lproj/MADocument.xib index 6ff53ca..0d67ce8 100644 --- a/Medianno/en.lproj/MADocument.xib +++ b/Medianno/en.lproj/MADocument.xib @@ -1,4155 +1,517 @@ - - - 1070 - 14A361c - 6206.9 - 1339 - 755.00 - - 6206.9 - 6206.9 - - - NSArrayController - NSBox - NSButton - NSButtonCell - NSCustomObject - NSDateFormatter - NSScrollView - NSScroller - NSSearchField - NSSearchFieldCell - NSSplitView - NSTableCellView - NSTableColumn - NSTableHeaderView - NSTableView - NSTextField - NSTextFieldCell - NSTokenField - NSTokenFieldCell - NSToolbar - NSToolbarFlexibleSpaceItem - NSToolbarItem - NSToolbarSeparatorItem - NSToolbarSpaceItem - NSUserDefaultsController - NSView - NSWindowTemplate - QTMovieView - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.QTKitIBPlugin - - - - - MADocWindow - - - FirstResponder - - - 4111 - 2 - {{200, 400}, {1280, 809}} - 1886912512 - Window - MADocumentWindow - - - EA8EC1DA-CC5D-4AE8-8D57-425A1B52FC07 - - - YES - YES - YES - NO - 1 - 1 - - - - 10408ABC-594E-48CD-9161-E21F2A53A796 - - Play - Play - - - - NSImage - play - - - - {0, 0} - {0, 0} - YES - YES - 102 - YES - 0 - - - - 18FD3E74-6E8C-445B-B04D-55EDA8F7ECE7 - - Annotate - Annotate - - - - NSImage - anno - - - - {0, 0} - {0, 0} - YES - YES - 104 - YES - 0 - - - - 50E0FA3B-2905-4F98-A78B-101A3698D85B - - << - << - - - - 268 - {{0, 14}, {32, 32}} - _NS:1491 - YES - - 67633152 - 134217728 - - - YES - 13 - 1044 - - _NS:1491 - - -2042347520 - 134 - - NSImage - rev - - - - 400 - 75 - - NO - - - - - {32, 32} - {32, 32} - YES - YES - 0 - YES - 0 - - - - 664414C9-912C-4CDB-AA38-3FE2DED268DC - - Delete - Delete - - - - NSImage - del - - - - {0, 0} - {0, 0} - YES - YES - 104 - YES - 0 - - - - 8C60B854-069F-498C-B9DA-51102A7886FD - - Print - Print - - - - NSImage - print - - - - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - - B6B844F6-1F51-4108-8EE4-3DBAF516ED46 - - >> - >> - - - - 268 - {{0, 14}, {32, 32}} - _NS:1491 - YES - - 67633152 - 134217728 - - - _NS:1491 - - -2042347520 - 134 - - NSImage - fwd - - - - 400 - 75 - - NO - - - - - {32, 32} - {32, 32} - YES - YES - 0 - YES - 0 - - - - D1B223FD-2B2A-471D-A6A4-0230D2846698 - - Customize - Customize - - - - NSImage - custom - - - - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - - F098D458-9396-4287-B8C8-F9F580B07CFA - - Search - Search - - - - 268 - {{0, 14}, {96, 22}} - _NS:123 - 100 - YES - - 342884416 - 268436544 - - predicate - _NS:123 - - YES - 1 - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - controlTextColor - - 3 - MAA - - - - 0 - 0 - search - - _searchFieldSearch: - - 138690560 - 0 - - 400 - 75 - - - 0 - 0 - clear - - - cancel - - - - - _searchFieldCancel: - - 138690560 - 0 - - 400 - 75 - - 255 - BgAAAA - - NO - 1 - - - - - {96, 22} - {200, 22} - YES - YES - 100 - YES - 0 - - - NSToolbarFlexibleSpaceItem - - Flexible Space - - - - - - {1, 5} - {20000, 32} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - - - - NSToolbarSeparatorItem - - Separator - - - - - - {12, 5} - {12, 1000} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - - - - - NSToolbarSpaceItem - - Space - - - - - - {32, 5} - {32, 10000} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {450, 400} - - - 256 - - - - 274 - - - - 292 - - - - 2322 - - - - 256 - {1280, 183} - - - - _NS:1197 - YES - NO - YES - - - 256 - {1280, 17} - - - - _NS:1199 - - - - - -2147483392 - {{224, 0}, {16, 17}} - _NS:1202 - - - - 284.265625 - 250 - 500 - - 75497536 - 2048 - Name - - YES - 11 - 3100 - - - 3 - MC4zMzMzMzI5ODU2AA - - - 6 - System - headerTextColor - - - - - 337641536 - 2048 - Text Cell - - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - - - 3 - YES - YES - - - - 846.296875 - 50 - 5200 - - 75497536 - 2048 - Notes - - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 140 - 140 - 140 - - 75497536 - 2048 - Date - - - 6 - System - headerColor - - - - - - 337641536 - -2147481600 - Text Cell - - - - yyyy-MM-dd HH:mm - - - - - yyyy-MM-dd HH:mm - NO - - - - - - 3 - YES - YES - - - - 3 - 2 - - - 6 - System - gridColor - - 3 - MC41AA - - - 17 - -683638784 - - - 1 - 15 - 0 - NO - 0 - 1 - - - {{1, 17}, {1279, 183}} - - - - _NS:1195 - - - 4 - YES - - - - -2147483392 - {{224, 17}, {15, 102}} - - - - _NS:1214 - NO - _doScroller: - - - _doScroller: - 37 - 0.1947367936372757 - - - - 256 - {{1, 184}, {1279, 16}} - - - - _NS:1216 - YES - NO - _doScroller: - - 1 - - _doScroller: - 0.99921875000000004 - - - - 2338 - - - - {{1, 0}, {1279, 17}} - - - - _NS:1200 - - YES - - - {1281, 201} - - - - _NS:1193 - YES - 133810 - - - - - QSAAAEEgAABBmAAAQZgAAA - 0.25 - 4 - 1 - - - - 268 - - - - 274 - - - - 266 - - Apple URL pasteboard type - CorePasteboardFlavorType 0x6D6F6F76 - NSFilenamesPboardType - QTMoviePasteboardType - - {{103, 583}, {1178, 18}} - - - - _NS:46 - - 1 - MSAxIDEgMAA - - - - - - - - - 274 - - - - 2322 - - - - 256 - - - - 274 - - - - 266 - {100, 17} - - - - YES - - 67108928 - 71305216 - Table View Cell - - - - 6 - System - controlColor - - - - - NO - 1 - - - {{1, 1}, {100, 17}} - - - - - - - 274 - - - - 268 - - NSStringPboardType - - {549, 17} - - - - _NS:3123 - YES - - 337641472 - 4194304 - - YES - 12 - 4883 - - _NS:3123 - - YES - - - - 0.0 - 0 - - NO - 1 - 2 - - - {{104, 1}, {549, 17}} - - - - - - - 274 - - - - 266 - {620, 17} - - - - YES - - 337641537 - 272631808 - Table View Cell - - - - - - NO - 1 - - - {{656, 1}, {620, 17}} - - - - - - {1278, 565} - - - - _NS:1197 - YES - NO - YES - - - 256 - {1278, 17} - - - - _NS:1199 - - - - - -2147483392 - {{224, 0}, {16, 17}} - _NS:1202 - - - - 100 - 100 - 100 - - 75497536 - 2048 - Time - - - 3 - MC4zMzMzMzI5ODU2AA - - - - - 337641536 - 67110912 - Text Cell - - - - - - 3 - YES - - - - tags - 549 - 200 - 2000 - - 75497536 - 2048 - Tags - - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 620 - 50 - 3.4028234663852886e+38 - - 75497536 - 2048 - Notes - - - - - - 337641536 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 3 - 2 - - - 17 - -71270400 - - - 1 - 1 - 15 - 0 - NO - 0 - 1 - - - {{1, 17}, {1278, 565}} - - - - _NS:1195 - - - 4 - YES - - - - -2147483392 - {{224, 17}, {15, 102}} - - - - _NS:1214 - NO - _doScroller: - - - _doScroller: - 0.98210290827740487 - - - - -2147483392 - {{1, 566}, {1279, 15}} - - - - _NS:1216 - NO - _doScroller: - - 1 - - _doScroller: - 0.99224204809930183 - - - - 2338 - - - - {{1, 0}, {1278, 17}} - - - - - YES - - - {1280, 583} - - - - _NS:1193 - 133682 - - - - - QSAAAEEgAABBmAAAQZgAAA - 0.25 - 4 - 1 - - - - 268 - {{0, 582}, {103, 20}} - - - - _NS:161 - YES - - 67108864 - 67108864 - Button - - _NS:161 - - -2038284288 - 162 - - - 200 - 25 - - NO - - - {1281, 599} - - - - _NS:11 - - - {{0, 211}, {1281, 599}} - - - - _NS:9 - YES - {0, 0} - - 67108864 - 0 - Box - - - - 6 - System - labelColor - - - - - 0 - 4 - 0 - NO - - - - {1281, 810} - - - - 3 - - - {1280, 809} - - - - - {{0, 0}, {1440, 877}} - {450, 478} - {10000000000000, 10000000000000} - 128 - YES - - - NSApplication - - - YES - YES - - MAMedia - - YES - YES - YES - YES - YES - YES - - - YES - - - YES - YES - - MAAnno - - YES - YES - YES - YES - YES - YES - - - - 34 - - - - 274 - - - - 268 - {{16, 39}, {144, 18}} - - - _NS:239 - YES - - -2080374784 - 0 - Export Annotations - - _NS:239 - - 1211912448 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - NO - - - - 268 - {{16, 20}, {98, 18}} - - _NS:239 - YES - - -2080374784 - 0 - Export Tags - - _NS:239 - - 1211912448 - 2 - - - - - 200 - 25 - - NO - - - {166, 65} - - - _NS:632 - - - {166, 65} - - _NS:630 - {0, 0} - - 67108864 - 0 - Export - - - - - - 0 - 0 - 0 - NO - - - - - - - window - - - - 18 - - - - mediaController - - - - 100155 - - - - movieView - - - - 100156 - - - - annotationController - - - - 100160 - - - - annotationTable - - - - 100176 - - - - mediaTable - - - - 100177 - - - - addAnnotation: - - - - 100200 - - - - textExportAccessoryView - - - - 100240 - - - - toggleMediaPlay: - - - - 100275 - - - - addAnnotation: - - - - 100282 - - - - delete: - - - - 100284 - - - - runToolbarCustomizationPalette: - - - - 100288 - - - - mediaSkipForward: - - - - 100293 - - - - mediaSkipBackward: - - - - 100308 - - - - delegate - - - - 17 - - - - dataSource - - - - 100261 - - - - value: arrangedObjects.name - - - - - - value: arrangedObjects.name - value - arrangedObjects.name - 2 - - - 100088 - - - - textColor: arrangedObjects.media - - - - - - textColor: arrangedObjects.media - textColor - arrangedObjects.media - - NSValueTransformerName - MAColorForURL - - 2 - - - 100246 - - - - value: arrangedObjects.notes - - - - - - value: arrangedObjects.notes - value - arrangedObjects.notes - 2 - - - 100090 - - - - value: arrangedObjects.date - - - - - - value: arrangedObjects.date - value - arrangedObjects.date - - NSAllowsEditingMultipleValuesSelection - - - 2 - - - 100093 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 100217 - - - - delegate - - - - 100228 - - - - selectionIndexes: selectionIndexes - - - - - - selectionIndexes: selectionIndexes - selectionIndexes - selectionIndexes - - 2 - - - 100248 - - - - dataSource - - - - 100262 - - - - value: arrangedObjects.location - - - - - - value: arrangedObjects.location - value - arrangedObjects.location - - - - MAShortenQTTime - - 2 - - - 100183 - - - - value: arrangedObjects.tagDescriptions - - - - - - value: arrangedObjects.tagDescriptions - value - arrangedObjects.tagDescriptions - - NSCreatesSortDescriptor - - - 2 - - - 100192 - - - - value: arrangedObjects.notes - - - - - - value: arrangedObjects.notes - value - arrangedObjects.notes - - NSCreatesSortDescriptor - - - 2 - - - 100159 - - - - managedObjectContext: document.managedObjectContext - - - - - - managedObjectContext: document.managedObjectContext - managedObjectContext - document.managedObjectContext - 2 - - - 100179 - - - - delegate - - - - 100180 - - - - contentSet: selection.annotations - - - - - - contentSet: selection.annotations - contentSet - selection.annotations - - NSDeletesObjectsOnRemove - - - 2 - - - 100151 - - - - managedObjectContext: document.managedObjectContext - - - - - - managedObjectContext: document.managedObjectContext - managedObjectContext - document.managedObjectContext - 2 - - - 100178 - - - - title: currentMovieTime - - - - - - title: currentMovieTime - title - currentMovieTime - - NSValueTransformerName - MAShortenQTTime - - 2 - - - 100201 - - - - textField - - - - 100205 - - - - value: objectValue.location - - - - - - value: objectValue.location - value - objectValue.location - - NSValueTransformerName - MAShortenQTTime - - 2 - - - 100220 - - - - textField - - - - 100213 - - - - value: objectValue.notes - - - - - - value: objectValue.notes - value - objectValue.notes - 2 - - - 100219 - - - - value: objectValue.tagDescriptions - - - - - - value: objectValue.tagDescriptions - value - objectValue.tagDescriptions - 2 - - - 100225 - - - - delegate - - - - 100223 - - - - value: exportAnnotations - - - - - - value: exportAnnotations - value - exportAnnotations - 2 - - - 100242 - - - - value: exportTags - - - - - - value: exportTags - value - exportTags - 2 - - - 100243 - - - - delegate - - - - 100289 - - - - value: searchString - - - - - - value: searchString - value - searchString - 2 - - - 100316 - - - - enabled: selection.@count - - - - - - enabled: selection.@count - enabled - selection.@count - - - - - - 2 - - - 100302 - - - - enabled: selection.@count - - - - - - enabled: selection.@count - enabled - selection.@count - - - - - - 2 - - - 100307 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - - - - - - -1 - - - First Responder - - - - - - - - 5 - - - - - - - Window - - - - - - - - 6 - - - - - - - - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {1280, 809} - - - - - - - - - - - - - - - - - - - - - - - - ibDesignableContentView.ibShadowedSubviews - - - - - - - - -3 - - - Application - - - - - - - - 100086 - - - MediaController - - - - - - - - 100094 - - - - - - - - - - 100130 - - - - - - - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {1281, 810} - - - - - - - - - - - - - - - - - - - - - - - - ibShadowedSubviews - - - - - - - - - 100021 - - - - - - - - - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {1281, 201} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100129 - - - - - - - - - - - - - - - 1 - {0, 211} - - - - - - - - 2 - {1281, 599} - - - - - - - - - - - - - - - - - - - - - - - - ibDesignableContentView.ibShadowedSubviews - - - - - - - - - - 100034 - - - - - - - - - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {1280, 583} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100033 - - - Movie View - - - - - - - - 1 - {103, 583} - - - - - - - - 2 - {1178, 18} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100035 - - - - - - - - - - 1 - {224, 17} - - - - - - - - 2 - {15, 102} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100036 - - - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {1278, 17} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100037 - - - - - - - - - - 1 - {1, 566} - - - - - - - - 2 - {1279, 15} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100038 - - - - - - - - Table View - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {1278, 565} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100039 - - - - - - - - - - - - - - 100040 - - - - - - - - - - - - - - 100043 - - - - - - - - - - - - - - 100044 - - - - - - - - - - 100041 - - - - - - - - - - 100042 - - - - - - - - - - 100025 - - - - - - - - Table View - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {1280, 183} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100024 - - - - - - - - - - 1 - {1, 185} - - - - - - - - 2 - {1278, 15} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100023 - - - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {1280, 17} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100022 - - - - - - - - - - 1 - {224, 17} - - - - - - - - 2 - {15, 102} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100030 - - - - - - - - - - - - - 100027 - - - - - - - - - - - - - 100026 - - - - - - - - - - - - - 100029 - - - - - - - - - - 100028 - - - - - - - - - - 100031 - - - - - - - - - - - - - 100032 - - - - - - - - - - 100148 - - - AnnotationController - - - - - - - - 100197 - - - - - - - - - - - - - 1 - {0, 582} - - - - - - - - 2 - {103, 20} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100198 - - - - - - - - - - 100202 - - - - - - - - - - - - - 1 - {1, 1} - - - - - - - - 2 - {100, 17} - - - - - - - - - - - - - - - - - - - - - - - - ibDesignableContentView.ibShadowedSubviews - - - - - - - - 100203 - - - - - - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {100, 17} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100204 - - - - - - - - - - 100206 - - - - - - - - - - - - - 1 - {104, 1} - - - - - - - - 2 - {549, 17} - - - - - - - - - - - - - - - - - - - - - - - - ibDesignableContentView.ibShadowedSubviews - - - - - - - - 100210 - - - - - - Table Cell View - - - - - - - - 1 - {656, 1} - - - - - - - - 2 - {620, 17} - - - - - - - - - - - - - - - - - - - - - - - - ibDesignableContentView.ibShadowedSubviews - - - - - - - - 100211 - - - - - - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {620, 17} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100212 - - - - - - - - - - 100221 - - - - - - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {549, 17} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100222 - - - - - - - - - - 100229 - - - - - - - Text Export Options - - - - - - - - 1 - {0, 0} - - - - - - - - 2 - {166, 65} - - - - - - - - - - - - - - - - - - - - - - - - ibDesignableContentView.ibShadowedSubviews - - - - - - - - - 100236 - - - - - - - - - - - - - 1 - {16, 39} - - - - - - - - 2 - {144, 18} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100237 - - - - - - - - - - 100238 - - - - - - - - - - - - - 1 - {16, 20} - - - - - - - - 2 - {98, 18} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100239 - - - - - - - - - - 100263 - - - - - - - - - - - - - - - - - - - - - - - 100267 - - - - - - - - - - 100268 - - - - - - - - - - 100269 - - - - - - - - - - 100272 - - - - - - - - - - 100278 - - - - - - - - - - 100281 - - - - - - - - - - - - - 100279 - - - - - - - - - - - - - 1 - {0, 14} - - - - - - - - 2 - {96, 22} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100280 - - - - - - - - - - 100283 - - - - - - - - - - 100286 - - - - - - - - - - 100287 - - - - - - - - - - 100292 - - - - - - - - - - - - - 100290 - - - - - - - - - - - - - 1 - {0, 14} - - - - - - - - 2 - {32, 32} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100291 - - - - - - - - - - 100303 - - - - - - - - - - - - - 100304 - - - - - - Toolbar Button - - - - - - - - 1 - {0, 14} - - - - - - - - 2 - {32, 32} - - - - - - - - - - - - - - - - - - - - - - - - - - - 100305 - - - - - - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.QTKitIBPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - MATokenFieldCell - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - MAToolbarButton - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - MAToolbarButton - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - {{133, 170}, {507, 413}} - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - 100316 - - - - - MADocWindow - NSWindowController - - id - id - id - id - id - id - id - id - id - - - - addAnnotation: - id - - - addMediaFiles: - id - - - delete: - id - - - exportMedia: - id - - - exportText: - id - - - importText: - id - - - mediaSkipBackward: - id - - - mediaSkipForward: - id - - - toggleMediaPlay: - id - - - - NSArrayController - NSTableView - NSArrayController - NSTableView - QTMovieView - NSView - - - - annotationController - NSArrayController - - - annotationTable - NSTableView - - - mediaController - NSArrayController - - - mediaTable - NSTableView - - - movieView - QTMovieView - - - textExportAccessoryView - NSView - - - - IBProjectSource - ../Medianno/MADocWindow.h - - - - MADocWindow - - id - id - id - id - id - id - id - id - - - - addAnnotation: - id - - - addMediaFiles: - id - - - exportMedia: - id - - - exportText: - id - - - importText: - id - - - mediaSkipBackward: - id - - - mediaSkipForward: - id - - - toggleMediaPlay: - id - - - - IBProjectSource - ../Medianno/MADocWindow.mm - - - - MADocWindow - - id - id - id - - - - copy: - id - - - cut: - id - - - paste: - id - - - - IBProjectSource - ../Medianno/MADragging.h - - - - MADocWindow - - id - id - id - - - - copy: - id - - - cut: - id - - - paste: - id - - - - IBProjectSource - ../Medianno/MADragging.mm - - - - MADocumentWindow - NSWindow - - - - MATagWindow - - id - id - - - - copy: - id - - - cut: - id - - - - - - MATagWindow - - id - id - - - - copy: - id - - - cut: - id - - - - - - MATagWindow - NSWindowController - - id - id - - - - delete: - id - - - toggleWindow: - id - - - - NSArrayController - NSTableView - - - - tagController - NSArrayController - - - tagTable - NSTableView - - - - IBProjectSource - ../Medianno/MATagWindow.h - - - - MATagWindow - - id - id - - - - delete: - id - - - toggleWindow: - id - - - - IBProjectSource - ../Medianno/MATagWindow.mm - - - - MATokenFieldCell - NSTokenFieldCell - - IBProjectSource - ../Medianno/MATokenFieldCell.h - - - - MAToolbarButton - NSButton - - IBProjectSource - ../Medianno/MAToolbarButton.h - - - - - 0 - IBCocoaFramework - NO - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - {12, 12} - {10, 2} - {15, 15} - {512, 512} - {512, 512} - {512, 512} - {512, 512} - {512, 512} - {512, 512} - {512, 512} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MAColorForURL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MAShortenQTTime + + + + + + + + + + + + + + + + MAShortenQTTime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Medianno/en.lproj/MAMovie.xib b/Medianno/en.lproj/MAMovie.xib index eeb9582..94dee0c 100644 --- a/Medianno/en.lproj/MAMovie.xib +++ b/Medianno/en.lproj/MAMovie.xib @@ -1,277 +1,37 @@ - - - 1070 - 11B26 - 1617 - 1138 - 566.00 - - YES - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.QTKitIBPlugin - - - YES - 1617 - 518 - - - - YES - NSWindowTemplate - NSView - QTMovieView - NSCustomObject - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.QTKitIBPlugin - - - YES - - YES - - - - - YES - - MAMovieWindow - - - FirstResponder - - - NSApplication - - - 95 - 2 - {{1887, 836}, {640, 496}} - -1540357120 - Window - MAMovieWin - - - - - 256 - - YES - - - 274 - - YES - - YES - Apple URL pasteboard type - CorePasteboardFlavorType 0x6D6F6F76 - NSFilenamesPboardType - QTMoviePasteboardType - - - {640, 496} - - _NS:46 - - 3 - MAA - - - - - - - - {640, 496} - - - _NS:2837 - - {{0, 0}, {2560, 1418}} - {10000000000000, 10000000000000} - MAMoviePanel - YES - - - - - YES - - - window - - - - 5 - - - - panelMovieView - - - - 12 - - - - delegate - - - - 13 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 3 - - - YES - - - - - - 4 - - - YES - - - - - - 6 - - - Movie View - - - - - YES - - YES - -1.IBPluginDependency - -2.IBPluginDependency - -3.IBPluginDependency - 3.IBNSWindowAutoPositionCentersHorizontal - 3.IBNSWindowAutoPositionCentersVertical - 3.IBPluginDependency - 3.NSWindowTemplate.visibleAtLaunch - 4.IBPluginDependency - 6.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.QTKitIBPlugin - - - - YES - - - - - - YES - - - - - 13 - - - - YES - - MAMovieWin - NSPanel - - IBProjectSource - ./Classes/MAMovieWin.h - - - - MAMovieWindow - NSWindowController - - toggleWindow: - id - - - toggleWindow: - - toggleWindow: - id - - - - panelMovieView - QTMovieView - - - panelMovieView - - panelMovieView - QTMovieView - - - - IBProjectSource - ./Classes/MAMovieWindow.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - 3 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +