Ac3Reader
@UnstableApi
class Ac3Reader : ElementaryStreamReader
Parses a continuous (E-)AC-3 byte stream and extracts individual samples.
Summary
Public constructors |
|---|
|
Constructs a new reader for (E-)AC-3 elementary streams. |
Ac3Reader(Constructs a new reader for (E-)AC-3 elementary streams. |
Public functions |
|
|---|---|
Unit |
consume(data: ParsableByteArray!)Consumes (possibly partial) data from the current packet. |
Unit |
createTracks(Initializes the reader by providing outputs and ids for the tracks. |
Unit |
packetFinished(isEndOfInput: Boolean)Called when a packet ends. |
Unit |
packetStarted(pesTimeUs: Long, @TsPayloadReader.Flags flags: Int)Called when a packet starts. |
Unit |
seek()Notifies the reader that a seek has occurred. |
Public constructors
Ac3Reader
Ac3Reader(containerMimeType: String!)
Constructs a new reader for (E-)AC-3 elementary streams.
| Parameters | |
|---|---|
containerMimeType: String! |
The MIME type of the container holding the stream. |
Ac3Reader
Ac3Reader(
language: String?,
@C.RoleFlags roleFlags: Int,
containerMimeType: String!
)
Constructs a new reader for (E-)AC-3 elementary streams.
| Parameters | |
|---|---|
language: String? |
Track language. |
@C.RoleFlags roleFlags: Int |
Track role flags. |
containerMimeType: String! |
The MIME type of the container holding the stream. |
Public functions
consume
fun consume(data: ParsableByteArray!): Unit
Consumes (possibly partial) data from the current packet.
| Parameters | |
|---|---|
data: ParsableByteArray! |
The data to consume. |
| Throws | |
|---|---|
androidx.media3.common.ParserException |
If the data could not be parsed. |
createTracks
fun createTracks(
extractorOutput: ExtractorOutput!,
idGenerator: TsPayloadReader.TrackIdGenerator!
): Unit
Initializes the reader by providing outputs and ids for the tracks.
| Parameters | |
|---|---|
extractorOutput: ExtractorOutput! |
The |
idGenerator: TsPayloadReader.TrackIdGenerator! |
A |
packetStarted
fun packetStarted(pesTimeUs: Long, @TsPayloadReader.Flags flags: Int): Unit
Called when a packet starts.
| Parameters | |
|---|---|
pesTimeUs: Long |
The timestamp associated with the packet. |
@TsPayloadReader.Flags flags: Int |