docs/doc/reference/com/google/android/exoplayer2/source/rtsp/reader/RtpPayloadReader.html
Package com.google.android.exoplayer2.source.rtsp.reader
RtpAc3Reader, RtpPcmReaderpublic interfaceRtpPayloadReader
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.
Extracts media samples from the payload of received RTP packets.
Nested Classes | Modifier and Type | Interface | Description |
| --- | --- | --- |
| static interface | RtpPayloadReader.Factory |
Deprecated.
Factory of RtpPayloadReader instances.
|
All Methods Instance Methods Abstract 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. |
-
void createTracks([ExtractorOutput](../../../extractor/ExtractorOutput.html "interface in com.google.android.exoplayer2.extractor")extractorOutput,
int trackId)
Deprecated.
Initializes the reader by providing its output and track id.
Parameters:extractorOutput - The ExtractorOutput instance that receives the extracted data.trackId - The track identifier to set on the format.
-
void onReceivingFirstPacket(long timestamp,
int sequenceNumber)
Deprecated.
This method should be called on reading the first packet in a stream of incoming packets.
Parameters: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.
-
void consume([ParsableByteArray](../../../util/ParsableByteArray.html "class in com.google.android.exoplayer2.util")data,
long timestamp,
int sequenceNumber,
boolean rtpMarker)
throws[ParserException](../../../ParserException.html "class in com.google.android.exoplayer2")
Deprecated.
Consumes the payload from the an RTP packet.
Parameters: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.Throws:ParserException - If the data could not be parsed.
-
void seek(long nextRtpTimestamp,
long timeUs)
Deprecated.
Seeks the reader.
This method must only be invoked after the PLAY request for seeking is acknowledged by the RTSP server.
Parameters:nextRtpTimestamp - The timestamp of the first packet to arrive after seek.timeUs - The server acknowledged seek time in microseconds.