- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
60 lines
2.5 KiB
Java
60 lines
2.5 KiB
Java
package com.mbridge.msdk.playercommon.exoplayer2.text;
|
|
|
|
import com.mbridge.msdk.playercommon.exoplayer2.decoder.SimpleDecoder;
|
|
import java.nio.ByteBuffer;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public abstract class SimpleSubtitleDecoder extends SimpleDecoder<SubtitleInputBuffer, SubtitleOutputBuffer, SubtitleDecoderException> implements SubtitleDecoder {
|
|
private final String name;
|
|
|
|
public abstract Subtitle decode(byte[] bArr, int i, boolean z) throws SubtitleDecoderException;
|
|
|
|
@Override // com.mbridge.msdk.playercommon.exoplayer2.decoder.Decoder
|
|
public final String getName() {
|
|
return this.name;
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.playercommon.exoplayer2.text.SubtitleDecoder
|
|
public void setPositionUs(long j) {
|
|
}
|
|
|
|
public SimpleSubtitleDecoder(String str) {
|
|
super(new SubtitleInputBuffer[2], new SubtitleOutputBuffer[2]);
|
|
this.name = str;
|
|
setInitialInputBufferSize(1024);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.playercommon.exoplayer2.decoder.SimpleDecoder
|
|
public final SubtitleInputBuffer createInputBuffer() {
|
|
return new SubtitleInputBuffer();
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.playercommon.exoplayer2.decoder.SimpleDecoder
|
|
public final SubtitleOutputBuffer createOutputBuffer() {
|
|
return new SimpleSubtitleOutputBuffer(this);
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // com.mbridge.msdk.playercommon.exoplayer2.decoder.SimpleDecoder
|
|
public final SubtitleDecoderException createUnexpectedDecodeException(Throwable th) {
|
|
return new SubtitleDecoderException("Unexpected decode error", th);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.playercommon.exoplayer2.decoder.SimpleDecoder
|
|
public final void releaseOutputBuffer(SubtitleOutputBuffer subtitleOutputBuffer) {
|
|
super.releaseOutputBuffer((SimpleSubtitleDecoder) subtitleOutputBuffer);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.playercommon.exoplayer2.decoder.SimpleDecoder
|
|
public final SubtitleDecoderException decode(SubtitleInputBuffer subtitleInputBuffer, SubtitleOutputBuffer subtitleOutputBuffer, boolean z) {
|
|
try {
|
|
ByteBuffer byteBuffer = subtitleInputBuffer.data;
|
|
subtitleOutputBuffer.setContent(subtitleInputBuffer.timeUs, decode(byteBuffer.array(), byteBuffer.limit(), z), subtitleInputBuffer.subsampleOffsetUs);
|
|
subtitleOutputBuffer.clearFlag(Integer.MIN_VALUE);
|
|
return null;
|
|
} catch (SubtitleDecoderException e) {
|
|
return e;
|
|
}
|
|
}
|
|
}
|