#include "NdiInputFormat.h" #include #include namespace RenderCadenceCompositor { const char* NdiFourCcName(NDIlib_FourCC_video_type_e fourCc) { static thread_local std::array text = {}; const auto value = static_cast(fourCc); text[0] = static_cast(value & 0xff); text[1] = static_cast((value >> 8) & 0xff); text[2] = static_cast((value >> 16) & 0xff); text[3] = static_cast((value >> 24) & 0xff); text[4] = '\0'; return text.data(); } bool MapNdiFourCcToVideoIOPixelFormat(NDIlib_FourCC_video_type_e fourCc, VideoIOPixelFormat& pixelFormat) { switch (fourCc) { case NDIlib_FourCC_video_type_BGRA: case NDIlib_FourCC_video_type_BGRX: pixelFormat = VideoIOPixelFormat::Bgra8; return true; case NDIlib_FourCC_video_type_UYVY: pixelFormat = VideoIOPixelFormat::Uyvy8; return true; default: return false; } } }