Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6289 in orxonox.OLD for branches/avi_play


Ignore:
Timestamp:
Dec 25, 2005, 8:01:00 PM (19 years ago)
Author:
hdavid
Message:

branches/avi_play: begin of the media_player implementation

Location:
branches/avi_play/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/avi_play/src/lib/graphics/importer/media_container.cc

    r6286 r6289  
    4444  if (filename != NULL)
    4545    this->loadMedia(filename);
    46 
     46}
     47
     48MediaContainer::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;
    4757}
    4858
  • branches/avi_play/src/lib/graphics/importer/media_container.h

    r6260 r6289  
    5050
    5151  MediaContainer(const char* filename);
     52  MediaContainer();
    5253  ~MediaContainer();
    5354
  • branches/avi_play/src/lib/graphics/importer/movie_player.cc

    r5950 r6289  
    1010
    1111### File Specific:
    12    main-programmer: David Hasenfratz, Stephan Lienhard
     12   main-programmer: David Hasenfratz
    1313   co-programmer:
    1414*/
     
    3434MoviePlayer::MoviePlayer(const char* filename)
    3535{
     36  media_container = new MediaContainer(filename);
     37}
    3638
     39MoviePlayer::MoviePlayer()
     40{
     41  media_container = new MediaContainer();
    3742}
    3843
     
    4348{
    4449
     50}
     51
     52void MoviePlayer::loadMovie(const char* filename)
     53{
     54  media_container->loadMedia(filename);
     55}
     56
     57void MoviePlayer::printInformation()
     58{
     59  media_container->printMediaInformation();
    4560}
    4661
  • branches/avi_play/src/lib/graphics/importer/movie_player.h

    r5950 r6289  
    1010#include "glincl.h"
    1111#include "sdlincl.h"
     12#include "media_container.h"
    1213
    1314/* include base_object.h since all classes are derived from this one */
     
    1718using namespace std;
    1819
     20class MediaContainer;
     21
    1922/* The state of the MoviePlayer */
    2023typedef enum MP_STATUS {
    2124  PLAY,
    2225        PAUSE,
    23         STOP,
    24         RECORD
     26        STOP
    2527};
     28
     29
    2630
    2731class MoviePlayer : public BaseObject
     
    3034private:
    3135
    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;     
    4237
    4338public:
    4439
    4540  MoviePlayer(const char* filename);
     41  MoviePlayer();
    4642  ~MoviePlayer();
     43
     44  void loadMovie(const char* filename);
    4745
    4846        void start(unsigned int start_frame);
     
    5755        float getSpeed();
    5856        const MP_STATUS getStatus();
     57  void printInformation();
    5958
    6059};
  • branches/avi_play/src/subprojects/importer/movie_player_test.cc

    r6286 r6289  
    2929
    3030#include "resource_manager.h"
    31 #include "media_container.h"
     31#include "movie_player.h";
    3232
     33MoviePlayer* movie_player;
    3334
    3435void Framework::moduleInit(int argc, char** argv)
    3536{
     37  movie_player = new MoviePlayer(argv[1]);
     38
     39  movie_player->printInformation();
    3640
    3741}
  • branches/avi_play/src/subprojects/importer/multitex.cc

    r6286 r6289  
    5050
    5151  movie = new MediaContainer(argv[1]);
     52  //movie = new MediaContainer();
     53  //movie->loadMedia(argv[1]);
    5254  fps = movie->getFPS();
    5355
Note: See TracChangeset for help on using the changeset viewer.