Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6127 in orxonox.OLD for branches/avi_play/src/subprojects


Ignore:
Timestamp:
Dec 15, 2005, 11:54:48 PM (19 years ago)
Author:
hdavid
Message:

branches/avi_play: MediaContainer::getFPS() works

Location:
branches/avi_play/src/subprojects/importer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/avi_play/src/subprojects/importer/importer.cc

    r6094 r6127  
    6060void Framework::moduleTick(float dt)
    6161{
    62   while(movie->getNextFrame() != NULL)
    63     movie->saveCurrentFrame(); 
     62  //while(movie->getNextFrame() != NULL);
     63  //  movie->saveCurrentFrame();       
    6464}
    6565
  • branches/avi_play/src/subprojects/importer/multitex.cc

    r6112 r6127  
    3737MediaContainer* movie;
    3838
    39 int counter = 0;
     39float counter = 0;
    4040
    4141
    4242void Framework::moduleInit(int argc, char** argv)
    4343{
    44   movie = new MediaContainer("/home/lieni/Desktop/Face2.avi");
     44  movie = new MediaContainer("/home/david/Desktop/Face2.avi");
    4545
    4646  // print information about the media file
     
    5252
    5353  seq = new TextureSequence();
    54   //for (int i = 1; i < argc; i++)
    55   //{
    56   //  seq->addFrame(argv[i]);
    57   //  printf("%s\n", argv[i]);
    58   //}
     54  for (int i = 1; i < argc; i++)
     55  {
     56    seq->addFrame(argv[i]);
     57    printf("%s\n", argv[i]);
     58  }
    5959
    6060  // add one frame from the movie
    61   //seq->addFrame(movie->getNextFrame());
     61  seq->addFrame(movie->getNextFrame());
    6262  GLuint tex;
    63   while((tex = movie->getNextFrame()) != NULL)
    64     seq->addFrame(tex);
     63  //while((tex = movie->getNextFrame()) != NULL)
     64  //  seq->addFrame(tex);
    6565
    6666  test = new Texture(argv[1]);
     
    102102void Framework::moduleTick(float dt)
    103103{
    104   counter++;
     104  counter += dt;
    105105
    106   seq->gotoFrame(counter);
     106  seq->gotoFrame((unsigned int)counter);
    107107
    108   if (counter > seq->getFrameCount())
     108  if ((unsigned int)counter > seq->getFrameCount())
    109109    counter = 0;
    110110
Note: See TracChangeset for help on using the changeset viewer.