Skip to content

Commit

Permalink
Update dev guide for r1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ojw28 committed Aug 4, 2015
1 parent 514ccb5 commit ec20681
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,8 @@ constructed.
{% highlight java %}
Allocator allocator = new DefaultAllocator(BUFFER_SEGMENT_SIZE);
DataSource dataSource = new DefaultUriDataSource(context, null, userAgent);
Mp4Extractor extractor = new Mp4Extractor();
ExtractorSampleSource sampleSource = new ExtractorSampleSource(
uri, dataSource, extractor, allocator, BUFFER_SEGMENT_COUNT * BUFFER_SEGMENT_SIZE);
uri, dataSource, allocator, BUFFER_SEGMENT_COUNT * BUFFER_SEGMENT_SIZE);
MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer(
sampleSource, MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT);
MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(sampleSource);
Expand Down Expand Up @@ -219,7 +218,7 @@ ChunkSource videoChunkSource = new DashChunkSource(manifestFetcher, videoAdaptat
videoRepresentationIndices, videoDataSource, new AdaptiveEvaluator(bandwidthMeter),
LIVE_EDGE_LATENCY_MS, elapsedRealtimeOffset, null, null);
ChunkSampleSource videoSampleSource = new ChunkSampleSource(videoChunkSource, loadControl,
VIDEO_BUFFER_SEGMENTS * BUFFER_SEGMENT_SIZE, true);
VIDEO_BUFFER_SEGMENTS * BUFFER_SEGMENT_SIZE);
MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer(videoSampleSource,
MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT);

Expand All @@ -229,7 +228,7 @@ ChunkSource audioChunkSource = new DashChunkSource(manifestFetcher, audioAdaptat
null, audioDataSource, new FixedEvaluator(), LIVE_EDGE_LATENCY_MS, elapsedRealtimeOffset, null,
null);
ChunkSampleSource audioSampleSource = new ChunkSampleSource(audioChunkSource,
loadControl, AUDIO_BUFFER_SEGMENTS * BUFFER_SEGMENT_SIZE, true);
loadControl, AUDIO_BUFFER_SEGMENTS * BUFFER_SEGMENT_SIZE);
MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(audioSampleSource);
{% endhighlight %}

Expand Down Expand Up @@ -263,13 +262,8 @@ The following code example outlines how the video and audio renderers are constr
int[] variantIndices = null;
if (manifest instanceof HlsMasterPlaylist) {
HlsMasterPlaylist masterPlaylist = (HlsMasterPlaylist) manifest;
try {
variantIndices = VideoFormatSelectorUtil.selectVideoFormatsForDefaultDisplay(context,
masterPlaylist.variants, null, false);
} catch (DecoderQueryException e) {
callback.onRenderersError(e);
return;
}
variantIndices = VideoFormatSelectorUtil.selectVideoFormatsForDefaultDisplay(context,
masterPlaylist.variants, null, false);
}

// Build the renderers
Expand All @@ -279,7 +273,7 @@ DataSource dataSource = new DefaultUriDataSource(context, bandwidthMeter, userAg
HlsChunkSource chunkSource = new HlsChunkSource(dataSource, url, manifest, bandwidthMeter,
variantIndices, HlsChunkSource.ADAPTIVE_MODE_SPLICE, audioCapabilities);
HlsSampleSource sampleSource = new HlsSampleSource(chunkSource, loadControl,
BUFFER_SEGMENTS * BUFFER_SEGMENT_SIZE, true);
BUFFER_SEGMENTS * BUFFER_SEGMENT_SIZE);
MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer(sampleSource,
MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT);
MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(sampleSource);
Expand Down

0 comments on commit ec20681

Please sign in to comment.