[Scummvm-git-logs] scummvm master -> 1d776fbfe039c9bf141b0d4e595435ca8087571a
elasota
noreply at scummvm.org
Fri May 24 23:25:25 UTC 2024
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
bd3ab79910 MTROPOLIS: add ability to play external video files
3bc9d65afc MTROPOLIS: Add Video directory to SearchMan
dc49091a15 MTROPOLIS: remove subpath search loop
b2cd9f66a0 MTROPOLIS: use VFS layer to resolve video path
1d776fbfe0 MTROPOLIS: remove video path from SearchMan
Commit: bd3ab79910efd83008e8cde54926ec0c5f9f58c6
https://github.com/scummvm/scummvm/commit/bd3ab79910efd83008e8cde54926ec0c5f9f58c6
Author: Michael (michael_kuerbis at web.de)
Date: 2024-05-24T19:25:19-04:00
Commit Message:
MTROPOLIS: add ability to play external video files
Changed paths:
engines/mtropolis/elements.cpp
diff --git a/engines/mtropolis/elements.cpp b/engines/mtropolis/elements.cpp
index 83ac0f18596..9d832bcf238 100644
--- a/engines/mtropolis/elements.cpp
+++ b/engines/mtropolis/elements.cpp
@@ -642,11 +642,32 @@ void MovieElement::activate() {
_videoDecoder.reset(qtDecoder);
_damagedFrames = movieAsset->getDamagedFrames();
- Common::SafeSeekableSubReadStream *movieDataStream;
+ Common::SeekableReadStream *movieDataStream;
if (movieAsset->getMovieDataSize() > 0) {
qtDecoder->setChunkBeginOffset(movieAsset->getMovieDataPos());
movieDataStream = new Common::SafeSeekableSubReadStream(stream, movieAsset->getMovieDataPos(), movieAsset->getMovieDataPos() + movieAsset->getMovieDataSize(), DisposeAfterUse::NO);
+ } else if (!movieAsset->getExtFileName().empty()) {
+ Common::File *file = nullptr;
+
+ for (const char *videoDirectory : {"", "Video", "video", "VIDEO"}) {
+ delete file;
+ file = new Common::File();
+
+ Common::String pathString = videoDirectory;
+ if (!pathString.empty())
+ pathString += Common::Path::kNativeSeparator;
+ pathString += movieAsset->getExtFileName();
+
+ file->open(Common::Path(pathString, Common::Path::kNativeSeparator));
+ if (file->isOpen())
+ break;
+ }
+
+ assert(file->isOpen());
+ if (!file->isOpen())
+ warning("Unable to open external video file %s", movieAsset->getExtFileName().c_str());
+ movieDataStream = file;
} else {
// If no data size, the movie data is all over the file and the MOOV atom may be after it.
movieDataStream = new Common::SafeSeekableSubReadStream(stream, 0, stream->size(), DisposeAfterUse::NO);
Commit: 3bc9d65afce116a1a338e3d33fc804df21a7a743
https://github.com/scummvm/scummvm/commit/3bc9d65afce116a1a338e3d33fc804df21a7a743
Author: Michael (michael_kuerbis at web.de)
Date: 2024-05-24T19:25:19-04:00
Commit Message:
MTROPOLIS: Add Video directory to SearchMan
Changed paths:
engines/mtropolis/mtropolis.cpp
diff --git a/engines/mtropolis/mtropolis.cpp b/engines/mtropolis/mtropolis.cpp
index d15fd15f385..a26408dc20f 100644
--- a/engines/mtropolis/mtropolis.cpp
+++ b/engines/mtropolis/mtropolis.cpp
@@ -56,6 +56,7 @@ namespace MTropolis {
MTropolisEngine::MTropolisEngine(OSystem *syst, const MTropolisGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc), _saveWriter(nullptr), _isTriggeredAutosave(false) {
const Common::FSNode gameDataDir(ConfMan.getPath("path"));
SearchMan.addSubDirectoryMatching(gameDataDir, "Resource");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Video");
bootAddSearchPaths(gameDataDir, *gameDesc);
}
Commit: dc49091a15c0de4c90881a383850aaae7de6802c
https://github.com/scummvm/scummvm/commit/dc49091a15c0de4c90881a383850aaae7de6802c
Author: Michael (michael_kuerbis at web.de)
Date: 2024-05-24T19:25:19-04:00
Commit Message:
MTROPOLIS: remove subpath search loop
The SearchMan entry "Video" is used to find the right path instead.
Changed paths:
engines/mtropolis/elements.cpp
diff --git a/engines/mtropolis/elements.cpp b/engines/mtropolis/elements.cpp
index 9d832bcf238..6411fb37553 100644
--- a/engines/mtropolis/elements.cpp
+++ b/engines/mtropolis/elements.cpp
@@ -648,22 +648,8 @@ void MovieElement::activate() {
qtDecoder->setChunkBeginOffset(movieAsset->getMovieDataPos());
movieDataStream = new Common::SafeSeekableSubReadStream(stream, movieAsset->getMovieDataPos(), movieAsset->getMovieDataPos() + movieAsset->getMovieDataSize(), DisposeAfterUse::NO);
} else if (!movieAsset->getExtFileName().empty()) {
- Common::File *file = nullptr;
-
- for (const char *videoDirectory : {"", "Video", "video", "VIDEO"}) {
- delete file;
- file = new Common::File();
-
- Common::String pathString = videoDirectory;
- if (!pathString.empty())
- pathString += Common::Path::kNativeSeparator;
- pathString += movieAsset->getExtFileName();
-
- file->open(Common::Path(pathString, Common::Path::kNativeSeparator));
- if (file->isOpen())
- break;
- }
-
+ Common::File *file = new Common::File();
+ file->open(Common::Path(movieAsset->getExtFileName()));
assert(file->isOpen());
if (!file->isOpen())
warning("Unable to open external video file %s", movieAsset->getExtFileName().c_str());
Commit: b2cd9f66a0c4559d81f1fee0e4fa1ff69e2c3606
https://github.com/scummvm/scummvm/commit/b2cd9f66a0c4559d81f1fee0e4fa1ff69e2c3606
Author: Michael (michael_kuerbis at web.de)
Date: 2024-05-24T19:25:19-04:00
Commit Message:
MTROPOLIS: use VFS layer to resolve video path
This makes the handling of external Quicktime files
more similar to the AVI file handling below.
Changed paths:
engines/mtropolis/elements.cpp
diff --git a/engines/mtropolis/elements.cpp b/engines/mtropolis/elements.cpp
index 6411fb37553..0b82924a8e8 100644
--- a/engines/mtropolis/elements.cpp
+++ b/engines/mtropolis/elements.cpp
@@ -649,10 +649,14 @@ void MovieElement::activate() {
movieDataStream = new Common::SafeSeekableSubReadStream(stream, movieAsset->getMovieDataPos(), movieAsset->getMovieDataPos() + movieAsset->getMovieDataSize(), DisposeAfterUse::NO);
} else if (!movieAsset->getExtFileName().empty()) {
Common::File *file = new Common::File();
- file->open(Common::Path(movieAsset->getExtFileName()));
- assert(file->isOpen());
- if (!file->isOpen())
- warning("Unable to open external video file %s", movieAsset->getExtFileName().c_str());
+
+ if (!file->open(Common::Path(Common::String("VIDEO/") + movieAsset->getExtFileName()))) {
+ warning("Movie asset could not be opened: %s", movieAsset->getExtFileName().c_str());
+ delete file;
+ _videoDecoder.reset();
+ return;
+ }
+
movieDataStream = file;
} else {
// If no data size, the movie data is all over the file and the MOOV atom may be after it.
Commit: 1d776fbfe039c9bf141b0d4e595435ca8087571a
https://github.com/scummvm/scummvm/commit/1d776fbfe039c9bf141b0d4e595435ca8087571a
Author: Michael (michael_kuerbis at web.de)
Date: 2024-05-24T19:25:19-04:00
Commit Message:
MTROPOLIS: remove video path from SearchMan
With the previous commit, the SearchMan entry is not required anymore.
This reverts commit ed71bee3a76420c877b8028a9df535408ee8dd83
Changed paths:
engines/mtropolis/mtropolis.cpp
diff --git a/engines/mtropolis/mtropolis.cpp b/engines/mtropolis/mtropolis.cpp
index a26408dc20f..d15fd15f385 100644
--- a/engines/mtropolis/mtropolis.cpp
+++ b/engines/mtropolis/mtropolis.cpp
@@ -56,7 +56,6 @@ namespace MTropolis {
MTropolisEngine::MTropolisEngine(OSystem *syst, const MTropolisGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc), _saveWriter(nullptr), _isTriggeredAutosave(false) {
const Common::FSNode gameDataDir(ConfMan.getPath("path"));
SearchMan.addSubDirectoryMatching(gameDataDir, "Resource");
- SearchMan.addSubDirectoryMatching(gameDataDir, "Video");
bootAddSearchPaths(gameDataDir, *gameDesc);
}
More information about the Scummvm-git-logs
mailing list