OffScreenStreamRender
public class OffScreenStreamRender
extension OffScreenStreamRender: GlRenderSinkListener
Object that renders an off-screen video stream
-
Stream scale type.
See moreDeclaration
Swift
public enum ScaleType : Int, CustomStringConvertible
-
Closure called at each frame
Declaration
Swift
public var frameReadyAction: (() -> Void)?
-
Displayed stream.
Declaration
Swift
public private(set) var stream: Stream? { get }
-
Enabling of histograms computing. ‘true’ to enable the histograms computing.
Histograms will be received by the call of renderOverlay(OverlayerData).
Declaration
Swift
public var histogramsEnabled: Bool { get set }
-
Rendering overlayer.
Declaration
Swift
public weak var overlayer: Overlayer? { get set }
-
Enabling of zebras of overexposure image zones. ‘true’ to enable the zebras of overexposure zone.
Declaration
Swift
public var zebrasEnabled: Bool { get set }
-
Threshold of overexposure used by zebras, in range [0.0, 1.0]. ‘0.0’ for the maximum of zebras and ‘1.0’ for the minimum.
Default value is 0,94.
Declaration
Swift
public var zebrasThreshold: Double { get set }
-
Listener that will be called when content zone changed. Parameter zone of the listener represents the new contentZone.
Declaration
Swift
public var contentZoneListener: ((_ contentZone: CGRect) -> Void)?
-
Content drawing zone; coordinates are relative to the view.
Declaration
Swift
public private(set) var contentZone: CGRect { get set }
-
Rendering scale type.
Declaration
Swift
public var renderingScaleType: OffScreenStreamRender.ScaleType { get set }
-
Frame Buffer Object where each frame are rendered.
Declaration
Swift
public private(set) var fbo: GGLFbo { get }
-
Define a new render size for the FBO.
Declaration
Swift
@discardableResult public func changeSize(newSize: CGSize) -> Bool
Parameters
newSize
Size of the FBO where the stream will be rendered.
Return Value
true if the FBO as been updated, false otherwise.
-
Attaches stream to be rendered. Client is responsible to detach any stream before the the view is disposed, otherwise, leak may occur.
Declaration
Swift
public func setStream(stream: Stream?)
Parameters
stream
stream to render, ‘nil’ to detach stream.
-
Declaration
Swift
public func onRenderingMayStart(renderer: GlRenderSink)
-
Declaration
Swift
public func onRenderingMustStop(renderer: GlRenderSink)
-
Declaration
Swift
public func onFrameReady(renderer: GlRenderSink)
-
Declaration
Swift
public func onPreferredFpsChanged(renderer: GlRenderSink, fps: Float)
-
Declaration
Swift
public func onContentZoneChange(contentZone: CGRect)