mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 22:23:31 +00:00
Add PoC VsyncSource for Windows using DwmFlush(). Soon to be replaced with D3DKMTWaitForVerticalBlankEvent().
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "renderer.h"
|
||||
#include "pacer/pacer.h"
|
||||
|
||||
#include <d3d9.h>
|
||||
#include <dxva2api.h>
|
||||
@@ -9,7 +10,7 @@ extern "C" {
|
||||
#include <libavcodec/dxva2.h>
|
||||
}
|
||||
|
||||
class DXVA2Renderer : public IFFmpegRenderer
|
||||
class DXVA2Renderer : public IFFmpegRenderer, public IVsyncRenderer
|
||||
{
|
||||
public:
|
||||
DXVA2Renderer();
|
||||
@@ -21,6 +22,7 @@ public:
|
||||
int maxFps);
|
||||
virtual bool prepareDecoderContext(AVCodecContext* context);
|
||||
virtual void renderFrame(AVFrame* frame);
|
||||
virtual void renderFrameAtVsync(AVFrame* frame);
|
||||
|
||||
private:
|
||||
bool initializeDecoder();
|
||||
@@ -44,6 +46,7 @@ private:
|
||||
int m_DisplayHeight;
|
||||
|
||||
SDL_Renderer* m_SdlRenderer;
|
||||
Pacer m_Pacer;
|
||||
|
||||
struct dxva_context m_DXVAContext;
|
||||
IDirect3DSurface9* m_DecSurfaces[19];
|
||||
|
||||
Reference in New Issue
Block a user