Changeset 6289 in orxonox.OLD for branches/avi_play/src/lib
- Timestamp:
- Dec 25, 2005, 8:01:00 PM (19 years ago)
- Location:
- branches/avi_play/src/lib/graphics/importer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/avi_play/src/lib/graphics/importer/media_container.cc
r6286 r6289 44 44 if (filename != NULL) 45 45 this->loadMedia(filename); 46 46 } 47 48 MediaContainer::MediaContainer() 49 { 50 /* set the class id for the base object */ 51 this->setClassID(CL_MEDIA_CONTAINER, "MediaContainer"); 52 53 /* register all formats and codecs */ 54 av_register_all(); 55 56 fps = 0; 47 57 } 48 58 -
branches/avi_play/src/lib/graphics/importer/media_container.h
r6260 r6289 50 50 51 51 MediaContainer(const char* filename); 52 MediaContainer(); 52 53 ~MediaContainer(); 53 54 -
branches/avi_play/src/lib/graphics/importer/movie_player.cc
r5950 r6289 10 10 11 11 ### File Specific: 12 main-programmer: David Hasenfratz , Stephan Lienhard12 main-programmer: David Hasenfratz 13 13 co-programmer: 14 14 */ … … 34 34 MoviePlayer::MoviePlayer(const char* filename) 35 35 { 36 media_container = new MediaContainer(filename); 37 } 36 38 39 MoviePlayer::MoviePlayer() 40 { 41 media_container = new MediaContainer(); 37 42 } 38 43 … … 43 48 { 44 49 50 } 51 52 void MoviePlayer::loadMovie(const char* filename) 53 { 54 media_container->loadMedia(filename); 55 } 56 57 void MoviePlayer::printInformation() 58 { 59 media_container->printMediaInformation(); 45 60 } 46 61 -
branches/avi_play/src/lib/graphics/importer/movie_player.h
r5950 r6289 10 10 #include "glincl.h" 11 11 #include "sdlincl.h" 12 #include "media_container.h" 12 13 13 14 /* include base_object.h since all classes are derived from this one */ … … 17 18 using namespace std; 18 19 20 class MediaContainer; 21 19 22 /* The state of the MoviePlayer */ 20 23 typedef enum MP_STATUS { 21 24 PLAY, 22 25 PAUSE, 23 STOP, 24 RECORD 26 STOP 25 27 }; 28 29 26 30 27 31 class MoviePlayer : public BaseObject … … 30 34 private: 31 35 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; 36 MediaContainer* media_container; 42 37 43 38 public: 44 39 45 40 MoviePlayer(const char* filename); 41 MoviePlayer(); 46 42 ~MoviePlayer(); 43 44 void loadMovie(const char* filename); 47 45 48 46 void start(unsigned int start_frame); … … 57 55 float getSpeed(); 58 56 const MP_STATUS getStatus(); 57 void printInformation(); 59 58 60 59 };
Note: See TracChangeset
for help on using the changeset viewer.