diff --git a/lib/PlaYUVerFrame.cpp b/lib/PlaYUVerFrame.cpp index 602d6ef..513fe45 100644 --- a/lib/PlaYUVerFrame.cpp +++ b/lib/PlaYUVerFrame.cpp @@ -62,6 +62,18 @@ std::vector PlaYUVerFrame::supportedPixelFormatListNames() return formatsList; } +std::vector PlaYUVerFrame::supportedPixelFormatListNames( Int colorSpace ) +{ + std::vector formatsList; + Int numberFormats = PLAYUVER_NUMBER_FORMATS; + for( Int i = 0; i < numberFormats; i++ ) + { + if( g_PlaYUVerPixFmtDescriptorsList[i].colorSpace == colorSpace ) + formatsList.push_back( g_PlaYUVerPixFmtDescriptorsList[i].name ); + } + return formatsList; +} + PlaYUVerFrame::Pixel PlaYUVerFrame::ConvertPixel( Pixel inputPixel, ColorSpace eOutputSpace ) { Int outA, outB, outC; diff --git a/lib/PlaYUVerFrame.h b/lib/PlaYUVerFrame.h index dd5be01..271da41 100644 --- a/lib/PlaYUVerFrame.h +++ b/lib/PlaYUVerFrame.h @@ -151,6 +151,7 @@ public: * @return vector of strings with pixel formats names */ static std::vector supportedPixelFormatListNames(); + static std::vector supportedPixelFormatListNames( Int colorSpace ); /** * Get number of bytes per frame of a specific