Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6350 in orxonox.OLD for branches/avi_play


Ignore:
Timestamp:
Dec 30, 2005, 1:36:40 PM (19 years ago)
Author:
hdavid
Message:

branches\avi_play

Location:
branches/avi_play/src
Files:
4 edited

Legend:

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

    r6339 r6350  
    142142void MediaContainer::loadFrames()
    143143{
     144  // empty texture list
     145  this->clearLists();
     146
    144147  // go to the begin of the video
    145148  av_seek_frame(format_context, video_stream, 0, AVSEEK_FLAG_BACKWARD);
     
    152155GLuint MediaContainer::getNextFrame()
    153156{
     157  //if (glIsTexture(texture))
     158  //  glDeleteTextures(1, &texture);
     159
    154160  // get next frame
    155161  if(av_read_frame(format_context, &packet) >= 0)
  • branches/avi_play/src/lib/graphics/importer/texture_sequence.cc

    r6339 r6350  
    4747TextureSequence::~TextureSequence()
    4848{
     49  this->clearLists();
     50}
     51
     52void TextureSequence::clearLists()
     53{
    4954  // delete all images
    5055  while(!this->images.empty())
     
    5459  }
    5560
    56   this->setTexture(0);
    5761  // delete all textures.
    5862  while(!this->textures.empty())
     
    6367  }
    6468}
    65 
    6669
    6770/**
  • branches/avi_play/src/lib/graphics/importer/texture_sequence.h

    r6339 r6350  
    3131    bool addFrame(GLuint texture);
    3232
     33    void clearLists();
     34
    3335    virtual bool rebuild();
    3436
  • branches/avi_play/src/subprojects/importer/multitex.cc

    r6339 r6350  
    7474          obj = new PrimitiveModel(PRIM_PLANE, 10.0);
    7575          break;
     76        case SDLK_5:
     77          media_container->loadFrames();
     78          counter = 0;
     79          timer = 0;
     80          PRINTF(0)("total_frames: %i\n", media_container->getFrameCount());
     81          SDL_Delay(1000);
     82          break;
    7683        // increase fps
    7784        case SDLK_9:
     
    101108      timer = 0;
    102109      counter = 0;
     110      PRINTF(0)("BEGIN\n");
    103111    }
    104112  }
Note: See TracChangeset for help on using the changeset viewer.