|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jim2mov.core.Jim2Mov
public class Jim2Mov
Wrapper class that allows to create movies. The only requirement is providing the implementation of two simple interfaces
| Field Summary |
|---|
| Fields inherited from interface javax.media.protocol.SourceStream |
|---|
LENGTH_UNKNOWN |
| Constructor Summary | |
|---|---|
Jim2Mov(ImageProvider ip,
MovieInfoProvider mip)
Creates a new instance of Jim2Mov |
|
Jim2Mov(ImageProvider ip,
MovieInfoProvider mip,
FrameSavedListener listener)
Creates a new instance of Jim2Mov |
|
| Method Summary | |
|---|---|
void |
addFrameSavedListener(FrameSavedListener listener)
Registers FrameSavedListener to receive events. |
boolean |
endOfStream()
Find out if the end of the stream has been reached. |
javax.media.protocol.ContentDescriptor |
getContentDescriptor()
Always return ContentDescriptor.RAW |
long |
getContentLength()
Always return LENGTH_UNKNOWN. |
java.lang.Object |
getControl(java.lang.String str)
No controls are supported. |
java.lang.Object[] |
getControls()
Returns a zero length array. |
javax.media.Format |
getFormat()
Get the format type of the data that this source stream provides. |
void |
read(javax.media.Buffer buf)
Block and read a buffer from the stream. |
void |
removeFrameSavedListener(FrameSavedListener listener)
Removes FrameSavedListener from the list of listeners. |
void |
saveMovie(int type)
This method saves the movie. |
void |
saveMovie(java.lang.String descriptor,
javax.media.format.VideoFormat vf)
This method saves the movie, but the video format is given by the caller... |
boolean |
willReadBlock()
Find out if data is available now. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Jim2Mov(ImageProvider ip,
MovieInfoProvider mip)
ip - Interface which returns the imagesmip - Interface which provides information about the movie
public Jim2Mov(ImageProvider ip,
MovieInfoProvider mip,
FrameSavedListener listener)
ip - Interface which returns the imagesmip - Interface which provides information about the movielistener - Listener to the frame add events| Method Detail |
|---|
public void saveMovie(int type)
throws MovieSaveException
type - The type of movie. You can get the types available in the MovieInfoProvider interface
MovieSaveException - If there is any problem saving the movie
public void saveMovie(java.lang.String descriptor,
javax.media.format.VideoFormat vf)
throws MovieSaveException
descriptor - The file type descriptorvf - The video format
MovieSaveException - If there is any problem saving the moviepublic boolean endOfStream()
endOfStream in interface javax.media.protocol.SourceStreamtrue if there is no more data.public javax.media.protocol.ContentDescriptor getContentDescriptor()
getContentDescriptor in interface javax.media.protocol.SourceStreampublic long getContentLength()
getContentLength in interface javax.media.protocol.SourceStreampublic java.lang.Object getControl(java.lang.String str)
getControl in interface javax.media.Controlsstr - The control type
nullpublic java.lang.Object[] getControls()
getControls in interface javax.media.Controlspublic javax.media.Format getFormat()
getFormat in interface javax.media.protocol.PullBufferStream
public void read(javax.media.Buffer buf)
throws java.io.IOException
read in interface javax.media.protocol.PullBufferStreambuf - The buffer
java.io.IOException - Thrown if an error occurs while reading.public boolean willReadBlock()
willReadBlock in interface javax.media.protocol.PullBufferStreamtrue if read would block; otherwise returns false.public void addFrameSavedListener(FrameSavedListener listener)
listener - The listener to register.public void removeFrameSavedListener(FrameSavedListener listener)
listener - The listener to remove.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||