Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
37eec866
Commit
37eec866
authored
Dec 16, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added tap focus, tap exposure, tap reset layers
parent
2685c8f6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
117 deletions
+73
-117
Examples/Programmatic/CaptureView/CaptureView/ViewController.swift
+69
-115
Sources/CaptureSession.swift
+4
-2
Sources/CaptureView.swift
+0
-0
No files found.
Examples/Programmatic/CaptureView/CaptureView/ViewController.swift
View file @
37eec866
This diff is collapsed.
Click to expand it.
Sources/CaptureSession.swift
View file @
37eec866
...
@@ -392,7 +392,7 @@ public class CaptureSession : NSObject, AVCaptureFileOutputRecordingDelegate {
...
@@ -392,7 +392,7 @@ public class CaptureSession : NSObject, AVCaptureFileOutputRecordingDelegate {
/**
/**
:name: switchCameras
:name: switchCameras
*/
*/
public
func
switchCameras
()
{
public
func
switchCameras
(
completion
:
((
success
:
Bool
)
->
Void
)?
=
nil
)
{
if
canSwitchCameras
{
if
canSwitchCameras
{
do
{
do
{
self
.
delegate
?
.
captureSessionWillSwitchCameras
?(
self
,
position
:
self
.
cameraPosition
)
self
.
delegate
?
.
captureSessionWillSwitchCameras
?(
self
,
position
:
self
.
cameraPosition
)
...
@@ -407,8 +407,10 @@ public class CaptureSession : NSObject, AVCaptureFileOutputRecordingDelegate {
...
@@ -407,8 +407,10 @@ public class CaptureSession : NSObject, AVCaptureFileOutputRecordingDelegate {
self
.
session
.
addInput
(
self
.
activeVideoInput
)
self
.
session
.
addInput
(
self
.
activeVideoInput
)
}
}
self
.
session
.
commitConfiguration
()
self
.
session
.
commitConfiguration
()
completion
?(
success
:
true
)
self
.
delegate
?
.
captureSessionDidSwitchCameras
?(
self
,
position
:
self
.
cameraPosition
)
self
.
delegate
?
.
captureSessionDidSwitchCameras
?(
self
,
position
:
self
.
cameraPosition
)
}
catch
let
e
as
NSError
{
}
catch
let
e
as
NSError
{
completion
?(
success
:
false
)
self
.
delegate
?
.
captureSessionFailedWithError
?(
self
,
error
:
e
)
self
.
delegate
?
.
captureSessionFailedWithError
?(
self
,
error
:
e
)
}
}
}
}
...
@@ -560,7 +562,7 @@ public class CaptureSession : NSObject, AVCaptureFileOutputRecordingDelegate {
...
@@ -560,7 +562,7 @@ public class CaptureSession : NSObject, AVCaptureFileOutputRecordingDelegate {
:name: startRecording
:name: startRecording
*/
*/
public
func
startRecording
()
{
public
func
startRecording
()
{
if
!
self
.
isRecording
{
if
!
isRecording
{
dispatch_async
(
sessionQueue
)
{
dispatch_async
(
sessionQueue
)
{
let
connection
:
AVCaptureConnection
=
self
.
movieOutput
.
connectionWithMediaType
(
AVMediaTypeVideo
)
let
connection
:
AVCaptureConnection
=
self
.
movieOutput
.
connectionWithMediaType
(
AVMediaTypeVideo
)
connection
.
videoOrientation
=
self
.
currentVideoOrientation
connection
.
videoOrientation
=
self
.
currentVideoOrientation
...
...
Sources/CaptureView.swift
View file @
37eec866
This diff is collapsed.
Click to expand it.
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