26 lines
783 B
C++
26 lines
783 B
C++
#include "OpenGLVideoIOBridge.h"
|
|
|
|
#include "RenderEngine.h"
|
|
|
|
OpenGLVideoIOBridge::OpenGLVideoIOBridge(RenderEngine& renderEngine) :
|
|
mRenderEngine(renderEngine)
|
|
{
|
|
}
|
|
|
|
void OpenGLVideoIOBridge::UploadInputFrame(const VideoIOFrame& inputFrame, const VideoIOState& state)
|
|
{
|
|
if (inputFrame.hasNoInputSource || inputFrame.bytes == nullptr)
|
|
return; // don't transfer texture when there's no input
|
|
|
|
mRenderEngine.TryUploadInputFrame(inputFrame, state);
|
|
}
|
|
|
|
void OpenGLVideoIOBridge::RenderScheduledFrame(const VideoIOState& state, const VideoIOCompletion& completion, VideoIOOutputFrame& outputFrame)
|
|
{
|
|
RenderPipelineFrameContext frameContext;
|
|
frameContext.videoState = state;
|
|
frameContext.completion = completion;
|
|
|
|
mRenderEngine.RenderOutputFrame(frameContext, outputFrame);
|
|
}
|