public interface IMediaReader extends IInvocable, IMedia
IMediaReader
- media reader interface.Modifier and Type | Interface and Description |
---|---|
static class |
IMediaReader.Property
Property - properties. |
IMedia.AbstractTrackSample, IMedia.AudioTrackSample, IMedia.ITrackSample, IMedia.ITrackSampleX, IMedia.Method, IMedia.TrackSample, IMedia.TrackSampleWithPayload, IMedia.TrackSampleXWithOffset
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<IMedia.ITrackSample> |
getTrackSamples(MediaTrackInfo track,
long start)
Returns
track samples. |
MediaData |
readTrackSample(IMedia.ITrackSample sample)
Reads
sample from the media reader into the MediaData . |
ByteArray |
readTrackSample(IMedia.ITrackSample sample,
byte[] buf,
int offset)
Reads
sample from the media reader
into the buf buffer starting with offset position. |
getContainer, id
invoke
java.util.Iterator<IMedia.ITrackSample> getTrackSamples(MediaTrackInfo track, long start)
track
samples.
Note:
- Media track information is provided by IMediaReader
subclasses.
track
- track info, if null
then samples of all tracks are returned (interleaved)start
- start timestamp (in milliseconds), if container contains video then timestamp is aligned to the previous key frameMediaData readTrackSample(IMedia.ITrackSample sample) throws java.io.IOException
sample
from the media reader into the MediaData
.sample
- sample to readMediaData
instancejava.io.IOException
- if an I/O exception occurredByteArray readTrackSample(IMedia.ITrackSample sample, byte[] buf, int offset) throws java.io.IOException
sample
from the media reader
into the buf
buffer starting with offset
position.
Note:
- If buffer length is not enough a new buffer is created
sample
- sample to readbuf
- buffer to useoffset
- buffer offsetjava.io.IOException
- if an I/O exception occurred