/*! * @file movie_player.h * Manages the media files */ #ifndef _MOVIE_PLAYER #define _MOVIE_PLAYER #include "glincl.h" #include "sdlincl.h" /* include base_object.h since all classes are derived from this one */ #include "base_object.h" /* using namespace std is default, this needs to be here */ using namespace std; /* The state of the MoviePlayer */ typedef enum MP_STATUS { PLAY, PAUSE, STOP, RECORD }; class MoviePlayer : public BaseObject { private: char* filename; unsigned int width; unsigned int height; unsigned int frame_rate; unsigned int current_frame; float time_since_last_frame; float speed; SDL_Surface* screen; public: MoviePlayer(const char* filename); ~MoviePlayer(); void start(unsigned int start_frame); void resume(); void pause(); void stop(); void tick(float time); const void draw(); void setSpeed(float speed); float getSpeed(); const MP_STATUS getStatus(); }; #endif /* _MOVIE_PLAYER */