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

Commit

Permalink
add didWriteVideo for SI-18675
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Moldover committed Feb 26, 2018
1 parent a74674e commit 69af472
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/PBJVision.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ static CGFloat const PBJVideoBitRate1280x750 = 5000000 * 8; // 40bmps
@property (nonatomic) CMTime audioToVideoRecordStartOffset;

@property (nonatomic, readonly) NSURL *captureOutputURL;
@property (nonatomic, readonly) BOOL didWriteVideo;

- (NSTimeInterval)startDiffFromAudioStartTimestamp:(CMTime)audioStartTimestamp;
- (void)setAudioStartTimestamp:(CMTime)audioStartTimestamp;
Expand Down
6 changes: 6 additions & 0 deletions Source/PBJVision.m
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,12 @@ - (NSURL *)captureOutputURL
return _mediaWriter.outputURL;
}

// tells us if we were able to capture and write video during the previous capture session
- (BOOL)didWriteVideo
{
return _flags.videoWritten;
}

- (Float64)capturedAudioSeconds
{
if (_mediaWriter && CMTIME_IS_VALID(_mediaWriter.audioTimestamp)) {
Expand Down

0 comments on commit 69af472

Please sign in to comment.