(void)finishWritingWithCompletionHandler:(void (^)(void))handler
{
if (_assetWriter.status == AVAssetWriterStatusUnknown ||
_assetWriter.status == AVAssetWriterStatusCompleted) {
DLog(@"asset writer was in an unexpected state (%@)", @(_assetWriter.status));
return;
}
[_assetWriterVideoInput markAsFinished];
[_assetWriterAudioInput markAsFinished];
[_assetWriter finishWritingWithCompletionHandler:handler];
}
It seems like when I'm running this code, the assetWriter.status is AVAssetWriterStatusUnknown, so that vision(vision: PBJVision, capturedVideo videoDict: [NSObject : AnyObject]?, error: NSError?) never gets called.
It seems like when I'm running this code, the assetWriter.status is AVAssetWriterStatusUnknown, so that vision(vision: PBJVision, capturedVideo videoDict: [NSObject : AnyObject]?, error: NSError?) never gets called.