diff options
| author | Brian Jordan | 2012-03-28 20:39:32 -0400 |
|---|---|---|
| committer | Brian Jordan | 2012-03-28 20:39:32 -0400 |
| commit | af028612ee7ac7326524a66751b2d11aa955d1a9 (patch) | |
| tree | fc2ec27e77c52e1ea1b3e0c0a21f3ca7f118b914 /Video Tuneup/ViewController.m | |
| parent | 8c1195a075cf1e34d1d32d8cc51fbcda73b9fb50 (diff) | |
| download | Video-Tuneup-af028612ee7ac7326524a66751b2d11aa955d1a9.tar.bz2 | |
video is exporting
Diffstat (limited to 'Video Tuneup/ViewController.m')
| -rw-r--r-- | Video Tuneup/ViewController.m | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/Video Tuneup/ViewController.m b/Video Tuneup/ViewController.m index fe509c2..4e01e93 100644 --- a/Video Tuneup/ViewController.m +++ b/Video Tuneup/ViewController.m @@ -119,23 +119,11 @@ static const NSString *ItemStatusContext; // Initialize video editor self.editor = [[SimpleEditor alloc] init]; - - NSMutableArray *clips = [NSMutableArray arrayWithCapacity:3]; - - if(asset) { - [clips addObject:asset]; - [clips addObject:asset]; - [clips addObject:asset]; - } else {NSLog(@"Error! No Asset!"); return;} - - // Copy clips into editor -// self.editor.clips = [clips copy]; - self.editor.clips = clips; + self.editor.video = asset; - NSLog(@"Put clips in. Count is %i", [clips count]); - // Begin export [self.editor buildCompositionObjectsForPlayback:NO]; + NSLog(@"Put clips in. Build."); AVAssetExportSession *session = [self.editor assetExportSessionWithPreset:AVAssetExportPresetHighestQuality]; NSLog(@"Session"); @@ -157,8 +145,6 @@ static const NSString *ItemStatusContext; session.outputURL = [NSURL fileURLWithPath:filePath]; session.outputFileType = AVFileTypeQuickTimeMovie; - NSLog(@"Exporting asynchronously %i.", [clips count]); - [session exportAsynchronouslyWithCompletionHandler:^ { dispatch_async(dispatch_get_main_queue(), ^{ |
