mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-11 03:34:13 +00:00
VIDEO: Implement NodeData struct and getNodeData method
This commit is contained in:
parent
764e4c15ae
commit
8221cd6df0
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user