# BasePacket

abstract class BasePacket(val psiManager: PsiManager, limitSize: Int)

Created by pedro on 20/8/23.

ISO/IEC 13818-1

Header (4 bytes):

Sync byte -> 8 bits Transport error indicator (TEI) -> 1 bit Payload unit start indicator (PUSI) -> 1 bit Transport priority -> 1 bit PID -> 13 bits Transport scrambling control (TSC) -> 2 bits Adaptation field control -> 2 bits Continuity counter -> 4 bits

Optional fields Adaptation field -> variable Payload data -> variable

#### Inheritors

AacPacket
H26XPacket
OpusPacket

## Constructors

BasePacket
Link copied to clipboard
constructor(psiManager: PsiManager, limitSize: Int)

## Properties

psiManager
Link copied to clipboard
val psiManager: PsiManager

## Functions

createAndSendPacket
Link copied to clipboard
abstract suspend fun createAndSendPacket(mediaFrame: MediaFrame, callback: suspend (List<MpegTsPacket>) -> Unit)
reset
Link copied to clipboard
fun reset(resetInfo: Boolean)
resetPacket
Link copied to clipboard
abstract fun resetPacket(resetInfo: Boolean)
setLimitSize
Link copied to clipboard
fun setLimitSize(limitSize: Int)