Last change
on this file since 6324 was
6324,
checked in by hdavid, 18 years ago
|
branches\avi_play: MoviePlayer works, at the moment not very fast
|
File size:
1.1 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 | /* The state of the MoviePlayer */ |
---|
23 | typedef enum MP_STATUS { |
---|
24 | PLAY, |
---|
25 | PAUSE, |
---|
26 | STOP |
---|
27 | }; |
---|
28 | |
---|
29 | class MoviePlayer : public BaseObject |
---|
30 | { |
---|
31 | |
---|
32 | private: |
---|
33 | |
---|
34 | MediaContainer* media_container; |
---|
35 | Model* model; |
---|
36 | Material* material; |
---|
37 | |
---|
38 | GLuint texture; |
---|
39 | |
---|
40 | MP_STATUS status; |
---|
41 | float speed; |
---|
42 | float timer; |
---|
43 | int actuel_frame; |
---|
44 | int current_frame; |
---|
45 | float fps; |
---|
46 | |
---|
47 | public: |
---|
48 | |
---|
49 | MoviePlayer(const char* filename); |
---|
50 | MoviePlayer(); |
---|
51 | ~MoviePlayer(); |
---|
52 | |
---|
53 | void init(); |
---|
54 | void loadMovie(const char* filename); |
---|
55 | |
---|
56 | void start(unsigned int start_frame); |
---|
57 | void resume(); |
---|
58 | void pause(); |
---|
59 | void stop(); |
---|
60 | |
---|
61 | void tick(float dt); |
---|
62 | const void draw(); |
---|
63 | |
---|
64 | void setSpeed(float speed); |
---|
65 | float getSpeed(); |
---|
66 | const MP_STATUS getStatus(); |
---|
67 | void printInformation(); |
---|
68 | |
---|
69 | }; |
---|
70 | |
---|
71 | |
---|
72 | |
---|
73 | #endif /* _MOVIE_PLAYER */ |
---|
Note: See
TracBrowser
for help on using the repository browser.