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

Commit

Permalink
Add startDiffFromAudioStartTimestamp temporarily to make it easy to d…
Browse files Browse the repository at this point in the history
…etect bad state
  • Loading branch information
anton-smule committed Oct 13, 2017
1 parent f661e32 commit 135b2d6
Show file tree
Hide file tree
Showing 2 changed files with 6 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, readonly) NSURL *captureOutputURL;

- (NSTimeInterval)startDiffFromAudioStartTimestamp:(CMTime)audioStartTimestamp;
- (void)setAudioStartTimestamp:(CMTime)audioStartTimestamp;
- (void)setAudioStopTimestamp:(CMTime)audioStopTimestamp;

Expand Down
5 changes: 5 additions & 0 deletions Source/PBJVision.m
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,11 @@ - (AVCaptureDeviceFormat *)formatForDevice:(AVCaptureDevice*)device withDim:(NSI
return nil;
}

- (NSTimeInterval)startDiffFromAudioStartTimestamp:(CMTime)audioStartTimestamp
{
return CMTimeGetSeconds(CMTimeSubtract(_startTimestamp, audioStartTimestamp));
}

- (void)setAudioStartTimestamp:(CMTime)audioStartTimestamp
{
if (CMTIME_IS_VALID(_startTimestamp))
Expand Down

0 comments on commit 135b2d6

Please sign in to comment.