Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Commit

Permalink
Add fileURL parameter to visionWillStartWritingVideo delegate method
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-smule committed Oct 11, 2017
1 parent 121293a commit fa22525
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/PBJVision.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ static CGFloat const PBJVideoBitRate1280x750 = 5000000 * 8; // 40bmps
- (void)visionDidStartVideoCapture:(PBJVision *)vision;
- (void)visionDidPauseVideoCapture:(PBJVision *)vision; // stopped but not ended
- (void)visionDidResumeVideoCapture:(PBJVision *)vision;
- (void)visionWillStartWritingVideo:(PBJVision *)vision;
- (void)visionWillStartWritingVideo:(PBJVision *)vision fileURL:(NSURL *)fileURL;
- (void)visionWillEndVideoCapture:(PBJVision *)vision; // called before capturedVideo delegate method
- (void)vision:(PBJVision *)vision capturedVideo:(NSDictionary *)videoDict error:(NSError *)error;
- (void)visionCaptureDidFail:(PBJVision *)vision;
Expand Down
4 changes: 2 additions & 2 deletions Source/PBJVision.m
Original file line number Diff line number Diff line change
Expand Up @@ -2198,8 +2198,8 @@ - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CM

if (_flags.recording && CMTIME_IS_INVALID(_audioRecordOffset)) {
// this will grab the info need to compute _audioRecordOffset
if ([_delegate respondsToSelector:@selector(visionWillStartWritingVideo:)]) {
[_delegate visionWillStartWritingVideo:self];
if ([_delegate respondsToSelector:@selector(visionWillStartWritingVideo:fileURL:)]) {
[_delegate visionWillStartWritingVideo:self fileURL:_mediaWriter.outputURL];
}
}

Expand Down

0 comments on commit fa22525

Please sign in to comment.