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
124ec56c
Unverified
Commit
124ec56c
authored
Oct 30, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: added updates to CaptureDelgate organization
parent
321d15fb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
21 deletions
+47
-21
Sources/iOS/Capture/Capture.swift
+0
-0
Sources/iOS/Capture/CaptureController.swift
+0
-0
Sources/iOS/Capture/CaptureSession.swift
+31
-18
Sources/iOS/NavigationDrawerController.swift
+0
-3
Sources/iOS/RootController.swift
+10
-0
Sources/iOS/StatusBarController.swift
+6
-0
No files found.
Sources/iOS/Capture/Capture.swift
View file @
124ec56c
This diff is collapsed.
Click to expand it.
Sources/iOS/Capture/CaptureController.swift
View file @
124ec56c
This diff is collapsed.
Click to expand it.
Sources/iOS/Capture/CaptureSession.swift
View file @
124ec56c
...
...
@@ -169,7 +169,7 @@ public protocol CaptureSessionDelegate {
}
@objc(CaptureSession)
open
class
CaptureSession
:
NSObject
,
AVCaptureFileOutputRecordingDelegate
{
open
class
CaptureSession
:
NSObject
{
/// A reference to the session DispatchQueue.
private
var
sessionQueue
:
DispatchQueue
!
...
...
@@ -189,7 +189,7 @@ open class CaptureSession: NSObject, AVCaptureFileOutputRecordingDelegate {
private
var
movieOutputURL
:
URL
?
/// A reference to the AVCaptureSession.
internal
var
session
:
AVCaptureSession
!
internal
private(set)
var
session
:
AVCaptureSession
!
/// A boolean indicating if the session is running.
open
internal(set)
var
isRunning
=
false
...
...
@@ -376,12 +376,7 @@ open class CaptureSession: NSObject, AVCaptureFileOutputRecordingDelegate {
preset
=
.
presetHigh
super
.
init
()
prepareSession
()
prepareSessionQueue
()
prepareActiveVideoInput
()
prepareActiveAudioInput
()
prepareImageOutput
()
prepareMovieOutput
()
prepare
()
}
/// Starts the session.
...
...
@@ -673,16 +668,22 @@ open class CaptureSession: NSObject, AVCaptureFileOutputRecordingDelegate {
movieOutput
.
stopRecording
()
}
public
func
capture
(
_
captureOutput
:
AVCaptureFileOutput
!
,
didStartRecordingToOutputFileAt
fileURL
:
URL
!
,
fromConnections
connections
:
[
Any
]
!
)
{
isRecording
=
true
delegate
?
.
captureSessionDidStartRecordingToOutputFileAtURL
?(
session
:
self
,
captureOutput
:
captureOutput
,
fileURL
:
fileURL
as
NSURL
,
fromConnections
:
connections
)
}
public
func
capture
(
_
captureOutput
:
AVCaptureFileOutput
!
,
didFinishRecordingToOutputFileAt
outputFileURL
:
URL
!
,
fromConnections
connections
:
[
Any
]
!
,
error
:
Error
!
)
{
isRecording
=
false
delegate
?
.
captureSessionDidFinishRecordingToOutputFileAtURL
?(
session
:
self
,
captureOutput
:
captureOutput
,
outputFileURL
:
outputFileURL
as
NSURL
,
fromConnections
:
connections
,
error
:
error
)
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
()
{
prepareSession
()
prepareSessionQueue
()
prepareActiveVideoInput
()
prepareActiveAudioInput
()
prepareImageOutput
()
prepareMovieOutput
()
}
/// Prepares the sessionQueue.
private
func
prepareSessionQueue
()
{
...
...
@@ -781,3 +782,15 @@ open class CaptureSession: NSObject, AVCaptureFileOutputRecordingDelegate {
return
nil
}
}
extension
CaptureSession
:
AVCaptureFileOutputRecordingDelegate
{
public
func
capture
(
_
captureOutput
:
AVCaptureFileOutput
!
,
didStartRecordingToOutputFileAt
fileURL
:
URL
!
,
fromConnections
connections
:
[
Any
]
!
)
{
isRecording
=
true
delegate
?
.
captureSessionDidStartRecordingToOutputFileAtURL
?(
session
:
self
,
captureOutput
:
captureOutput
,
fileURL
:
fileURL
as
NSURL
,
fromConnections
:
connections
)
}
public
func
capture
(
_
captureOutput
:
AVCaptureFileOutput
!
,
didFinishRecordingToOutputFileAt
outputFileURL
:
URL
!
,
fromConnections
connections
:
[
Any
]
!
,
error
:
Error
!
)
{
isRecording
=
false
delegate
?
.
captureSessionDidFinishRecordingToOutputFileAtURL
?(
session
:
self
,
captureOutput
:
captureOutput
,
outputFileURL
:
outputFileURL
as
NSURL
,
fromConnections
:
connections
,
error
:
error
)
}
}
Sources/iOS/NavigationDrawerController.swift
View file @
124ec56c
...
...
@@ -307,9 +307,6 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
@IBInspectable
open
var
isHiddenStatusBarEnabled
=
true
/// Sets the statusBar to isHidden or not.
open
internal(set)
var
isStatusBarHidden
=
false
/**
A DepthPreset property that is used to set the depth of the
leftView when opened.
...
...
Sources/iOS/RootController.swift
View file @
124ec56c
...
...
@@ -40,6 +40,16 @@ open class RootController: UIViewController {
Device
.
statusBarStyle
=
value
}
}
/// Device visibility state.
open
var
isStatusBarHidden
:
Bool
{
get
{
return
Device
.
isStatusBarHidden
}
set
(
value
)
{
Device
.
isStatusBarHidden
=
value
}
}
/**
A Boolean property used to enable and disable interactivity
...
...
Sources/iOS/StatusBarController.swift
View file @
124ec56c
...
...
@@ -52,6 +52,12 @@ open class StatusBarController: RootController {
/// A reference to the statusBar.
open
private(set)
lazy
var
statusBar
=
View
()
open
override
var
isStatusBarHidden
:
Bool
{
didSet
{
statusBar
.
isHidden
=
isStatusBarHidden
}
}
/**
To execute in the order of the layout chain, override this
method. LayoutSubviews should be called immediately, unless you
...
...
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