Rabbit-R1/android (non root)/java/sources/androidx/media3/extractor/metadata/SimpleMetadataDecoder.java

21 lines
880 B
Java
Raw Normal View History

2024-05-21 21:08:36 +00:00
package androidx.media3.extractor.metadata;
import androidx.media3.common.Metadata;
import androidx.media3.common.util.Assertions;
import java.nio.ByteBuffer;
/* loaded from: classes2.dex */
public abstract class SimpleMetadataDecoder implements MetadataDecoder {
protected abstract Metadata decode(MetadataInputBuffer metadataInputBuffer, ByteBuffer byteBuffer);
@Override // androidx.media3.extractor.metadata.MetadataDecoder
public final Metadata decode(MetadataInputBuffer metadataInputBuffer) {
ByteBuffer byteBuffer = (ByteBuffer) Assertions.checkNotNull(metadataInputBuffer.data);
Assertions.checkArgument(byteBuffer.position() == 0 && byteBuffer.hasArray() && byteBuffer.arrayOffset() == 0);
if (metadataInputBuffer.isDecodeOnly()) {
return null;
}
return decode(metadataInputBuffer, byteBuffer);
}
}