Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6330 in orxonox.OLD for branches


Ignore:
Timestamp:
Dec 29, 2005, 1:49:53 AM (19 years ago)
Author:
hdavid
Message:

branches\avi_play: no big changes, somewhere in MediaPlayer is a big memory leek :-/

Location:
branches/avi_play/src
Files:
4 edited

Legend:

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

    r6324 r6330  
    4444
    4545  int num_bytes;
    46   uint8_t *buffer;
     46  uint8_t* buffer;
    4747  int video_stream;
    4848  int duration;
  • branches/avi_play/src/lib/graphics/importer/movie_player.cc

    r6325 r6330  
    8282}
    8383
    84 void MoviePlayer::start(unsigned int start_frame)
     84void MoviePlayer::start(unsigned int start_time)
    8585{
    8686  status = PLAY;
     
    8888  fps = media_container->getFPS();
    8989
    90   media_container->gotoFrame(start_frame);
     90  media_container->gotoFrame(start_time * fps);
    9191
    92    PRINTF(0)("start\n");
     92   PRINTF(0)("start (start_time: %0.2f)\n", start_time * fps);
    9393}
    9494
     
    125125    current_frame = media_container->getFrameNumber();
    126126    timer += dt;
    127     actuel_frame = timer * fps * speed;
     127    actual_frame = timer * fps * speed;
    128128
    129     if(actuel_frame != current_frame)
     129    if(actual_frame != current_frame)
    130130    {
    131       if(actuel_frame - current_frame == 1)
     131      if(actual_frame - current_frame == 1)
    132132        texture = media_container->getNextFrame();
    133133      else
    134         texture = media_container->skipFrame(actuel_frame - current_frame - 1);
     134        texture = media_container->skipFrame(actual_frame - current_frame - 1);
    135135    }   
    136136    //PRINTF(0)("frame_number: %i\n", media_container->getFrameNumber());
  • branches/avi_play/src/lib/graphics/importer/movie_player.h

    r6324 r6330  
    4141  float speed;
    4242  float timer;
    43   int actuel_frame;
     43  int actual_frame;
    4444  int current_frame;
    4545  float fps; 
     
    5454  void loadMovie(const char* filename);
    5555
    56         void start(unsigned int start_frame);
     56        void start(unsigned int start_time);
    5757        void resume();
    5858        void pause();
  • branches/avi_play/src/subprojects/importer/multitex.cc

    r6324 r6330  
    6262
    6363  // get each fram individually
    64   //while(seq->addFrame(movie->getNextFrame()) != NULL);
     64  while(seq->addFrame(movie->getNextFrame()) != NULL);
    6565  // get a list of frames
    66   movie->gotoFrame(start_frame);
    67   seq->addFrameList(movie->getFrameList());
     66  //movie->gotoFrame(start_frame);
     67  //seq->addFrameList(movie->getFrameList());
    6868
    6969  testMat->setDiffuseMap("maps/radialTransparency.png");
Note: See TracChangeset for help on using the changeset viewer.