Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Dec 12, 2005, 4:32:11 PM (19 years ago)
Author:
hdavid
Message:

branches\avi_play: MediaContainer::getNextFrame() grabs a frame and saves it as a ppm image, would not try it with large video files ;)

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

Legend:

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

    r6057 r6068  
    3535  movie = new MediaContainer(argv[1]);
    3636
    37         // print information about the media file
    38         movie->printMediaInformation();
     37  // print information about the media file
     38  movie->printMediaInformation();
    3939
    40 /*
    41   ResourceManager::getInstance()->addImageDir("./");
     40  SDL_Delay(1000);
    4241
    43   for (int i = 0; i < argc; i++)
    44   {
    45     printf("%s\n", argv[i]);
    46   }
    47   ResourceManager::getInstance()->addImageDir("");
     42  // get the frame and save it as an image
     43  //while(movie->getNextFrame() != NULL);       
    4844
    49 
    50   if (argc>=3)
    51     obj = new OBJModel (argv[1], atof(argv[2]));
    52   else if (argc>=2)
    53     obj = new OBJModel(argv[1]);
    54   else
    55     obj = new PrimitiveModel(PRIM_CYLINDER);
    56 
    57   ResourceManager::getInstance()->debug();
    58 
    59   LightManager* lightMan = LightManager::getInstance();
    60   lightMan->setAmbientColor(.1,.1,.1);
    61   (new Light())->setAbsCoor(5.0, 10.0, 40.0);
    62   (new Light())->setAbsCoor(-10, -20, -100);*/
    6345}
    6446
     
    7860void Framework::moduleTick(float dt)
    7961{
    80         if(movie->framesLeft())
    81                 movie->getNextFrame();
     62  while(movie->getNextFrame() != NULL);
    8263}
    8364
    8465void Framework::moduleDraw(void) const
    8566{
    86   //obj->draw();
    8767
    88   //LightManager::getInstance()->draw();
    8968}
    9069
  • branches/avi_play/src/subprojects/importer/multitex.cc

    r6013 r6068  
    7676          obj = new PrimitiveModel(PRIM_CUBE, 10.0);
    7777          break;
    78         case SDLK_2:
     78        case SDLK_2:
    7979          obj = new PrimitiveModel(PRIM_SPHERE, 10.0);
    8080          break;
Note: See TracChangeset for help on using the changeset viewer.