diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp index 1168f45f74c..dea508c00f6 100644 --- a/video/qt_decoder.cpp +++ b/video/qt_decoder.cpp @@ -671,6 +671,28 @@ void QuickTimeDecoder::handleMouseButton(bool isDown, int16 x, int16 y) { } } +QuickTimeDecoder::NodeData QuickTimeDecoder::getNodeData(uint32 nodeID) { + for (const auto &sample : _panoTrack->panoSamples) { + if (sample.hdr.nodeID == nodeID) { + return { + nodeID, + sample.hdr.defHPan, + sample.hdr.defVPan, + sample.hdr.defZoom, + sample.hdr.minHPan, + sample.hdr.minVPan, + sample.hdr.maxHPan, + sample.hdr.maxVPan, + sample.hdr.minZoom, + sample.strTable.getString(sample.hdr.nameStrOffset)}; + } + } + + error("QuickTimeDecoder::getNodeData(): Node with nodeID %d not found!", nodeID); + + return {}; +} + Audio::Timestamp QuickTimeDecoder::VideoTrackHandler::getFrameTime(uint frame) const { // TODO: This probably doesn't work right with edit lists int cumulativeDuration = 0; diff --git a/video/qt_decoder.h b/video/qt_decoder.h index 3ff3c73f947..a645cb4b76d 100644 --- a/video/qt_decoder.h +++ b/video/qt_decoder.h @@ -86,6 +86,24 @@ public: bool isVR() const { return _isVR; } QTVRType getQTVRType() const { return _qtvrType; } + struct NodeData { + uint32 nodeID; + + float defHPan; + float defVPan; + float defZoom; + + float minHPan; + float minVPan; + float maxHPan; + float maxVPan; + float minZoom; + + Common::String name; + }; + + NodeData getNodeData(uint32 nodeID); + protected: Common::QuickTimeParser::SampleDesc *readSampleDesc(Common::QuickTimeParser::Track *track, uint32 format, uint32 descSize);