|
Copyright 2012-04-26 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MovieWriter
A simple API for writing movie data (audio and video) into a file.
| Method Summary | |
|---|---|
int |
addTrack(Format format)
Adds a track to the writer for a suggested input format. |
void |
close()
Closes the writer. |
Rational |
getDuration(int track)
Returns the duration of the track in seconds. |
Format |
getFileFormat()
Returns the file format. |
Format |
getFormat(int track)
Returns the media format of the specified track. |
int |
getTrackCount()
Returns the number of tracks. |
boolean |
isDataLimitReached()
Returns true if the limit for media data has been reached. |
void |
write(int track,
Buffer buf)
Writes a sample into the specified track. |
| Method Detail |
|---|
Format getFileFormat()
throws java.io.IOException
java.io.IOException
int addTrack(Format format)
throws java.io.IOException
The format should at least specify the desired FormatKeys.MediaType.
The actual input format is a refined version of the suggested format. For
example, if a MovieWriter only supports fixed frame rate video, then the
MovieWriter will extend the format with that information.
If the suggested input format is not compatible, then an IOException is thrown. For example, if a MovieWriter only supports fixed frame rate video, but a format with variable frame rate was requested.
format - The desired input format of the track. The actual input
format may be a refined version of the specified format.
java.io.IOExceptionFormat getFormat(int track)
addTrack(org.monte.media.Format).
track - Track number.
int getTrackCount()
void write(int track,
Buffer buf)
throws java.io.IOException
write in interface Multiplexertrack - The track number.buf - The buffer containing the sample data.
java.io.IOException
void close()
throws java.io.IOException
close in interface Multiplexerjava.io.IOExceptionboolean isDataLimitReached()
This limit is imposed by data structures of the movie file which will overflow if more samples are added to the movie.
FIXME - Maybe replace by getCapacity():long.
Rational getDuration(int track)
|
Copyright 2012-04-26 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||