Files
video-shader-toys/apps/LoopThroughWithOpenGLCompositing/gl/pipeline/OpenGLVideoIOBridge.cpp
Aiden bfc32c4a1e
Some checks failed
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m43s
CI / Windows Release Package (push) Has been cancelled
Phase 4
2026-05-11 18:25:47 +10:00

26 lines
787 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.QueueInputFrame(inputFrame, state);
}
bool OpenGLVideoIOBridge::RenderScheduledFrame(const VideoIOState& state, const VideoIOCompletion& completion, VideoIOOutputFrame& outputFrame)
{
RenderPipelineFrameContext frameContext;
frameContext.videoState = state;
frameContext.completion = completion;
return mRenderEngine.RequestOutputFrame(frameContext, outputFrame);
}