docs/doc/reference/com/google/android/exoplayer2/source/EmptySampleStream.html
Package com.google.android.exoplayer2.source
All Implemented Interfaces:SampleStream
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classEmptySampleStreamextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[SampleStream](SampleStream.html "interface in com.google.android.exoplayer2.source")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
An empty SampleStream.
-
SampleStream.ReadDataResult, SampleStream.ReadFlags
-
FLAG_OMIT_SAMPLE_DATA, FLAG_PEEK, FLAG_REQUIRE_FORMAT
Constructors | Constructor | Description |
| --- | --- |
| EmptySampleStream() |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| boolean | isReady() |
Deprecated.
Returns whether data is available to be read.
|
| void | maybeThrowError() |
Deprecated.
Throws an error that's preventing data from being read.
|
| int | readData(FormatHolder formatHolder, DecoderInputBuffer buffer, @com.google.android.exoplayer2.source.SampleStream.ReadFlags int readFlags) |
Deprecated.
Attempts to read from the stream.
|
| int | skipData(long positionUs) |
Deprecated.
Attempts to skip to the keyframe before the specified position, or to the end of the stream if positionUs is beyond it.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public EmptySampleStream()
Deprecated.
-
public boolean isReady()
Deprecated.
Description copied from interface: SampleStream
Returns whether data is available to be read.
Note: If the stream has ended then a buffer with the end of stream flag can always be read from SampleStream.readData(com.google.android.exoplayer2.FormatHolder, com.google.android.exoplayer2.decoder.DecoderInputBuffer, @com.google.android.exoplayer2.source.SampleStream.ReadFlags int). Hence an ended stream is always ready.
Specified by:isReady in interface SampleStreamReturns:Whether data is available to be read.
-
public void maybeThrowError()
Deprecated.
Description copied from interface: SampleStream
Throws an error that's preventing data from being read. Does nothing if no such error exists.
Specified by:maybeThrowError in interface SampleStream
-
public int readData([FormatHolder](../FormatHolder.html "class in com.google.android.exoplayer2")formatHolder,[DecoderInputBuffer](../decoder/DecoderInputBuffer.html "class in com.google.android.exoplayer2.decoder")buffer,
@com.google.android.exoplayer2.source.SampleStream.ReadFlags int readFlags)
Deprecated.
Description copied from interface: SampleStream
Attempts to read from the stream.
If the stream has ended then C.BUFFER_FLAG_END_OF_STREAM flag is set on buffer and C.RESULT_BUFFER_READ is returned. Else if no data is available then C.RESULT_NOTHING_READ is returned. Else if the format of the media is changing or if formatRequired is set then formatHolder is populated and C.RESULT_FORMAT_READ is returned. Else buffer is populated and C.RESULT_BUFFER_READ is returned.
Specified by:readData in interface SampleStreamParameters:formatHolder - A FormatHolder to populate in the case of reading a format.buffer - A DecoderInputBuffer to populate in the case of reading a sample or the end of the stream. If the end of the stream has been reached, the C.BUFFER_FLAG_END_OF_STREAM flag will be set on the buffer.readFlags - Flags controlling the behavior of this read operation.Returns:The result of the read operation.
-
public int skipData(long positionUs)
Deprecated.
Description copied from interface: SampleStream
Attempts to skip to the keyframe before the specified position, or to the end of the stream if positionUs is beyond it.
Specified by:skipData in interface SampleStreamParameters:positionUs - The specified time.Returns:The number of samples that were skipped.