[Scummvm-git-logs] scummvm master -> f85f47169bb9bd1a61110562cade840d5091904d
sev-
noreply at scummvm.org
Tue Mar 11 20:25:23 UTC 2025
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
64bf4d9638 TESTBED: Allow video test to handle more decoders.
d7ea3aaed5 VIDEO: Fix MVE get width, height, and pixel format
f85f47169b TESTBED: Simplify event checking for QT videos
Commit: 64bf4d9638ab0dd7b72587073c990d7a04596f42
https://github.com/scummvm/scummvm/commit/64bf4d9638ab0dd7b72587073c990d7a04596f42
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2025-03-11T21:25:19+01:00
Commit Message:
TESTBED: Allow video test to handle more decoders.
The decoders for avi, dxa, flc, mve, and smk are selected based on file extention.
Changed paths:
engines/testbed/video.cpp
diff --git a/engines/testbed/video.cpp b/engines/testbed/video.cpp
index 69332415870..1e59ab8463b 100644
--- a/engines/testbed/video.cpp
+++ b/engines/testbed/video.cpp
@@ -22,8 +22,13 @@
#include "common/events.h"
#include "common/file.h"
#include "engines/util.h"
+#include "video/avi_decoder.h"
+#include "video/dxa_decoder.h"
+#include "video/flic_decoder.h"
+#include "video/mve_decoder.h"
#include "video/qt_decoder.h"
#include "video/qt_data.h"
+#include "video/smk_decoder.h"
#include "testbed/testbed.h"
#include "testbed/video.h"
@@ -56,14 +61,32 @@ Common::Error Videotests::videoTest(const Common::FSNode &node) {
}
Common::Error Videotests::videoTest(Common::SeekableReadStream *stream, const Common::String &name) {
- Video::QuickTimeDecoder *video = new Video::QuickTimeDecoder();
+ Video::QuickTimeDecoder *qtVideo = nullptr;
+ Video::VideoDecoder *video = nullptr;
+
+ if (name.hasSuffixIgnoreCase(".avi")) {
+ video = new Video::AVIDecoder();
+ } else if (name.hasSuffixIgnoreCase(".dxa")) {
+ video = new Video::DXADecoder();
+ } else if (name.hasSuffixIgnoreCase(".flc")) {
+ video = new Video::FlicDecoder();
+ } else if (name.hasSuffixIgnoreCase(".mve")) {
+ video = new Video::MveDecoder();
+ } else if (name.hasSuffixIgnoreCase(".smk")) {
+ video = new Video::SmackerDecoder();
+ } else {
+ qtVideo = new Video::QuickTimeDecoder();
+ video = qtVideo;
+ }
+
if (!video->loadStream(stream)) {
warning("Cannot open video %s", name.c_str());
delete video;
return Common::kReadingFailed;
}
- video->setTargetSize(400, 300);
+ if (qtVideo)
+ qtVideo->setTargetSize(400, 300);
warning("Video size: %d x %d", video->getWidth(), video->getHeight());
@@ -153,17 +176,21 @@ Common::Error Videotests::videoTest(Common::SeekableReadStream *stream, const Co
mouse.y >= y && mouse.y < y + mh) {
switch (event.type) {
case Common::EVENT_LBUTTONDOWN:
- ((Video::QuickTimeDecoder *)video)->handleMouseButton(true, event.mouse.x - x, event.mouse.y - y);
+ if (qtVideo)
+ qtVideo->handleMouseButton(true, event.mouse.x - x, event.mouse.y - y);
break;
case Common::EVENT_LBUTTONUP:
- ((Video::QuickTimeDecoder *)video)->handleMouseButton(false, event.mouse.x - x, event.mouse.y - y);
+ if (qtVideo)
+ qtVideo->handleMouseButton(false, event.mouse.x - x, event.mouse.y - y);
break;
case Common::EVENT_MOUSEMOVE:
- ((Video::QuickTimeDecoder *)video)->handleMouseMove(event.mouse.x - x, event.mouse.y - y);
+ if (qtVideo)
+ qtVideo->handleMouseMove(event.mouse.x - x, event.mouse.y - y);
break;
case Common::EVENT_KEYUP:
case Common::EVENT_KEYDOWN:
- ((Video::QuickTimeDecoder *)video)->handleKey(event.kbd, event.type == Common::EVENT_KEYDOWN);
+ if (qtVideo)
+ qtVideo->handleKey(event.kbd, event.type == Common::EVENT_KEYDOWN);
break;
default:
break;
@@ -190,7 +217,7 @@ Common::Error Videotests::videoTest(Common::SeekableReadStream *stream, const Co
TestExitStatus Videotests::testPlayback() {
Testsuite::clearScreen();
- Common::String info = "Video playback test. A QuickTime video should be selected using the file browser, and it'll be played on the screen.";
+ Common::String info = "Video playback test. A video should be selected using the file browser, and it'll be played on the screen.";
Common::Point pt(0, 100);
Testsuite::writeOnScreen("Testing video playback", pt);
Commit: d7ea3aaed512530f3025859cc48dd910972fb619
https://github.com/scummvm/scummvm/commit/d7ea3aaed512530f3025859cc48dd910972fb619
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2025-03-11T21:25:19+01:00
Commit Message:
VIDEO: Fix MVE get width, height, and pixel format
Changed paths:
video/mve_decoder.cpp
diff --git a/video/mve_decoder.cpp b/video/mve_decoder.cpp
index fc415960b31..27ed2ce4d38 100644
--- a/video/mve_decoder.cpp
+++ b/video/mve_decoder.cpp
@@ -500,15 +500,15 @@ bool MveDecoder::MveVideoTrack::endOfTrack() const {
}
uint16 MveDecoder::MveVideoTrack::getWidth() const {
- return _decoder->getWidth();
+ return _decoder->_width;
}
uint16 MveDecoder::MveVideoTrack::getHeight() const {
- return _decoder->getHeight();
+ return _decoder->_height;
}
Graphics::PixelFormat MveDecoder::MveVideoTrack::getPixelFormat() const {
- return _decoder->getPixelFormat();
+ return _decoder->_pixelFormat;
}
int MveDecoder::MveVideoTrack::getCurFrame() const {
Commit: f85f47169bb9bd1a61110562cade840d5091904d
https://github.com/scummvm/scummvm/commit/f85f47169bb9bd1a61110562cade840d5091904d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-03-11T21:25:19+01:00
Commit Message:
TESTBED: Simplify event checking for QT videos
Changed paths:
engines/testbed/video.cpp
diff --git a/engines/testbed/video.cpp b/engines/testbed/video.cpp
index 1e59ab8463b..b71b174703a 100644
--- a/engines/testbed/video.cpp
+++ b/engines/testbed/video.cpp
@@ -172,25 +172,21 @@ Common::Error Videotests::videoTest(Common::SeekableReadStream *stream, const Co
if (Common::isMouseEvent(event))
mouse = event.mouse;
- if (mouse.x >= x && mouse.x < x + mw &&
+ if (qtVideo && mouse.x >= x && mouse.x < x + mw &&
mouse.y >= y && mouse.y < y + mh) {
switch (event.type) {
case Common::EVENT_LBUTTONDOWN:
- if (qtVideo)
- qtVideo->handleMouseButton(true, event.mouse.x - x, event.mouse.y - y);
+ qtVideo->handleMouseButton(true, event.mouse.x - x, event.mouse.y - y);
break;
case Common::EVENT_LBUTTONUP:
- if (qtVideo)
- qtVideo->handleMouseButton(false, event.mouse.x - x, event.mouse.y - y);
+ qtVideo->handleMouseButton(false, event.mouse.x - x, event.mouse.y - y);
break;
case Common::EVENT_MOUSEMOVE:
- if (qtVideo)
- qtVideo->handleMouseMove(event.mouse.x - x, event.mouse.y - y);
+ qtVideo->handleMouseMove(event.mouse.x - x, event.mouse.y - y);
break;
case Common::EVENT_KEYUP:
case Common::EVENT_KEYDOWN:
- if (qtVideo)
- qtVideo->handleKey(event.kbd, event.type == Common::EVENT_KEYDOWN);
+ qtVideo->handleKey(event.kbd, event.type == Common::EVENT_KEYDOWN);
break;
default:
break;
More information about the Scummvm-git-logs
mailing list