Class SimpleMetadataDecoder
- java.lang.Object
-
- com.google.android.exoplayer2.metadata.SimpleMetadataDecoder
-
- All Implemented Interfaces:
MetadataDecoder
- Direct Known Subclasses:
AppInfoTableDecoder
,EventMessageDecoder
,IcyDecoder
,Id3Decoder
,SpliceInfoDecoder
@Deprecated public abstract class SimpleMetadataDecoder extends Object implements MetadataDecoder
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.AMetadataDecoder
base class that validates input buffers and discards any for whichBuffer.isDecodeOnly()
istrue
.
-
-
Constructor Summary
Constructors Constructor Description SimpleMetadataDecoder()
Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Metadata
decode(MetadataInputBuffer inputBuffer)
Deprecated.Decodes aMetadata
element from the provided input buffer.protected abstract Metadata
decode(MetadataInputBuffer inputBuffer, ByteBuffer buffer)
Deprecated.Called bydecode(MetadataInputBuffer)
after input buffer validation has been performed, except in the case thatBuffer.isDecodeOnly()
istrue
.
-
-
-
Method Detail
-
decode
@Nullable public final Metadata decode(MetadataInputBuffer inputBuffer)
Deprecated.Description copied from interface:MetadataDecoder
Decodes aMetadata
element from the provided input buffer.Respects
Buffer.limit()
ofinputBuffer.data
, but assumesBuffer.position()
andByteBuffer.arrayOffset()
are both zero andByteBuffer.hasArray()
is true.- Specified by:
decode
in interfaceMetadataDecoder
- Parameters:
inputBuffer
- The input buffer to decode.- Returns:
- The decoded metadata object, or
null
if the metadata could not be decoded or ifBuffer.isDecodeOnly()
was set on the input buffer.
-
decode
@Nullable protected abstract Metadata decode(MetadataInputBuffer inputBuffer, ByteBuffer buffer)
Deprecated.Called bydecode(MetadataInputBuffer)
after input buffer validation has been performed, except in the case thatBuffer.isDecodeOnly()
istrue
.- Parameters:
inputBuffer
- The input buffer to decode.buffer
- The input buffer'sdata buffer
, for convenience. Validation bydecode(com.google.android.exoplayer2.metadata.MetadataInputBuffer)
guarantees thatByteBuffer.hasArray()
,Buffer.position()
andByteBuffer.arrayOffset()
aretrue
,0
and0
respectively.- Returns:
- The decoded metadata object, or
null
if the metadata could not be decoded.
-
-