Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 15, 2006, 3:10:45 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the std-branche back, it runs on windows and Linux

svn merge https://svn.orxonox.net/orxonox/branches/std . -r7202:HEAD

File:
1 edited

Legend:

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

    r7193 r7221  
    3131
    3232
    33 MoviePlayer::MoviePlayer(const char* filename)
     33MoviePlayer::MoviePlayer(const std::string& filename)
    3434{
    3535  // set the class id for the base object
     
    4242  mediaLoaded = false;
    4343
    44   this->loadMovie(filename);
    45 
     44  if (!filename.empty())
     45    this->loadMovie(filename);
    4646}
    4747
     
    8383
    8484
    85 bool MoviePlayer::loadMovie(const char* filename)
     85bool MoviePlayer::loadMovie(const std::string& filename)
    8686{
    8787  this->unloadMedia();
    8888
    89   if(filename == NULL)
     89  if(filename.empty())
    9090    return false;
    9191  // check whether file exists
    9292  if(!ResourceManager::isInDataDir(filename))
    9393  {
    94     PRINTF(1)("Could not find %s\n", filename);
     94    PRINTF(1)("Could not find %s\n", filename.c_str());
    9595    return false;
    9696  }
     
    100100
    101101  // Open video file
    102   if (av_open_input_file(&format_context, ResourceManager::getFullName(filename), NULL, 0, NULL) !=0 )
    103   {
    104     PRINTF(1)("Could not open %s\n", ResourceManager::getFullName(filename));
     102  if (av_open_input_file(&format_context, ResourceManager::getFullName(filename).c_str(), NULL, 0, NULL) !=0 )
     103  {
     104    PRINTF(1)("Could not open %s\n", ResourceManager::getFullName(filename).c_str());
    105105    return false;
    106106  }
     
    109109  if (av_find_stream_info(format_context) < 0)
    110110  {
    111     PRINTF(1)("Could not find stream information in %s\n", ResourceManager::getFullName(filename));
     111    PRINTF(1)("Could not find stream information in %s\n", ResourceManager::getFullName(filename).c_str());
    112112    return false;
    113113  }
     
    118118  if(video_stream == -1)
    119119  {
    120     PRINTF(1)("Could not find a video stream in %s\n", ResourceManager::getFullName(filename));
     120    PRINTF(1)("Could not find a video stream in %s\n", ResourceManager::getFullName(filename).c_str());
    121121    return false;
    122122  }
Note: See TracChangeset for help on using the changeset viewer.