[Scummvm-git-logs] scummvm master -> 717bfa5702b58dd2492ad970e9df01dd95d308f1
sev-
noreply at scummvm.org
Fri Jan 31 15:49:09 UTC 2025
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b0ccadb399 COMMON: FORMATS: Added more node types to QTVR
717bfa5702 VIDEO: QTVR: Plugged in PanoTrackHandler
Commit: b0ccadb39968691ce649e4b8b14991a223f29f03
https://github.com/scummvm/scummvm/commit/b0ccadb39968691ce649e4b8b14991a223f29f03
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-01-31T16:48:59+01:00
Commit Message:
COMMON: FORMATS: Added more node types to QTVR
Changed paths:
common/formats/quicktime.cpp
common/formats/quicktime.h
diff --git a/common/formats/quicktime.cpp b/common/formats/quicktime.cpp
index b1ea9014ca3..b7be8c86fe1 100644
--- a/common/formats/quicktime.cpp
+++ b/common/formats/quicktime.cpp
@@ -145,7 +145,7 @@ bool QuickTimeParser::parsePanoramaAtoms() {
sizes = { _panoTrack->sampleSize };
} else {
sizes.resize(_panoTrack->sampleCount);
- for (uint32 i = 0; i < _panoTrack->sampleCount; i++)
+ for (uint32 i = 0; i < _panoTrack->sampleCount; i++)
sizes[i] = _panoTrack->sampleSizes[i];
}
@@ -287,7 +287,7 @@ int QuickTimeParser::readDefault(Atom atom) {
debug(0, "Skipping junk found at the end of the QuickTime file");
return 0;
} else if (_parseTable[i].type == 0) { // skip leaf atom data
- debug(0, ">>> Skipped [%s]", tag2str(a.type));
+ debug(0, ">>> Skipped [%s] (%08x) at %d (0x%x)", tag2str(a.type), a.type, (uint32)_fd->pos(), (uint32)_fd->pos());
_fd->seek(a.size, SEEK_CUR);
} else {
@@ -1079,6 +1079,14 @@ int QuickTimeParser::readPHOT(Atom atom) {
uint32 type = _fd->readUint32BE();
switch (type) {
+ case MKTAG('a', 'n', 'i', 'm'):
+ pHotSpotTable.hotSpots[i].type = HotSpotType::anim;
+ break;
+
+ case MKTAG('c', 'n', 'o', 'd'):
+ pHotSpotTable.hotSpots[i].type = HotSpotType::cnod;
+ break;
+
case MKTAG('l', 'i', 'n', 'k'):
pHotSpotTable.hotSpots[i].type = HotSpotType::link;
break;
@@ -1087,6 +1095,14 @@ int QuickTimeParser::readPHOT(Atom atom) {
pHotSpotTable.hotSpots[i].type = HotSpotType::navg;
break;
+ case MKTAG('s', 'o', 'u', 'n'):
+ pHotSpotTable.hotSpots[i].type = HotSpotType::soun;
+ break;
+
+ case MKTAG('u', 'n', 'd', 'f'):
+ pHotSpotTable.hotSpots[i].type = HotSpotType::undefined;
+ break;
+
default:
pHotSpotTable.hotSpots[i].type = HotSpotType::undefined;
warning("QuickTimeParser::readPHOT(): Unknown HotSpot Type ('%s')", tag2str(type));
diff --git a/common/formats/quicktime.h b/common/formats/quicktime.h
index 328d5ce680d..18433c71223 100644
--- a/common/formats/quicktime.h
+++ b/common/formats/quicktime.h
@@ -196,8 +196,11 @@ protected:
enum class HotSpotType {
undefined,
+ anim,
+ cnod,
link,
- navg
+ navg,
+ soun,
};
struct PanoHotSpot {
Commit: 717bfa5702b58dd2492ad970e9df01dd95d308f1
https://github.com/scummvm/scummvm/commit/717bfa5702b58dd2492ad970e9df01dd95d308f1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-01-31T16:49:02+01:00
Commit Message:
VIDEO: QTVR: Plugged in PanoTrackHandler
Changed paths:
video/qt_decoder.cpp
video/qt_decoder.h
video/qtvr_decoder.cpp
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp
index f1060642142..eb0741ec1e4 100644
--- a/video/qt_decoder.cpp
+++ b/video/qt_decoder.cpp
@@ -245,6 +245,9 @@ void QuickTimeDecoder::init() {
addTrack(new VideoTrackHandler(this, tracks[i]));
}
+
+ if (tracks[i]->codecType == CODEC_TYPE_PANO)
+ addTrack(new PanoTrackHandler(this, tracks[i]));
}
// Prepare the first video track
diff --git a/video/qt_decoder.h b/video/qt_decoder.h
index 7ff7542d3bf..9f087c58790 100644
--- a/video/qt_decoder.h
+++ b/video/qt_decoder.h
@@ -295,13 +295,15 @@ private:
void checkEditListBounds();
};
- class PanoTrackHandler {
+ class PanoTrackHandler : public VideoTrack {
public:
PanoTrackHandler(QuickTimeDecoder *decoder, Common::QuickTimeParser::Track *parent);
~PanoTrackHandler();
uint16 getWidth() const;
uint16 getHeight() const;
+ int getCurFrame() const { return 1; }
+ uint32 getNextFrameStartTime() const { return 0; }
Graphics::PixelFormat getPixelFormat() const;
bool setOutputPixelFormat(const Graphics::PixelFormat &format);
const Graphics::Surface *decodeNextFrame();
diff --git a/video/qtvr_decoder.cpp b/video/qtvr_decoder.cpp
index 1a2a4b1bfb5..ce16cdbdb76 100644
--- a/video/qtvr_decoder.cpp
+++ b/video/qtvr_decoder.cpp
@@ -314,6 +314,22 @@ Common::Rational QuickTimeDecoder::PanoTrackHandler::getScaledHeight() const {
return Common::Rational(_parent->height) / _parent->scaleFactorY;
}
+bool QuickTimeDecoder::PanoTrackHandler::setOutputPixelFormat(const Graphics::PixelFormat &format) {
+ return true;
+}
+
+bool QuickTimeDecoder::PanoTrackHandler::canDither() const {
+ return false;
+}
+
+void QuickTimeDecoder::PanoTrackHandler::setDither(const byte *palette) {
+ assert(canDither());
+}
+
+const byte *QuickTimeDecoder::PanoTrackHandler::getPalette() const {
+ return _curPalette;
+}
+
const Graphics::Surface *QuickTimeDecoder::PanoTrackHandler::decodeNextFrame() {
if (!_isPanoConstructed)
return nullptr;
More information about the Scummvm-git-logs
mailing list