25 lines
578 B
C++
25 lines
578 B
C++
#include "DeckLinkVideoIOFormat.h"
|
|
|
|
BMDPixelFormat DeckLinkPixelFormatForVideoIO(VideoIOPixelFormat format)
|
|
{
|
|
switch (format)
|
|
{
|
|
case VideoIOPixelFormat::V210:
|
|
return bmdFormat10BitYUV;
|
|
case VideoIOPixelFormat::Bgra8:
|
|
return bmdFormat8BitBGRA;
|
|
case VideoIOPixelFormat::Uyvy8:
|
|
default:
|
|
return bmdFormat8BitYUV;
|
|
}
|
|
}
|
|
|
|
VideoIOPixelFormat VideoIOPixelFormatFromDeckLink(BMDPixelFormat format)
|
|
{
|
|
if (format == bmdFormat10BitYUV)
|
|
return VideoIOPixelFormat::V210;
|
|
if (format == bmdFormat8BitBGRA)
|
|
return VideoIOPixelFormat::Bgra8;
|
|
return VideoIOPixelFormat::Uyvy8;
|
|
}
|