Commit f9f95d63 by olly Committed by Oliver Woodman

Make ExtractorSampleSource amenable to proguarding.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122085277
parent 356288a0
......@@ -283,8 +283,8 @@ public class PlayerActivity extends Activity implements SurfaceHolder.Callback,
case Util.TYPE_OTHER:
Allocator allocator = new DefaultAllocator(C.DEFAULT_BUFFER_SEGMENT_SIZE);
DataSource dataSource = dataSourceFactory.createDataSource(player.getBandwidthMeter());
return new ExtractorSampleSource(uri, dataSource, allocator,
C.DEFAULT_MUXED_BUFFER_SIZE, player.getMainHandler(), player, 0);
return new ExtractorSampleSource(uri, dataSource, allocator, C.DEFAULT_MUXED_BUFFER_SIZE,
player.getMainHandler(), player, 0, ExtractorSampleSource.newDefaultExtractors());
default:
throw new IllegalStateException("Unsupported type: " + type);
}
......
......@@ -19,6 +19,7 @@ import com.google.android.exoplayer.DefaultTrackSelector;
import com.google.android.exoplayer.ExoPlaybackException;
import com.google.android.exoplayer.ExoPlayer;
import com.google.android.exoplayer.TrackRenderer;
import com.google.android.exoplayer.extractor.Extractor;
import com.google.android.exoplayer.extractor.ExtractorSampleSource;
import com.google.android.exoplayer.extractor.mkv.MatroskaExtractor;
import com.google.android.exoplayer.upstream.DefaultAllocator;
......@@ -83,7 +84,7 @@ public class FlacPlaybackTest extends InstrumentationTestCase {
new DefaultDataSource(context, null, Util.getUserAgent(context, "ExoPlayerExtFlacTest"),
false),
new DefaultAllocator(BUFFER_SEGMENT_SIZE), BUFFER_SEGMENT_SIZE * BUFFER_SEGMENT_COUNT,
new MatroskaExtractor());
new Extractor[] {new MatroskaExtractor()});
player.setSource(sampleSource);
player.setPlayWhenReady(true);
Looper.loop();
......
......@@ -19,6 +19,7 @@ import com.google.android.exoplayer.DefaultTrackSelector;
import com.google.android.exoplayer.ExoPlaybackException;
import com.google.android.exoplayer.ExoPlayer;
import com.google.android.exoplayer.TrackRenderer;
import com.google.android.exoplayer.extractor.Extractor;
import com.google.android.exoplayer.extractor.ExtractorSampleSource;
import com.google.android.exoplayer.extractor.mkv.MatroskaExtractor;
import com.google.android.exoplayer.upstream.DefaultAllocator;
......@@ -83,7 +84,7 @@ public class OpusPlaybackTest extends InstrumentationTestCase {
new DefaultDataSource(context, null, Util.getUserAgent(context, "ExoPlayerExtOpusTest"),
false),
new DefaultAllocator(BUFFER_SEGMENT_SIZE), BUFFER_SEGMENT_SIZE * BUFFER_SEGMENT_COUNT,
new MatroskaExtractor());
new Extractor[] {new MatroskaExtractor()});
player.setSource(sampleSource);
player.setPlayWhenReady(true);
Looper.loop();
......
......@@ -19,6 +19,7 @@ import com.google.android.exoplayer.DefaultTrackSelector;
import com.google.android.exoplayer.ExoPlaybackException;
import com.google.android.exoplayer.ExoPlayer;
import com.google.android.exoplayer.TrackRenderer;
import com.google.android.exoplayer.extractor.Extractor;
import com.google.android.exoplayer.extractor.ExtractorSampleSource;
import com.google.android.exoplayer.extractor.mkv.MatroskaExtractor;
import com.google.android.exoplayer.upstream.DefaultAllocator;
......@@ -99,7 +100,7 @@ public class VpxPlaybackTest extends InstrumentationTestCase {
new DefaultDataSource(context, null, Util.getUserAgent(context, "ExoPlayerExtVP9Test"),
false),
new DefaultAllocator(BUFFER_SEGMENT_SIZE), BUFFER_SEGMENT_SIZE * BUFFER_SEGMENT_COUNT,
new MatroskaExtractor());
new Extractor[] {new MatroskaExtractor()});
player.sendMessage(videoRenderer, LibvpxVideoTrackRenderer.MSG_SET_OUTPUT_BUFFER_RENDERER,
new VpxVideoSurfaceView(context));
player.setSource(sampleSource);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment