Rev | Line | |
---|
[5939] | 1 | /*! |
---|
| 2 | * @file movie_player.h |
---|
| 3 | * Manages the media files |
---|
| 4 | |
---|
| 5 | */ |
---|
| 6 | |
---|
| 7 | #ifndef _MOVIE_PLAYER |
---|
| 8 | #define _MOVIE_PLAYER |
---|
| 9 | |
---|
| 10 | #include "glincl.h" |
---|
| 11 | #include "sdlincl.h" |
---|
| 12 | |
---|
| 13 | /* include base_object.h since all classes are derived from this one */ |
---|
| 14 | #include "base_object.h" |
---|
| 15 | |
---|
| 16 | /* using namespace std is default, this needs to be here */ |
---|
| 17 | using namespace std; |
---|
| 18 | |
---|
[5950] | 19 | /* The state of the MoviePlayer */ |
---|
| 20 | typedef enum MP_STATUS { |
---|
| 21 | PLAY, |
---|
| 22 | PAUSE, |
---|
| 23 | STOP, |
---|
| 24 | RECORD |
---|
| 25 | }; |
---|
| 26 | |
---|
[5939] | 27 | class MoviePlayer : public BaseObject |
---|
| 28 | { |
---|
| 29 | |
---|
| 30 | private: |
---|
| 31 | |
---|
| 32 | char* filename; |
---|
| 33 | unsigned int width; |
---|
| 34 | unsigned int height; |
---|
| 35 | |
---|
| 36 | unsigned int frame_rate; |
---|
| 37 | unsigned int current_frame; |
---|
| 38 | float time_since_last_frame; |
---|
| 39 | float speed; |
---|
| 40 | |
---|
| 41 | SDL_Surface* screen; |
---|
| 42 | |
---|
| 43 | public: |
---|
| 44 | |
---|
| 45 | MoviePlayer(const char* filename); |
---|
| 46 | ~MoviePlayer(); |
---|
| 47 | |
---|
| 48 | void start(unsigned int start_frame); |
---|
| 49 | void resume(); |
---|
| 50 | void pause(); |
---|
| 51 | void stop(); |
---|
| 52 | |
---|
| 53 | void tick(float time); |
---|
| 54 | const void draw(); |
---|
| 55 | |
---|
| 56 | void setSpeed(float speed); |
---|
| 57 | float getSpeed(); |
---|
[5950] | 58 | const MP_STATUS getStatus(); |
---|
[5939] | 59 | |
---|
| 60 | }; |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | #endif /* _MOVIE_PLAYER */ |
---|
Note: See
TracBrowser
for help on using the repository browser.