Merge "Wrap exoplayer ParserException" into rvc-dev am: 1f448ea03c am: 8cb834fd8c
Change-Id: Idc40076c6a8613e115c46d9680ced4d3af9aaf7f
This commit is contained in:
@@ -25,6 +25,7 @@ import android.util.SparseArray;
|
||||
|
||||
import com.google.android.exoplayer2.C;
|
||||
import com.google.android.exoplayer2.Format;
|
||||
import com.google.android.exoplayer2.ParserException;
|
||||
import com.google.android.exoplayer2.extractor.DefaultExtractorInput;
|
||||
import com.google.android.exoplayer2.extractor.Extractor;
|
||||
import com.google.android.exoplayer2.extractor.ExtractorInput;
|
||||
@@ -431,6 +432,14 @@ public final class MediaParser {
|
||||
}
|
||||
}
|
||||
|
||||
/** Thrown when an error occurs while parsing a media stream. */
|
||||
public static final class ParsingException extends IOException {
|
||||
|
||||
private ParsingException(ParserException cause) {
|
||||
super(cause);
|
||||
}
|
||||
}
|
||||
|
||||
// Public constants.
|
||||
|
||||
/**
|
||||
@@ -768,6 +777,8 @@ public final class MediaParser {
|
||||
int result = 0;
|
||||
try {
|
||||
result = mExtractor.read(mExtractorInput, mPositionHolder);
|
||||
} catch (ParserException e) {
|
||||
throw new ParsingException(e);
|
||||
} catch (InterruptedException e) {
|
||||
// TODO: Remove this exception replacement once we update the ExoPlayer version.
|
||||
throw new InterruptedIOException();
|
||||
|
||||
@@ -26462,6 +26462,9 @@ package android.media {
|
||||
method public void onTrackDataFound(int, @NonNull android.media.MediaParser.TrackData);
|
||||
}
|
||||
|
||||
public static final class MediaParser.ParsingException extends java.io.IOException {
|
||||
}
|
||||
|
||||
public static final class MediaParser.SeekMap {
|
||||
method public long getDurationMicros();
|
||||
method @NonNull public android.util.Pair<android.media.MediaParser.SeekPoint,android.media.MediaParser.SeekPoint> getSeekPoints(long);
|
||||
|
||||
Reference in New Issue
Block a user