Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
55df3265
Commit
55df3265
authored
Sep 19, 2015
by
Dikay900
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PR #4003
parent
6282ff08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
cap_ios.h
modules/videoio/include/opencv2/videoio/cap_ios.h
+2
-0
cap_ios_video_camera.mm
modules/videoio/src/cap_ios_video_camera.mm
+8
-2
No files found.
modules/videoio/include/opencv2/videoio/cap_ios.h
View file @
55df3265
...
...
@@ -71,6 +71,7 @@
@property
(
nonatomic
,
readonly
)
BOOL
captureSessionLoaded
;
@property
(
nonatomic
,
assign
)
int
defaultFPS
;
@property
(
nonatomic
,
readonly
)
AVCaptureVideoPreviewLayer
*
captureVideoPreviewLayer
;
@property
(
nonatomic
,
assign
)
AVCaptureDevicePosition
defaultAVCaptureDevicePosition
;
@property
(
nonatomic
,
assign
)
AVCaptureVideoOrientation
defaultAVCaptureVideoOrientation
;
@property
(
nonatomic
,
assign
)
BOOL
useAVCaptureVideoPreviewLayer
;
...
...
@@ -145,6 +146,7 @@
-
(
void
)
layoutPreviewLayer
;
-
(
void
)
saveVideo
;
-
(
NSURL
*
)
videoFileURL
;
-
(
NSString
*
)
videoFileString
;
@end
...
...
modules/videoio/src/cap_ios_video_camera.mm
View file @
55df3265
...
...
@@ -41,7 +41,9 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
@interface CvVideoCamera ()
@interface CvVideoCamera () {
int recordingCountDown;
}
- (void)createVideoDataOutput;
- (void)createVideoFileOutput;
...
...
@@ -98,6 +100,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
- (void)start;
{
recordingCountDown = 10;
[super start];
if (self.recordVideo == YES) {
...
...
@@ -551,7 +554,8 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
});
if (self.recordVideo == YES) {
recordingCountDown--;
if (self.recordVideo == YES && recordingCountDown < 0) {
lastSampleTime = CMSampleBufferGetPresentationTimeStamp(sampleBuffer);
// CMTimeShow(lastSampleTime);
if (self.recordAssetWriter.status != AVAssetWriterStatusWriting) {
...
...
@@ -571,6 +575,8 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
withPresentationTime:lastSampleTime] ) {
NSLog(@"Video Writing Error");
}
if (pixelBuffer != nullptr)
CVPixelBufferRelease(pixelBuffer);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment