0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 21:13:04 +02:00
obs-studio/plugins/decklink/OBSVideoFrame.cpp
Colin Edwards 923f06bfa6 decklink: Add ability to ingest/embed cea 708 captions
(This commit also modifies libobs, UI)
2020-11-01 22:28:49 -08:00

73 lines
1.2 KiB
C++

#include "OBSVideoFrame.h"
OBSVideoFrame::OBSVideoFrame(long width, long height)
{
this->width = width;
this->height = height;
this->rowBytes = width * 2;
this->data = new unsigned char[width * height * 2 + 1];
}
HRESULT OBSVideoFrame::SetFlags(BMDFrameFlags newFlags)
{
flags = newFlags;
return S_OK;
}
HRESULT OBSVideoFrame::SetTimecode(BMDTimecodeFormat format,
IDeckLinkTimecode *timecode)
{
return 0;
}
HRESULT
OBSVideoFrame::SetTimecodeFromComponents(BMDTimecodeFormat format,
uint8_t hours, uint8_t minutes,
uint8_t seconds, uint8_t frames,
BMDTimecodeFlags flags)
{
return 0;
}
HRESULT OBSVideoFrame::SetAncillaryData(IDeckLinkVideoFrameAncillary *ancillary)
{
return 0;
}
HRESULT OBSVideoFrame::SetTimecodeUserBits(BMDTimecodeFormat format,
BMDTimecodeUserBits userBits)
{
return 0;
}
long OBSVideoFrame::GetWidth()
{
return width;
}
long OBSVideoFrame::GetHeight()
{
return height;
}
long OBSVideoFrame::GetRowBytes()
{
return rowBytes;
}
BMDPixelFormat OBSVideoFrame::GetPixelFormat()
{
return pixelFormat;
}
BMDFrameFlags OBSVideoFrame::GetFlags()
{
return flags;
}
HRESULT OBSVideoFrame::GetBytes(void **buffer)
{
*buffer = this->data;
return S_OK;
}