Back to Exoplayer

OggOpusAudioPacketizer (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/audio/OggOpusAudioPacketizer.html

latest3.1 KB
Original Source

Package com.google.android.exoplayer2.audio

Class OggOpusAudioPacketizer


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classOggOpusAudioPacketizerextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

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.

A packetizer that encapsulates Opus audio encodings in Ogg packets.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | OggOpusAudioPacketizer() | Deprecated.

Creates an instance. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | void | packetize​(DecoderInputBuffer inputBuffer, List<byte[]> initializationData) | Deprecated.

Packetizes the audio data between the position and limit of the inputBuffer. | | void | reset() | Deprecated.

Resets the packetizer. |

- 

Methods inherited from class java.lang.Object

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

Constructor Detail

- 

OggOpusAudioPacketizer

public OggOpusAudioPacketizer()

Deprecated.

Creates an instance.

Method Detail

- 

packetize

public void packetize​([DecoderInputBuffer](../decoder/DecoderInputBuffer.html "class in com.google.android.exoplayer2.decoder")inputBuffer,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<byte[]> initializationData)

Deprecated.

Packetizes the audio data between the position and limit of the inputBuffer. Parameters:inputBuffer - The input buffer to packetize. It must be a direct ByteBuffer with LITTLE_ENDIAN order. The contents will be overwritten with the Ogg packet. The caller retains ownership of the provided buffer.initializationData - contains set-up data for the Opus Decoder. The data will be provided in an Ogg ID Header Page prepended to the bitstream. The list should contain either one or three byte arrays. The first item is the payload for the Ogg ID Header Page. If three items, then it also contains the Opus pre-skip and seek pre-roll values in that order.

- 

reset

public void reset()

Deprecated.

Resets the packetizer.