Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6611 in orxonox.OLD for branches/avi_play/src/lib/graphics/importer


Ignore:
Timestamp:
Jan 19, 2006, 12:35:05 AM (19 years ago)
Author:
hdavid
Message:

some cleanup and fixes

Location:
branches/avi_play/src/lib/graphics/importer
Files:
2 edited

Legend:

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

    r6600 r6611  
    6262  av_free(frame);
    6363
    64   avcodec_default_free_buffers(codec_context);
    65 
    6664  // Close the codec
    6765  avcodec_close(codec_context);
     
    8078  frame_number = 0;
    8179  loading = false;
    82 
    83   /*material = new Material;
    84   material->setDiffuseMap("maps/radialTransparency.png");
    85 
    86   model = new PrimitiveModel(PRIM_PLANE, 10.0);
    87 
    88   LightManager* lightMan = LightManager::getInstance();
    89   lightMan->setAmbientColor(.1,.1,.1);
    90   (new Light())->setAbsCoor(5.0, 10.0, 40.0);
    91   (new Light())->setAbsCoor(-10, -20, -100);
    92   */
    9380}
    9481
     
    344331    status = PLAY;
    345332    timer = 0;
    346 
    347     this->gotoFrame(start_frame);
    348 
    349     PRINTF(0)("start\n");
    350333  }
    351334}
     
    354337{
    355338  if(status == PAUSE)
    356   {
    357339    status = PLAY;
    358     PRINTF(0)("resume\n");
    359   }
    360340}
    361341
     
    363343{
    364344  if(status == PLAY)
    365   {
    366345    status = PAUSE;
    367     PRINTF(0)("pause\n");
    368   }
    369346}
    370347
     
    372349{
    373350  status = STOP;
    374 
    375   PRINTF(0)("stop\n");
    376351}
    377352
     
    389364        this->skipFrame(actual_frame - frame_number - 1);
    390365    }
    391     //PRINTF(0)("frame_number: %i\n", frame_number);
    392   }
    393 }
    394 
    395 /*const void MoviePlayer::draw()
    396 {
    397   material->select();
    398   glBindTexture(GL_TEXTURE_2D, texture);
    399   model->draw();
    400 
    401   LightManager::getInstance()->draw();
    402 }*/
     366  }
     367}
    403368
    404369GLuint MoviePlayer::getTexture()
  • branches/avi_play/src/lib/graphics/importer/movie_player.h

    r6600 r6611  
    1717
    1818#include "glincl.h"
    19 
    20 //#include "light.h"
    2119#include "texture.h"
    22 //#include "material.h"
    23 //#include "primitive_model.h"
    2420
    2521// include base_object.h since all classes are derived from this one
     
    2925typedef enum MP_STATUS {
    3026  PLAY,
    31         PAUSE,
    32         STOP
     27  PAUSE,
     28  STOP
    3329};
    3430
     
    3733
    3834private:
    39 
    40   //Model* model;
    41   //Material* material;
    4235
    4336  AVFormatContext* format_context;
     
    7164  bool loadMovie(const char* filename);
    7265
    73         void start(float start_time);
    74         void resume();
    75         void pause();
    76         void stop();
     66  void start(float start_time);
     67  void resume();
     68  void pause();
     69  void stop();
    7770
    78         void tick(float dt);
    79         //const void draw();
    80         GLuint getTexture();
     71  void tick(float dt);
     72  GLuint getTexture();
    8173
    82         void setFPS(float fps);
    83         float getFPS();
    84         const MP_STATUS getStatus();
     74  void setFPS(float fps);
     75  float getFPS();
     76  const MP_STATUS getStatus();
    8577  void printInformation();
    8678
     
    9486};
    9587
    96 
    97 
    9888#endif // _MOVIE_PLAYER
Note: See TracChangeset for help on using the changeset viewer.