Commit 84307eff by olly Committed by Oliver Woodman

Document ChunkSampleSource constructors.

Issue: #1030
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109674800
parent d7f40be3
...@@ -89,11 +89,25 @@ public class ChunkSampleSource implements SampleSource, SampleSourceReader, Load ...@@ -89,11 +89,25 @@ public class ChunkSampleSource implements SampleSource, SampleSourceReader, Load
private MediaFormat downstreamMediaFormat; private MediaFormat downstreamMediaFormat;
private Format downstreamFormat; private Format downstreamFormat;
/**
* @param chunkSource A {@link ChunkSource} from which chunks to load are obtained.
* @param loadControl Controls when the source is permitted to load data.
* @param bufferSizeContribution The contribution of this source to the media buffer, in bytes.
*/
public ChunkSampleSource(ChunkSource chunkSource, LoadControl loadControl, public ChunkSampleSource(ChunkSource chunkSource, LoadControl loadControl,
int bufferSizeContribution) { int bufferSizeContribution) {
this(chunkSource, loadControl, bufferSizeContribution, null, null, 0); this(chunkSource, loadControl, bufferSizeContribution, null, null, 0);
} }
/**
* @param chunkSource A {@link ChunkSource} from which chunks to load are obtained.
* @param loadControl Controls when the source is permitted to load data.
* @param bufferSizeContribution The contribution of this source to the media buffer, in bytes.
* @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
* null if delivery of events is not required.
* @param eventListener A listener of events. May be null if delivery of events is not required.
* @param eventSourceId An identifier that gets passed to {@code eventListener} methods.
*/
public ChunkSampleSource(ChunkSource chunkSource, LoadControl loadControl, public ChunkSampleSource(ChunkSource chunkSource, LoadControl loadControl,
int bufferSizeContribution, Handler eventHandler, EventListener eventListener, int bufferSizeContribution, Handler eventHandler, EventListener eventListener,
int eventSourceId) { int eventSourceId) {
...@@ -101,6 +115,17 @@ public class ChunkSampleSource implements SampleSource, SampleSourceReader, Load ...@@ -101,6 +115,17 @@ public class ChunkSampleSource implements SampleSource, SampleSourceReader, Load
eventSourceId, DEFAULT_MIN_LOADABLE_RETRY_COUNT); eventSourceId, DEFAULT_MIN_LOADABLE_RETRY_COUNT);
} }
/**
* @param chunkSource A {@link ChunkSource} from which chunks to load are obtained.
* @param loadControl Controls when the source is permitted to load data.
* @param bufferSizeContribution The contribution of this source to the media buffer, in bytes.
* @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
* null if delivery of events is not required.
* @param eventListener A listener of events. May be null if delivery of events is not required.
* @param eventSourceId An identifier that gets passed to {@code eventListener} methods.
* @param minLoadableRetryCount The minimum number of times that the source should retry a load
* before propagating an error.
*/
public ChunkSampleSource(ChunkSource chunkSource, LoadControl loadControl, public ChunkSampleSource(ChunkSource chunkSource, LoadControl loadControl,
int bufferSizeContribution, Handler eventHandler, EventListener eventListener, int bufferSizeContribution, Handler eventHandler, EventListener eventListener,
int eventSourceId, int minLoadableRetryCount) { int eventSourceId, int minLoadableRetryCount) {
......
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