diff --git a/YUViewLib/src/video/yuv/videoHandlerYUV.cpp b/YUViewLib/src/video/yuv/videoHandlerYUV.cpp index 013affa53..70b97437f 100644 --- a/YUViewLib/src/video/yuv/videoHandlerYUV.cpp +++ b/YUViewLib/src/video/yuv/videoHandlerYUV.cpp @@ -3151,6 +3151,14 @@ void videoHandlerYUV::setFormatFromCorrelation(const QByteArray &rawYUVData, int } } +std::optional videoHandlerYUV::getFormatAsString() const +{ + const auto frameFormat = FrameHandler::getFormatAsString(); + if (!frameFormat) + return {}; + return *frameFormat + ";YUV;" + this->srcPixelFormat.getName(); +} + bool videoHandlerYUV::setFormatFromString(const std::string_view format) { DEBUG_YUV("videoHandlerYUV::setFormatFromString " << format << "\n"); diff --git a/YUViewLib/src/video/yuv/videoHandlerYUV.h b/YUViewLib/src/video/yuv/videoHandlerYUV.h index 22b2efee1..d732c7f82 100644 --- a/YUViewLib/src/video/yuv/videoHandlerYUV.h +++ b/YUViewLib/src/video/yuv/videoHandlerYUV.h @@ -134,11 +134,7 @@ class videoHandlerYUV : public videoHandler virtual void setFormatFromCorrelation(const QByteArray &rawYUVData, int64_t fileSize = -1) override; - virtual std::optional getFormatAsString() const override - { - const auto frameFormat = FrameHandler::getFormatAsString(); - return *frameFormat + ";YUV;" + this->srcPixelFormat.getName(); - } + virtual std::optional getFormatAsString() const override; virtual bool setFormatFromString(const std::string_view format) override; // Create the YUV controls and return a pointer to the layout. diff --git a/YUViewUnitTest/video/rgb/VideoHandlerRawTestDataLoader.cpp b/YUViewUnitTest/video/VideoHandlerRawTestDataLoader.cpp similarity index 97% rename from YUViewUnitTest/video/rgb/VideoHandlerRawTestDataLoader.cpp rename to YUViewUnitTest/video/VideoHandlerRawTestDataLoader.cpp index 80d26915c..c0442cc80 100644 --- a/YUViewUnitTest/video/rgb/VideoHandlerRawTestDataLoader.cpp +++ b/YUViewUnitTest/video/VideoHandlerRawTestDataLoader.cpp @@ -32,9 +32,9 @@ #include "VideoHandlerRawTestDataLoader.h" -#include