Copy from V1: Extractor.release() method releases all kept resources.
This method is needed by FlacExtractor to release native resources. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=119143922
This commit is contained in:
parent
7c35e38b4e
commit
05ef643e28
@ -97,4 +97,8 @@ public interface Extractor {
|
|||||||
*/
|
*/
|
||||||
void seek();
|
void seek();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Releases all kept resources.
|
||||||
|
*/
|
||||||
|
void release();
|
||||||
}
|
}
|
||||||
|
@ -119,6 +119,11 @@ public final class FlvExtractor implements Extractor, SeekMap {
|
|||||||
bytesToNextTagHeader = 0;
|
bytesToNextTagHeader = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(ExtractorInput input, PositionHolder seekPosition) throws IOException,
|
public int read(ExtractorInput input, PositionHolder seekPosition) throws IOException,
|
||||||
InterruptedException {
|
InterruptedException {
|
||||||
|
@ -272,6 +272,11 @@ public final class MatroskaExtractor implements Extractor {
|
|||||||
resetSample();
|
resetSample();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(ExtractorInput input, PositionHolder seekPosition) throws IOException,
|
public int read(ExtractorInput input, PositionHolder seekPosition) throws IOException,
|
||||||
InterruptedException {
|
InterruptedException {
|
||||||
|
@ -110,6 +110,11 @@ public final class Mp3Extractor implements Extractor {
|
|||||||
sampleBytesRemaining = 0;
|
sampleBytesRemaining = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(ExtractorInput input, PositionHolder seekPosition)
|
public int read(ExtractorInput input, PositionHolder seekPosition)
|
||||||
throws IOException, InterruptedException {
|
throws IOException, InterruptedException {
|
||||||
|
@ -169,6 +169,11 @@ public final class FragmentedMp4Extractor implements Extractor {
|
|||||||
enterReadingAtomHeaderState();
|
enterReadingAtomHeaderState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(ExtractorInput input, PositionHolder seekPosition)
|
public int read(ExtractorInput input, PositionHolder seekPosition)
|
||||||
throws IOException, InterruptedException {
|
throws IOException, InterruptedException {
|
||||||
|
@ -106,6 +106,11 @@ public final class Mp4Extractor implements Extractor, SeekMap {
|
|||||||
parserState = STATE_AFTER_SEEK;
|
parserState = STATE_AFTER_SEEK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(ExtractorInput input, PositionHolder seekPosition)
|
public int read(ExtractorInput input, PositionHolder seekPosition)
|
||||||
throws IOException, InterruptedException {
|
throws IOException, InterruptedException {
|
||||||
|
@ -93,6 +93,11 @@ public final class OggVorbisExtractor implements Extractor, SeekMap {
|
|||||||
scratch.reset();
|
scratch.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(ExtractorInput input, PositionHolder seekPosition)
|
public int read(ExtractorInput input, PositionHolder seekPosition)
|
||||||
throws IOException, InterruptedException {
|
throws IOException, InterruptedException {
|
||||||
|
@ -121,6 +121,11 @@ public final class AdtsExtractor implements Extractor {
|
|||||||
adtsReader.seek();
|
adtsReader.seek();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(ExtractorInput input, PositionHolder seekPosition)
|
public int read(ExtractorInput input, PositionHolder seekPosition)
|
||||||
throws IOException, InterruptedException {
|
throws IOException, InterruptedException {
|
||||||
|
@ -120,6 +120,11 @@ public final class PsExtractor implements Extractor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(ExtractorInput input, PositionHolder seekPosition)
|
public int read(ExtractorInput input, PositionHolder seekPosition)
|
||||||
throws IOException, InterruptedException {
|
throws IOException, InterruptedException {
|
||||||
|
@ -123,6 +123,11 @@ public final class TsExtractor implements Extractor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(ExtractorInput input, PositionHolder seekPosition)
|
public int read(ExtractorInput input, PositionHolder seekPosition)
|
||||||
throws IOException, InterruptedException {
|
throws IOException, InterruptedException {
|
||||||
|
@ -58,6 +58,11 @@ public final class WavExtractor implements Extractor, SeekMap {
|
|||||||
pendingBytes = 0;
|
pendingBytes = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(ExtractorInput input, PositionHolder seekPosition)
|
public int read(ExtractorInput input, PositionHolder seekPosition)
|
||||||
throws IOException, InterruptedException {
|
throws IOException, InterruptedException {
|
||||||
|
@ -86,6 +86,11 @@ import java.util.regex.Pattern;
|
|||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void release() {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(ExtractorInput input, PositionHolder seekPosition)
|
public int read(ExtractorInput input, PositionHolder seekPosition)
|
||||||
throws IOException, InterruptedException {
|
throws IOException, InterruptedException {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user