Back to Exoplayer

RtpAc3Reader (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/source/rtsp/reader/RtpAc3Reader.html

latest5.4 KB
Original Source

Package com.google.android.exoplayer2.source.rtsp.reader

Class RtpAc3Reader

  • java.lang.Object

    • com.google.android.exoplayer2.source.rtsp.reader.RtpAc3Reader
  • All Implemented Interfaces:RtpPayloadReader


public final classRtpAc3Readerextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[RtpPayloadReader](RtpPayloadReader.html "interface in com.google.android.exoplayer2.source.rtsp.reader")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Parses an AC3 byte stream carried on RTP packets, and extracts AC3 frames.

Nested Class Summary

- 

Nested classes/interfaces inherited from interface com.google.android.exoplayer2.source.rtsp.reader.RtpPayloadReader

RtpPayloadReader.Factory

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | RtpAc3Reader​(RtpPayloadFormat payloadFormat) | Deprecated. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | void | consume​(ParsableByteArray data, long timestamp, int sequenceNumber, boolean rtpMarker) | Deprecated.

Consumes the payload from the an RTP packet. | | void | createTracks​(ExtractorOutput extractorOutput, int trackId) | Deprecated.

Initializes the reader by providing its output and track id. | | void | onReceivingFirstPacket​(long timestamp, int sequenceNumber) | Deprecated.

This method should be called on reading the first packet in a stream of incoming packets. | | void | seek​(long nextRtpTimestamp, long timeUs) | Deprecated.

Seeks the reader. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

RtpAc3Reader

public RtpAc3Reader​([RtpPayloadFormat](../RtpPayloadFormat.html "class in com.google.android.exoplayer2.source.rtsp")payloadFormat)

Deprecated.

Method Detail

- 

createTracks

public void createTracks​([ExtractorOutput](../../../extractor/ExtractorOutput.html "interface in com.google.android.exoplayer2.extractor")extractorOutput,
                         int trackId)

Deprecated.

Description copied from interface: RtpPayloadReader

Initializes the reader by providing its output and track id. Specified by:createTracks in interface RtpPayloadReaderParameters:extractorOutput - The ExtractorOutput instance that receives the extracted data.trackId - The track identifier to set on the format.

- 

onReceivingFirstPacket

public void onReceivingFirstPacket​(long timestamp,
                                   int sequenceNumber)

Deprecated.

Description copied from interface: RtpPayloadReader

This method should be called on reading the first packet in a stream of incoming packets. Specified by:onReceivingFirstPacket in interface RtpPayloadReaderParameters:timestamp - The timestamp associated with the first received RTP packet. This number has no unit, the duration conveyed by it depends on the frequency of the media that the RTP packet is carrying.sequenceNumber - The sequence associated with the first received RTP packet.

- 

consume

public void consume​([ParsableByteArray](../../../util/ParsableByteArray.html "class in com.google.android.exoplayer2.util")data,
                    long timestamp,
                    int sequenceNumber,
                    boolean rtpMarker)

Deprecated.

Description copied from interface: RtpPayloadReader

Consumes the payload from the an RTP packet. Specified by:consume in interface RtpPayloadReaderParameters:data - The RTP payload to consume.timestamp - The timestamp of the RTP packet that transmitted the data. This number has no unit, the duration conveyed by it depends on the frequency of the media that the RTP packet is carrying.sequenceNumber - The sequence number of the RTP packet.rtpMarker - The marker bit of the RTP packet. The interpretation of this bit is specific to each payload format.

- 

seek

public void seek​(long nextRtpTimestamp,
                 long timeUs)

Deprecated.

Description copied from interface: RtpPayloadReader

Seeks the reader.

This method must only be invoked after the PLAY request for seeking is acknowledged by the RTSP server.

Specified by:seek in interface RtpPayloadReaderParameters:nextRtpTimestamp - The timestamp of the first packet to arrive after seek.timeUs - The server acknowledged seek time in microseconds.