|
Copyright 2012-04-26 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MovieReader
A simple API for reading movie data (audio and video) from a file.
FIXME - MovieReader should extend Demultiplexer
| Method Summary | |
|---|---|
void |
close()
|
int |
findTrack(int fromTrack,
Format format)
Finds a track with the specified format. |
long |
getChunkCount(int track)
Returns the number of media data chunks in the specified track. |
Rational |
getDuration()
Returns the total duration of the movie in time scale units. |
Format |
getFileFormat()
Returns the file format. |
Format |
getFormat(int track)
Returns the media format of the specified track. |
Rational |
getReadTime(int track)
Returns the current time of the track. |
int |
getTrackCount()
Returns the number of tracks. |
int |
nextTrack()
Returns the index of the next track in playback sequence. |
void |
read(int track,
Buffer buffer)
Reads the next sample chunk from the specified track. |
Rational |
sampleToTime(int track,
long sample)
Returns the time for the specified sample number. |
void |
setMovieReadTime(Rational newValue)
Sets the read time of all tracks to the closest sync sample before or at the specified time. |
long |
timeToSample(int track,
Rational seconds)
Returns the sample number for the specified time. |
| Method Detail |
|---|
int getTrackCount()
throws java.io.IOException
java.io.IOException
int findTrack(int fromTrack,
Format format)
throws java.io.IOException
fromTrack - the start track number.format - A format specification.
java.io.IOException
Rational getDuration()
throws java.io.IOException
java.io.IOException
long timeToSample(int track,
Rational seconds)
Rational sampleToTime(int track,
long sample)
Format getFileFormat()
throws java.io.IOException
java.io.IOException
Format getFormat(int track)
throws java.io.IOException
track - Track number.
java.io.IOException
long getChunkCount(int track)
throws java.io.IOException
java.io.IOException
void read(int track,
Buffer buffer)
throws java.io.IOException
track - Track number.buffer - The buffer into which to store the sample data.
java.io.IOException
int nextTrack()
throws java.io.IOException
java.io.IOException
void close()
throws java.io.IOException
java.io.IOExceptionvoid setMovieReadTime(Rational newValue)
newValue - Time in seconds.
Rational getReadTime(int track)
throws java.io.IOException
java.io.IOException
|
Copyright 2012-04-26 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||