|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--se.lth.cs.jpeg.AbstractJPEGStream | +--se.lth.cs.jpeg.JPEGPlayer
A camera substitute. Plays back a recording (xxx.Jpeg file, as created by SunVideoPlus).
There is a hacker mode available. It is enabled if you start your application with something like
% java -Dsunvideo.hackermode YourApplication...The hacker mode gives you a window where you can manipulate skip rate, frame rate, and use a special still mode. In still mode, the first five frames of the film are shown cyclically, rather than the entire film. (The still mode thus mimicks a setting where nothing happens in front of the camera.)
The still mode is turned off by clicking a check button. This way you can interactively decide when something should happen in the film.
Image dimensions are determined from the video stream; the first image is decompressed and its dimensions found out.
The frame rate is trickier. SunVideoPlus creates a .VCR file for each recording, containing information about image dimensions, frame rate, and so on. If a file with the same name as the video file but with extension .VCR exists, it is read and searched for information about frame rate. Otherwise some default value is assumed (currently 12). (An alternative constructor, where the user can explicitly state the frame rate, is also given.)
Field Summary |
Fields inherited from class se.lth.cs.jpeg.AbstractJPEGStream |
NORMAL_SIZE, SMALL_SIZE |
Constructor Summary | |
JPEGPlayer(java.lang.String fileName)
Create a JPEG player with no ID and load a JPEG video from the given .Jpeg file. |
|
JPEGPlayer(java.lang.String fileName,
float rate)
Create a JPEG player with the given ID and load a JPEG video from the given .Jpeg file. |
Method Summary | |
JPEGEvent |
getNextFrame()
Returns an image (JPEG encoded) from the video sequence. |
void |
setSkip(int skip)
|
Methods inherited from class se.lth.cs.jpeg.AbstractJPEGStream |
getDimension |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JPEGPlayer(java.lang.String fileName)
fileName
- Name of video file (.Jpeg) to loadpublic JPEGPlayer(java.lang.String fileName, float rate)
fileName
- Name of video file (.Jpeg) to loadrate
- Frame rate of the video, e.g., 10 for a video
sequence filmed at 10 frames/second.
(-1=parse .VCR)Method Detail |
public JPEGEvent getNextFrame()
getNextFrame
in class AbstractJPEGStream
public void setSkip(int skip)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |