VIDEO: Use Path type in VideoDecoder functions

This commit is contained in:
djsrv 2021-08-03 23:04:18 -04:00 committed by Eugene Sandulenko
parent e6c696031f
commit 2eca1126c5
6 changed files with 8 additions and 6 deletions

View File

@ -59,7 +59,7 @@ QuickTimeParser::~QuickTimeParser() {
delete _resFork;
}
bool QuickTimeParser::parseFile(const String &filename) {
bool QuickTimeParser::parseFile(const Path &filename) {
if (!_resFork->open(filename) || !_resFork->hasDataFork())
return false;

View File

@ -33,6 +33,7 @@
#include "common/array.h"
#include "common/scummsys.h"
#include "common/path.h"
#include "common/stream.h"
#include "common/rational.h"
#include "common/types.h"
@ -62,7 +63,7 @@ public:
* Load a QuickTime file
* @param filename the filename to load
*/
bool parseFile(const String &filename);
bool parseFile(const Path &filename);
/**
* Load a QuickTime file from a SeekableReadStream

View File

@ -57,7 +57,7 @@ QuickTimeDecoder::~QuickTimeDecoder() {
close();
}
bool QuickTimeDecoder::loadFile(const Common::String &filename) {
bool QuickTimeDecoder::loadFile(const Common::Path &filename) {
if (!Common::QuickTimeParser::parseFile(filename))
return false;

View File

@ -63,7 +63,7 @@ public:
QuickTimeDecoder();
virtual ~QuickTimeDecoder();
bool loadFile(const Common::String &filename);
bool loadFile(const Common::Path &filename);
bool loadStream(Common::SeekableReadStream *stream);
void close();
uint16 getWidth() const { return _width; }

View File

@ -82,7 +82,7 @@ void VideoDecoder::close() {
_canSetDither = true;
}
bool VideoDecoder::loadFile(const Common::String &filename) {
bool VideoDecoder::loadFile(const Common::Path &filename) {
Common::File *file = new Common::File();
if (!file->open(filename)) {

View File

@ -26,6 +26,7 @@
#include "audio/mixer.h"
#include "audio/timestamp.h" // TODO: Move this to common/ ?
#include "common/array.h"
#include "common/path.h"
#include "common/rational.h"
#include "common/str.h"
#include "graphics/pixelformat.h"
@ -66,7 +67,7 @@ public:
* @param filename the filename to load
* @return whether loading the file succeeded
*/
virtual bool loadFile(const Common::String &filename);
virtual bool loadFile(const Common::Path &filename);
/**
* Load a video from a generic read stream. The ownership of the