diff --git a/source/PlaYUVerFrame.cpp b/source/PlaYUVerFrame.cpp index 6986839..b1506db 100755 --- a/source/PlaYUVerFrame.cpp +++ b/source/PlaYUVerFrame.cpp @@ -34,13 +34,10 @@ namespace plaYUVer QStringList PlaYUVerFrame::supportedPixelFormatList() { QStringList formats; - formats << "yuv420p" - << "yuv444p" - << "yuv422p" - << "yuv410p" - << "yuv411p" - << "gray" - << "rgb24"; + for( Int i = 0; i < NUMBER_FORMATS; i++ ) + { + formats.append(gInputStreamFormatsNames[i].data()); + } return formats; } diff --git a/source/TypeDef.h b/source/TypeDef.h index ae146a4..f440fbc 100644 --- a/source/TypeDef.h +++ b/source/TypeDef.h @@ -27,6 +27,7 @@ #ifndef __MAKE_LIB__ #include "config.h" #endif +#include namespace plaYUVer { @@ -110,7 +111,7 @@ typedef UChar Pel; ///< 8-bit pixel type // PlaYUVer definitions // ==================================================================================================================== -enum InputStreamColorSpace +enum InputStreamFormats { NO_FMT = -1, YUV420p, @@ -120,6 +121,18 @@ enum InputStreamColorSpace YUV410p, GRAY, RGB8, + NUMBER_FORMATS +}; + +const std::string gInputStreamFormatsNames[] = +{ + "YUV420p", + "YUV444p", + "YUV422p", + "YUV411p", + "YUV410p", + "GRAY", + "RGB8", }; enum ColorSpace