mirror of
https://github.com/androidx/media.git
synced 2025-05-04 22:20:47 +08:00
Fix Dackka javadoc errors in protected methods
If there's an @param javadoc tag in a supertype then all overrides of this method that don't also override the javadoc must use the same parameter name. PiperOrigin-RevId: 485857711
This commit is contained in:
parent
3fdfe585ff
commit
b8e5d708fc
@ -89,11 +89,11 @@ public abstract class SimpleSubtitleDecoder
|
||||
* Decodes data into a {@link Subtitle}.
|
||||
*
|
||||
* @param data An array holding the data to be decoded, starting at position 0.
|
||||
* @param size The size of the data to be decoded.
|
||||
* @param length The number of bytes from {@code data} to be decoded.
|
||||
* @param reset Whether the decoder must be reset before decoding.
|
||||
* @return The decoded {@link Subtitle}.
|
||||
* @throws SubtitleDecoderException If a decoding error occurs.
|
||||
*/
|
||||
protected abstract Subtitle decode(byte[] data, int size, boolean reset)
|
||||
protected abstract Subtitle decode(byte[] data, int length, boolean reset)
|
||||
throws SubtitleDecoderException;
|
||||
}
|
||||
|
@ -54,8 +54,9 @@ public final class PgsDecoder extends SimpleSubtitleDecoder {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Subtitle decode(byte[] data, int size, boolean reset) throws SubtitleDecoderException {
|
||||
buffer.reset(data, size);
|
||||
protected Subtitle decode(byte[] data, int length, boolean reset)
|
||||
throws SubtitleDecoderException {
|
||||
buffer.reset(data, length);
|
||||
maybeInflateData(buffer);
|
||||
cueBuilder.reset();
|
||||
ArrayList<Cue> cues = new ArrayList<>();
|
||||
|
@ -108,15 +108,15 @@ public final class SsaDecoder extends SimpleSubtitleDecoder {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Subtitle decode(byte[] bytes, int length, boolean reset) {
|
||||
protected Subtitle decode(byte[] data, int length, boolean reset) {
|
||||
List<List<Cue>> cues = new ArrayList<>();
|
||||
List<Long> cueTimesUs = new ArrayList<>();
|
||||
|
||||
ParsableByteArray data = new ParsableByteArray(bytes, length);
|
||||
ParsableByteArray parsableData = new ParsableByteArray(data, length);
|
||||
if (!haveInitializationData) {
|
||||
parseHeader(data);
|
||||
parseHeader(parsableData);
|
||||
}
|
||||
parseEventBody(data, cues, cueTimesUs);
|
||||
parseEventBody(parsableData, cues, cueTimesUs);
|
||||
return new SsaSubtitle(cues, cueTimesUs);
|
||||
}
|
||||
|
||||
|
@ -70,10 +70,10 @@ public final class SubripDecoder extends SimpleSubtitleDecoder {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Subtitle decode(byte[] bytes, int length, boolean reset) {
|
||||
protected Subtitle decode(byte[] data, int length, boolean reset) {
|
||||
ArrayList<Cue> cues = new ArrayList<>();
|
||||
LongArray cueTimesUs = new LongArray();
|
||||
ParsableByteArray subripData = new ParsableByteArray(bytes, length);
|
||||
ParsableByteArray subripData = new ParsableByteArray(data, length);
|
||||
|
||||
@Nullable String currentLine;
|
||||
while ((currentLine = subripData.readLine()) != null) {
|
||||
|
@ -113,7 +113,7 @@ public final class TtmlDecoder extends SimpleSubtitleDecoder {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Subtitle decode(byte[] bytes, int length, boolean reset)
|
||||
protected Subtitle decode(byte[] data, int length, boolean reset)
|
||||
throws SubtitleDecoderException {
|
||||
try {
|
||||
XmlPullParser xmlParser = xmlParserFactory.newPullParser();
|
||||
@ -121,7 +121,7 @@ public final class TtmlDecoder extends SimpleSubtitleDecoder {
|
||||
Map<String, TtmlRegion> regionMap = new HashMap<>();
|
||||
Map<String, String> imageMap = new HashMap<>();
|
||||
regionMap.put(TtmlNode.ANONYMOUS_REGION_ID, new TtmlRegion(TtmlNode.ANONYMOUS_REGION_ID));
|
||||
ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes, 0, length);
|
||||
ByteArrayInputStream inputStream = new ByteArrayInputStream(data, 0, length);
|
||||
xmlParser.setInput(inputStream, null);
|
||||
@Nullable TtmlSubtitle ttmlSubtitle = null;
|
||||
ArrayDeque<TtmlNode> nodeStack = new ArrayDeque<>();
|
||||
|
@ -123,9 +123,9 @@ public final class Tx3gDecoder extends SimpleSubtitleDecoder {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Subtitle decode(byte[] bytes, int length, boolean reset)
|
||||
protected Subtitle decode(byte[] data, int length, boolean reset)
|
||||
throws SubtitleDecoderException {
|
||||
parsableByteArray.reset(bytes, length);
|
||||
parsableByteArray.reset(data, length);
|
||||
String cueTextString = readSubtitleText(parsableByteArray);
|
||||
if (cueTextString.isEmpty()) {
|
||||
return Tx3gSubtitle.EMPTY;
|
||||
|
@ -49,11 +49,11 @@ public final class Mp4WebvttDecoder extends SimpleSubtitleDecoder {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Subtitle decode(byte[] bytes, int length, boolean reset)
|
||||
protected Subtitle decode(byte[] data, int length, boolean reset)
|
||||
throws SubtitleDecoderException {
|
||||
// Webvtt in Mp4 samples have boxes inside of them, so we have to do a traditional box parsing:
|
||||
// first 4 bytes size and then 4 bytes type.
|
||||
sampleData.reset(bytes, length);
|
||||
sampleData.reset(data, length);
|
||||
List<Cue> resultingCueList = new ArrayList<>();
|
||||
while (sampleData.bytesLeft() > 0) {
|
||||
if (sampleData.bytesLeft() < BOX_HEADER_SIZE) {
|
||||
|
@ -51,9 +51,9 @@ public final class WebvttDecoder extends SimpleSubtitleDecoder {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Subtitle decode(byte[] bytes, int length, boolean reset)
|
||||
protected Subtitle decode(byte[] data, int length, boolean reset)
|
||||
throws SubtitleDecoderException {
|
||||
parsableWebvttData.reset(bytes, length);
|
||||
parsableWebvttData.reset(data, length);
|
||||
List<WebvttCssStyle> definedStyles = new ArrayList<>();
|
||||
|
||||
// Validate the first line of the header, and skip the remainder.
|
||||
|
Loading…
x
Reference in New Issue
Block a user