public interface SampleSource
A SampleSource
may expose one or multiple tracks. The number of tracks and each track's
media format can be queried using SampleSource.SampleSourceReader.getTrackCount()
and
SampleSource.SampleSourceReader.getFormat(int)
respectively.
Modifier and Type | Interface and Description |
---|---|
static interface |
SampleSource.SampleSourceReader
An interface providing read access to a
SampleSource . |
Modifier and Type | Field and Description |
---|---|
static int |
END_OF_STREAM
The end of stream has been reached.
|
static int |
FORMAT_READ
A format was read.
|
static long |
NO_DISCONTINUITY
Returned from
SampleSource.SampleSourceReader.readDiscontinuity(int) to indicate no discontinuity. |
static int |
NOTHING_READ
Neither a sample nor a format was read in full.
|
static int |
SAMPLE_READ
A sample was read.
|
Modifier and Type | Method and Description |
---|---|
SampleSource.SampleSourceReader |
register()
A consumer of samples should call this method to register themselves and gain access to the
source through the returned
SampleSource.SampleSourceReader . |
static final int END_OF_STREAM
static final int NOTHING_READ
SampleSource
corresponds to a different
track than the one for which data was requested.static final int SAMPLE_READ
static final int FORMAT_READ
static final long NO_DISCONTINUITY
SampleSource.SampleSourceReader.readDiscontinuity(int)
to indicate no discontinuity.SampleSource.SampleSourceReader register()
SampleSource.SampleSourceReader
.
SampleSource.SampleSourceReader.release()
should be called on the returned object when access is no
longer required.
SampleSource.SampleSourceReader
that provides access to the source.