Last change
on this file since 6290 was
6290,
checked in by hdavid, 18 years ago
|
branches\avi_play: work on the movie_player
|
File size:
1.2 KB
|
Line | |
---|
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 "media_container.h" |
---|
14 | #include "light.h" |
---|
15 | #include "texture.h" |
---|
16 | #include "material.h" |
---|
17 | #include "primitive_model.h" |
---|
18 | |
---|
19 | /* include base_object.h since all classes are derived from this one */ |
---|
20 | #include "base_object.h" |
---|
21 | |
---|
22 | /* using namespace std is default, this needs to be here */ |
---|
23 | using namespace std; |
---|
24 | |
---|
25 | class MediaContainer; |
---|
26 | class Model; |
---|
27 | class Material; |
---|
28 | class Texture; |
---|
29 | |
---|
30 | /* The state of the MoviePlayer */ |
---|
31 | typedef enum MP_STATUS { |
---|
32 | PLAY, |
---|
33 | PAUSE, |
---|
34 | STOP |
---|
35 | }; |
---|
36 | |
---|
37 | class MoviePlayer : public BaseObject |
---|
38 | { |
---|
39 | |
---|
40 | private: |
---|
41 | |
---|
42 | MediaContainer* media_container; |
---|
43 | Model* model; |
---|
44 | Material* material; |
---|
45 | Texture* tex; |
---|
46 | |
---|
47 | SDL_Surface* surface; |
---|
48 | GLuint texture; |
---|
49 | |
---|
50 | MP_STATUS status; |
---|
51 | float speed; |
---|
52 | |
---|
53 | public: |
---|
54 | |
---|
55 | MoviePlayer(const char* filename); |
---|
56 | MoviePlayer(); |
---|
57 | ~MoviePlayer(); |
---|
58 | |
---|
59 | void init(); |
---|
60 | void loadMovie(const char* filename); |
---|
61 | |
---|
62 | void start(unsigned int start_frame); |
---|
63 | void resume(); |
---|
64 | void pause(); |
---|
65 | void stop(); |
---|
66 | |
---|
67 | void tick(float time); |
---|
68 | const void draw(); |
---|
69 | |
---|
70 | void setSpeed(float speed); |
---|
71 | float getSpeed(); |
---|
72 | const MP_STATUS getStatus(); |
---|
73 | void printInformation(); |
---|
74 | |
---|
75 | }; |
---|
76 | |
---|
77 | |
---|
78 | |
---|
79 | #endif /* _MOVIE_PLAYER */ |
---|
Note: See
TracBrowser
for help on using the repository browser.