From c46ab5a0ace48e1176049f77c7a076c680387eab Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Thu, 26 Mar 2015 02:09:59 +0000 Subject: [PATCH] list color spaces supported --- lib/PlaYUVerFrame.cpp | 9 +++++++++ lib/PlaYUVerFrame.h | 13 ++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/PlaYUVerFrame.cpp b/lib/PlaYUVerFrame.cpp index 30c870c..602d6ef 100644 --- a/lib/PlaYUVerFrame.cpp +++ b/lib/PlaYUVerFrame.cpp @@ -42,6 +42,15 @@ namespace plaYUVer { +std::vector PlaYUVerFrame::supportedColorSpacesListNames() +{ + std::vector colorSpaceList; + colorSpaceList.push_back( "YUV" ); + colorSpaceList.push_back( "RGB" ); + colorSpaceList.push_back( "GRAY" ); + return colorSpaceList; +} + std::vector PlaYUVerFrame::supportedPixelFormatListNames() { std::vector formatsList; diff --git a/lib/PlaYUVerFrame.h b/lib/PlaYUVerFrame.h index 0625cd1..dd5be01 100644 --- a/lib/PlaYUVerFrame.h +++ b/lib/PlaYUVerFrame.h @@ -117,9 +117,9 @@ public: { COLOR_INVALID = -1, //!< Invalid COLOR_YUV = 0, //!< YUV - COLOR_RGB, //!< RGB - COLOR_ARGB, //!< RGB + Alpha - COLOR_GRAY, //!< Grayscale + COLOR_RGB = 1, //!< RGB + COLOR_ARGB = 3, //!< RGB + Alpha + COLOR_GRAY = 2, //!< Grayscale }; /** ColorSpace Enum @@ -138,6 +138,13 @@ public: NUMBER_FORMATS }; + /** + * Function that handles the supported color space + * of PlaYUVerFrame + * @return vector of strings with pixel formats names + */ + static std::vector supportedColorSpacesListNames(); + /** * Function that handles the supported pixel formats * of PlaYUVerFrame