Rename SingleTrackMetadataOutput ahead of real metadata support

Issue #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144969838
This commit is contained in:
olly 2017-01-19 09:14:50 -08:00 committed by Oliver Woodman
parent ae01c1a6fd
commit 430d8e8a7a
3 changed files with 17 additions and 17 deletions

View file

@ -30,15 +30,15 @@ import java.io.IOException;
/**
* An {@link Extractor} wrapper for loading chunks containing a single track.
* <p>
* The wrapper allows switching of the {@link SingleTrackMetadataOutput} and {@link TrackOutput}
* which receive parsed data.
* The wrapper allows switching of the {@link SeekMapOutput} and {@link TrackOutput} that receive
* parsed data.
*/
public final class ChunkExtractorWrapper implements ExtractorOutput, TrackOutput {
/**
* Receives metadata associated with the track as extracted by the wrapped {@link Extractor}.
* Receives {@link SeekMap}s extracted by the wrapped {@link Extractor}.
*/
public interface SingleTrackMetadataOutput {
public interface SeekMapOutput {
/**
* @see ExtractorOutput#seekMap(SeekMap)
@ -53,7 +53,7 @@ public final class ChunkExtractorWrapper implements ExtractorOutput, TrackOutput
private final boolean resendFormatOnInit;
private boolean extractorInitialized;
private SingleTrackMetadataOutput metadataOutput;
private SeekMapOutput seekMapOutput;
private TrackOutput trackOutput;
private Format sentFormat;
@ -68,7 +68,7 @@ public final class ChunkExtractorWrapper implements ExtractorOutput, TrackOutput
* @param preferManifestDrmInitData Whether {@link DrmInitData} defined in {@code manifestFormat}
* should be preferred when the sample and manifest {@link Format}s are merged.
* @param resendFormatOnInit Whether the extractor should resend the previous {@link Format} when
* it is initialized via {@link #init(SingleTrackMetadataOutput, TrackOutput)}.
* it is initialized via {@link #init(SeekMapOutput, TrackOutput)}.
*/
public ChunkExtractorWrapper(Extractor extractor, Format manifestFormat,
boolean preferManifestDrmInitData, boolean resendFormatOnInit) {
@ -79,14 +79,14 @@ public final class ChunkExtractorWrapper implements ExtractorOutput, TrackOutput
}
/**
* Initializes the extractor to output to the provided {@link SingleTrackMetadataOutput} and
* Initializes the extractor to output to the provided {@link SeekMapOutput} and
* {@link TrackOutput} instances, and configures it to receive data from a new chunk.
*
* @param metadataOutput The {@link SingleTrackMetadataOutput} that will receive metadata.
* @param seekMapOutput The {@link SeekMapOutput} that will receive extracted {@link SeekMap}s.
* @param trackOutput The {@link TrackOutput} that will receive sample data.
*/
public void init(SingleTrackMetadataOutput metadataOutput, TrackOutput trackOutput) {
this.metadataOutput = metadataOutput;
public void init(SeekMapOutput seekMapOutput, TrackOutput trackOutput) {
this.seekMapOutput = seekMapOutput;
this.trackOutput = trackOutput;
if (!extractorInitialized) {
extractor.init(this);
@ -130,7 +130,7 @@ public final class ChunkExtractorWrapper implements ExtractorOutput, TrackOutput
@Override
public void seekMap(SeekMap seekMap) {
metadataOutput.seekMap(seekMap);
seekMapOutput.seekMap(seekMap);
}
// TrackOutput implementation.

View file

@ -21,7 +21,7 @@ import com.google.android.exoplayer2.extractor.DefaultTrackOutput;
import com.google.android.exoplayer2.extractor.Extractor;
import com.google.android.exoplayer2.extractor.ExtractorInput;
import com.google.android.exoplayer2.extractor.SeekMap;
import com.google.android.exoplayer2.source.chunk.ChunkExtractorWrapper.SingleTrackMetadataOutput;
import com.google.android.exoplayer2.source.chunk.ChunkExtractorWrapper.SeekMapOutput;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DataSpec;
import com.google.android.exoplayer2.util.Util;
@ -30,7 +30,7 @@ import java.io.IOException;
/**
* A {@link BaseMediaChunk} that uses an {@link Extractor} to decode sample data.
*/
public class ContainerMediaChunk extends BaseMediaChunk implements SingleTrackMetadataOutput {
public class ContainerMediaChunk extends BaseMediaChunk implements SeekMapOutput {
private final int chunkCount;
private final long sampleOffsetUs;
@ -85,7 +85,7 @@ public class ContainerMediaChunk extends BaseMediaChunk implements SingleTrackMe
return bytesLoaded;
}
// SingleTrackMetadataOutput implementation.
// SeekMapOutput implementation.
@Override
public final void seekMap(SeekMap seekMap) {

View file

@ -22,7 +22,7 @@ import com.google.android.exoplayer2.extractor.Extractor;
import com.google.android.exoplayer2.extractor.ExtractorInput;
import com.google.android.exoplayer2.extractor.SeekMap;
import com.google.android.exoplayer2.extractor.TrackOutput;
import com.google.android.exoplayer2.source.chunk.ChunkExtractorWrapper.SingleTrackMetadataOutput;
import com.google.android.exoplayer2.source.chunk.ChunkExtractorWrapper.SeekMapOutput;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DataSpec;
import com.google.android.exoplayer2.util.ParsableByteArray;
@ -32,7 +32,7 @@ import java.io.IOException;
/**
* A {@link Chunk} that uses an {@link Extractor} to decode initialization data for single track.
*/
public final class InitializationChunk extends Chunk implements SingleTrackMetadataOutput,
public final class InitializationChunk extends Chunk implements SeekMapOutput,
TrackOutput {
private final ChunkExtractorWrapper extractorWrapper;
@ -85,7 +85,7 @@ public final class InitializationChunk extends Chunk implements SingleTrackMetad
return seekMap;
}
// SingleTrackMetadataOutput implementation.
// SeekMapOutput implementation.
@Override
public void seekMap(SeekMap seekMap) {