Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
moving VIM-3844 changes into this PR since a lot has changed and ther…
Browse files Browse the repository at this point in the history
…e will be merge conflicts
  • Loading branch information
alfiehanssen committed Mar 31, 2016
1 parent 3cf3924 commit c68a0a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions VimeoUpload/Upload/Operations/Async/ExportOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ExportOperation: ConcurrentOperation

convenience init(asset: AVAsset)
{
let exportSession = AVAssetExportSession(asset: asset, presetName: AVAssetExportPresetHighestQuality)!
let exportSession = AVAssetExportSession(asset: asset, presetName: AVAssetExportPresetPassthrough)!

self.init(exportSession: exportSession)
}
Expand Down Expand Up @@ -115,7 +115,8 @@ class ExportOperation: ConcurrentOperation
}

// AVAssetExportSession does not do an internal check to see if there's ample disk space available to perform the export [AH] 12/06/2015

// However this check will not work with presetName "passthrough" since that preset reports estimatedOutputFileLength of zero always.

let availableDiskSpace = try? NSFileManager.defaultManager().availableDiskSpace() // Double optional
if let diskSpace = availableDiskSpace, let space = diskSpace where space.longLongValue < self.exportSession.estimatedOutputFileLength
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class PHAssetExportSessionOperation: ConcurrentOperation
self.cleanup()
}

init(phAsset: PHAsset, exportPreset: String = AVAssetExportPresetHighestQuality)
init(phAsset: PHAsset, exportPreset: String = AVAssetExportPresetPassthrough)
{
self.phAsset = phAsset
self.exportPreset = exportPreset
Expand Down

0 comments on commit c68a0a6

Please sign in to comment.