mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-18 05:22:47 -04:00
decklink: Add ability to ingest/embed cea 708 captions
(This commit also modifies libobs, UI)
This commit is contained in:
72
plugins/decklink/OBSVideoFrame.cpp
Normal file
72
plugins/decklink/OBSVideoFrame.cpp
Normal file
@@ -0,0 +1,72 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user