Wait on our D3D11 swapchain before rendering to reduce latency

This commit is contained in:
Cameron Gutman
2022-04-07 21:46:48 -05:00
parent 474591c6a5
commit 6d3d51553b
4 changed files with 27 additions and 20 deletions
@@ -102,6 +102,13 @@ public:
virtual bool prepareDecoderContext(AVCodecContext* context, AVDictionary** options) = 0;
virtual void renderFrame(AVFrame* frame) = 0;
// Called for threaded renderers to allow them to wait prior to us latching
// the next frame for rendering (as opposed to waiting on buffer swap with
// an older frame already queued for display).
virtual void waitToRender() {
// Don't wait by default
}
// Called on the same thread as renderFrame() during destruction of the renderer
virtual void cleanupRenderContext() {
// Nothing