TsMuxer

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val info: TSMuxerInfo
Link copied to clipboard

Functions

Link copied to clipboard
fun addService(tsServiceInfo: TSServiceInfo)

Registers a new service. Service will be valid (tables will be emitted) as soon as streams will be added.

Link copied to clipboard
open override fun addStream(streamConfig: CodecConfig): Int

Adds a stream to the first service registered

Link copied to clipboard
open override fun addStreams(streamsConfig: List<CodecConfig>): Map<CodecConfig, Int>

Adds streams to the first service registered

fun addStreams(tsServiceInfo: TSServiceInfo, streamsConfig: List<CodecConfig>): Map<CodecConfig, Int>

Adds streams for a service

Link copied to clipboard

Gets registered services list

Link copied to clipboard
fun getStreams(mimeType: String): List<Stream>

Get list of streams from a MimeType

Link copied to clipboard
fun getStreamsId(mimeType: String): List<Short>

Get list of streams id from a MimeType

Link copied to clipboard
open override fun release()

Closes and releases resources

Link copied to clipboard
fun removeService(tsServiceInfo: TSServiceInfo)

Removes a service and its streams

Link copied to clipboard

Removes all services and their streams

Link copied to clipboard
fun removeStreams(tsServiceInfo: TSServiceInfo, streamsPid: List<Short>)

Removes streams from service.

Link copied to clipboard
open override fun startStream()

Starts frames or data stream generation Throws an exception if not ready for live stream

Link copied to clipboard
open override fun stopStream()

Clears all streams of all services

Link copied to clipboard
open override fun write(frame: Frame, streamPid: Int)

Encodes a frame to MPEG-TS format. Each audio frames and each video key frames must come with an extra buffer containing sps, pps,...