Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 26, 2006, 4:59:49 PM (18 years ago)
Author:
bensch
Message:

orxonox/new_class_id: almost killed off the old ResourceManager

File:
1 edited

Legend:

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

    r9715 r9833  
    2525#include "media_container.h"
    2626
    27 #include "util/loading/resource_manager.h"
    28 
     27#include "util/loading/new_resource_manager.h"
    2928/* header for debug output */
    3029#include "debug.h"
     
    9291    return false;
    9392  // check whether file exists
    94   if(!ResourceManager::isInDataDir(filename))
     93  if(!Resources::NewResourceManager::getInstance()->checkFileInMainPath(filename))
    9594  {
    9695    PRINTF(1)("Could not find %s\n", filename.c_str());
     
    102101
    103102  // Open video file
    104   if (av_open_input_file(&format_context, ResourceManager::getFullName(filename).c_str(), NULL, 0, NULL) !=0 )
    105   {
    106     PRINTF(1)("Could not open %s\n", ResourceManager::getFullName(filename).c_str());
     103  if (av_open_input_file(&format_context, Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str(), NULL, 0, NULL) !=0 )
     104  {
     105    PRINTF(1)("Could not open %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    107106    return false;
    108107  }
     
    111110  if (av_find_stream_info(format_context) < 0)
    112111  {
    113     PRINTF(1)("Could not find stream information in %s\n", ResourceManager::getFullName(filename).c_str());
     112    PRINTF(1)("Could not find stream information in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    114113    return false;
    115114  }
     
    120119  if(video_stream == -1)
    121120  {
    122     PRINTF(1)("Could not find a video stream in %s\n", ResourceManager::getFullName(filename).c_str());
     121    PRINTF(1)("Could not find a video stream in %s\n", Resources::NewResourceManager::getInstance()->prependAbsoluteMainPath(filename).c_str());
    123122    return false;
    124123  }
Note: See TracChangeset for help on using the changeset viewer.