NetStream
open class NetStream : NSObject
extension NetStream: IOScreenCaptureUnitDelegate
The NetStream
class is the foundation of a RTMPStream, HTTPStream.
-
The lockQueue.
Declaration
Swift
public let lockQueue: DispatchQueue
-
The mixer object.
Declaration
Swift
public private(set) var mixer: IOMixer { get }
-
Specifies the metadata for the stream.
Declaration
Swift
public var metadata: [String : Any?]
-
Specifies the context object.
Declaration
Swift
public var context: CIContext { get set }
-
Specifiet the device torch indicating wheter the turn on(TRUE) or not(FALSE).
Declaration
Swift
public var torch: Bool { get set }
-
Specifies the frame rate of a device capture.
Declaration
Swift
public var frameRate: Float64 { get set }
-
Specifies the sessionPreset for the AVCaptureSession.
Declaration
Swift
public var sessionPreset: AVCaptureSession.Preset { get set }
-
Specifies the video orientation for stream.
Declaration
Swift
public var videoOrientation: AVCaptureVideoOrientation { get set }
-
Specifies the multi camera capture properties.
Declaration
Swift
public var multiCamCaptureSettings: MultiCamCaptureSetting { get set }
-
Specifies the hasAudio indicies whether no signal audio or not.
Declaration
Swift
public var hasAudio: Bool { get set }
-
Specifies the hasVideo indicies whether freeze video signal or not.
Declaration
Swift
public var hasVideo: Bool { get set }
-
Specifies the audio compression properties.
Declaration
Swift
public var audioSettings: Setting<AudioCodec, AudioCodec.Option> { get set }
-
Specifies the video compression properties.
Declaration
Swift
public var videoSettings: Setting<VideoCodec, VideoCodec.Option> { get set }
-
Attaches the primary camera object.
Warning
This method can’t use appendSampleBuffer at the same time.Declaration
Swift
open func attachCamera(_ device: AVCaptureDevice?, onError: ((_ error: Error) -> Void)? = nil)
-
Attaches the 2ndary camera object for picture in picture.
Warning
This method can’t use appendSampleBuffer at the same time.Declaration
Swift
@available(iOS 13.0, *) open func attachMultiCamera(_ device: AVCaptureDevice?, onError: ((_ error: Error) -> Void)? = nil)
-
Attaches the audio capture object.
Warning
This method can’t use appendSampleBuffer at the same time.Declaration
Swift
open func attachAudio(_ device: AVCaptureDevice?, automaticallyConfiguresApplicationAudioSession: Bool = false, onError: ((_ error: Error) -> Void)? = nil)
-
Returns the IOVideoCaptureUnit by index.
Declaration
Swift
public func videoCapture(for index: Int) -> IOVideoCaptureUnit?
-
Append a CMSampleBuffer?.
Warning
This method can’t use attachCamera or attachAudio method at the same time.Declaration
Swift
open func appendSampleBuffer(_ sampleBuffer: CMSampleBuffer, withType: AVMediaType, options: [NSObject : AnyObject]? = nil)
-
Register a video effect.
Declaration
Swift
public func registerVideoEffect(_ effect: VideoEffect) -> Bool
-
Unregister a video effect.
Declaration
Swift
public func unregisterVideoEffect(_ effect: VideoEffect) -> Bool
-
Register a audio effect.
Declaration
Swift
public func registerAudioEffect(_ effect: AudioEffect) -> Bool
-
Unregister a audio effect.
Declaration
Swift
public func unregisterAudioEffect(_ effect: AudioEffect) -> Bool
-
Starts recording.
Declaration
Swift
public func startRecording(_ settings: [AVMediaType : [String : Any]])
-
Stop recording.
Declaration
Swift
public func stopRecording()
-
Declaration
Swift
public func session(_ session: IOScreenCaptureUnit, didOutput pixelBuffer: CVPixelBuffer, presentationTime: CMTime)