ooMPEG class information
Classes
- ANIMbase - abstract base decoding class
- ANIMdisplay - class that displays an animation in an X window
- ANIMmpeg - inherits from ANIMbase, decodes
MPEG movies
ANIMbase
This class is the abstract base animation class.
Constructors
- ANIMbase()
- ANIMbase(const ANIMbase &rhs)
Abstract Virtual Methods
- newMovie(const char * const infile) - setup to see a new
animation called infile
- Boolean open() - opens up an animation after newMovie() has
been called, returns TRUE on success (checks correct format)
- void rewind() - rewinds a current movie
- Boolean GetFrame(char **Frame, Boolean *newFrame) - Frame
points to a pointer to a new frame, this is changed if we are getting a buffered
frame. newFrame is set to TRUE if a frame is returned, FALSE if no frame is
returned.
Virtual Methods
- Boolean OkFile() - should call after newMovie to
check existence of the animation
- void InitDither(unsigned long red_mask=0xff,
unsigned long green_mask=0xff00,
unsigned long blue_mask=0xff0000) - initialize dithering color maps for
this animation, by default does nothing
- void MultiThread(Boolean mt) - turns multi-threading on or
off
Members
- Boolean moreFrames - Are there more frames in this
animation? (this should be private)
ANIMdisplay
This object takes care of displaying an object in an X window
Constructors
- ANIMdisplay(ANIMbase *movie,
char *displayName,
Boolean loopMovie=TRUE,
int allocateFrame=1, int starty=5)
This is the constructor for the first movie, it calls InitDither with current display settings for the new movie.
- movie - a pointer to an object for any animation sub-classed
from ANIMbase
- displayName - name of the X display to display on
- loopMovie - set movie looping (default TRUE)
- allocateFrame - should ANIMdisplay allocate space
for a frame, or will the space be allocated elsewhere
- starty - what Y coordinate do we want to start at
- ANIMdisplay(ANIMbase *movie,
ANIMdisplay *lastMovie, Boolean loopMovie=TRUE,
int allocateFrame=1);
This is the constructor for the second and later movies.
- movie - a pointer to an object for any animation sub-classed
from ANIMbase
- lastMovie - last ANIMdisplay
object that we want to display next to
- loopMovie - set movie looping (default TRUE)
- allocateFrame - should ANIMdisplay allocate space
for a frame, or will the space be allocated elsewhere
Methods
- void newMovie(const char * const movie) - switch to a new
movie
- void display (char *frame=NULL) - display next frame of
the animation. if the frame parameter is NULL get next frame, but if frame
is not NULL, use the frame data that frame points to
- Boolean movieDone() - returns whether the animation that
is being displayed is finished
Members
- ANIMbase *_movie - pointer to the
animation being displayed
ANIMmpeg
This object takes care of decoding an MPEG stream
Constructors
- ANIMmpeg(const char * const inFileName)
- ANIMmpeg(const ANIMmpeg &rhs) - copy constructor
Virtual Methods (Abstract in ANIMbase)
- newMovie(const char * const infile) - setup to see a new
animation called infile
- Boolean open() - opens up an animation after newMovie() has
been called, returns TRUE on success (checks correct format)
- void rewind() - rewinds a current movie, next frame will
be first frame of the MPEG movie
- Boolean GetFrame(char **Frame, Boolean *newFrame) - Frame
points to a pointer to a new frame, this is changed if we are getting a buffered
frame. newFrame is set to TRUE if a frame is returned, FALSE if no frame is
returned.
Virtual Methods (redefined)
lsh@cs.brown.edu (Loring Holden)
this page is http://www.cs.brown.edu/software/ooMPEG/ooMPEG.html
Loring Holden