TSWriter

public final class TSWriter<T> where T : TSWriterDelegate

The TSWriter class represents writes MPEG-2 transport stream data.

  • Specifies the delegate instance.

    Declaration

    Swift

    public weak var delegate: T?
  • 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()