TSWriter
public final class TSWriter
An object that represents writes MPEG-2 transport stream data.
-
An asynchronous sequence for writing data.
Declaration
Swift
public var output: AsyncStream<Data> { get }
-
Specifies the exptected medias = [.video, .audio].
Declaration
Swift
public var expectedMedias: Set<AVMediaType>
-
Specifies the audio format.
Declaration
Swift
public var audioFormat: AVAudioFormat? { get set }
-
Specifies the video format.
Declaration
Swift
public var videoFormat: CMFormatDescription? { get set }
-
Creates a new instance with segument duration.
Declaration
Swift
public init(segmentDuration: Double = 2.0)
-
Appends a buffer.
Declaration
Swift
public func append(_ audioBuffer: AVAudioBuffer, when: AVAudioTime)
-
Appends a buffer.
Declaration
Swift
public func append(_ sampleBuffer: CMSampleBuffer)
-
Clears the writer object for new transport stream.
Declaration
Swift
public func clear()