Rename renderFrameAtVsync() to renderFrame() in preparation for further refactoring
This commit is contained in:
parent
6cab2bec61
commit
81c6202582
11 changed files with 16 additions and 16 deletions
|
|
@ -734,7 +734,7 @@ void DXVA2Renderer::notifyOverlayUpdated(Overlay::OverlayType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DXVA2Renderer::renderFrameAtVsync(AVFrame *frame)
|
void DXVA2Renderer::renderFrame(AVFrame *frame)
|
||||||
{
|
{
|
||||||
IDirect3DSurface9* surface = reinterpret_cast<IDirect3DSurface9*>(frame->data[3]);
|
IDirect3DSurface9* surface = reinterpret_cast<IDirect3DSurface9*>(frame->data[3]);
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,12 @@ public:
|
||||||
int width,
|
int width,
|
||||||
int height,
|
int height,
|
||||||
int maxFps,
|
int maxFps,
|
||||||
bool enableVsync);
|
bool enableVsync) override;
|
||||||
virtual bool prepareDecoderContext(AVCodecContext* context);
|
virtual bool prepareDecoderContext(AVCodecContext* context) override;
|
||||||
virtual void renderFrameAtVsync(AVFrame* frame);
|
virtual void renderFrame(AVFrame* frame) override;
|
||||||
virtual bool needsTestFrame();
|
virtual bool needsTestFrame() override;
|
||||||
virtual int getDecoderCapabilities();
|
virtual int getDecoderCapabilities() override;
|
||||||
virtual FramePacingConstraint getFramePacingConstraint();
|
virtual FramePacingConstraint getFramePacingConstraint() override;
|
||||||
virtual void notifyOverlayUpdated(Overlay::OverlayType) override;
|
virtual void notifyOverlayUpdated(Overlay::OverlayType) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@ void Pacer::renderFrame(AVFrame* frame)
|
||||||
m_VideoStats->totalPacerTime += beforeRender - frame->pts;
|
m_VideoStats->totalPacerTime += beforeRender - frame->pts;
|
||||||
|
|
||||||
// Render it
|
// Render it
|
||||||
m_VsyncRenderer->renderFrameAtVsync(frame);
|
m_VsyncRenderer->renderFrame(frame);
|
||||||
Uint32 afterRender = SDL_GetTicks();
|
Uint32 afterRender = SDL_GetTicks();
|
||||||
|
|
||||||
addRenderTimeToHistory(afterRender - beforeRender);
|
addRenderTimeToHistory(afterRender - beforeRender);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public:
|
||||||
int maxFps,
|
int maxFps,
|
||||||
bool enableVsync) = 0;
|
bool enableVsync) = 0;
|
||||||
virtual bool prepareDecoderContext(AVCodecContext* context) = 0;
|
virtual bool prepareDecoderContext(AVCodecContext* context) = 0;
|
||||||
virtual void renderFrameAtVsync(AVFrame* frame) = 0;
|
virtual void renderFrame(AVFrame* frame) = 0;
|
||||||
virtual bool needsTestFrame() = 0;
|
virtual bool needsTestFrame() = 0;
|
||||||
virtual int getDecoderCapabilities() = 0;
|
virtual int getDecoderCapabilities() = 0;
|
||||||
virtual FramePacingConstraint getFramePacingConstraint() = 0;
|
virtual FramePacingConstraint getFramePacingConstraint() = 0;
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ bool SdlRenderer::initialize(SDL_Window* window,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SdlRenderer::renderFrameAtVsync(AVFrame* frame)
|
void SdlRenderer::renderFrame(AVFrame* frame)
|
||||||
{
|
{
|
||||||
SDL_UpdateYUVTexture(m_Texture, nullptr,
|
SDL_UpdateYUVTexture(m_Texture, nullptr,
|
||||||
frame->data[0],
|
frame->data[0],
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ public:
|
||||||
int maxFps,
|
int maxFps,
|
||||||
bool enableVsync) override;
|
bool enableVsync) override;
|
||||||
virtual bool prepareDecoderContext(AVCodecContext* context) override;
|
virtual bool prepareDecoderContext(AVCodecContext* context) override;
|
||||||
virtual void renderFrameAtVsync(AVFrame* frame) override;
|
virtual void renderFrame(AVFrame* frame) override;
|
||||||
virtual bool needsTestFrame() override;
|
virtual bool needsTestFrame() override;
|
||||||
virtual int getDecoderCapabilities() override;
|
virtual int getDecoderCapabilities() override;
|
||||||
virtual FramePacingConstraint getFramePacingConstraint() override;
|
virtual FramePacingConstraint getFramePacingConstraint() override;
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,7 @@ IFFmpegRenderer::FramePacingConstraint VAAPIRenderer::getFramePacingConstraint()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
VAAPIRenderer::renderFrameAtVsync(AVFrame* frame)
|
VAAPIRenderer::renderFrame(AVFrame* frame)
|
||||||
{
|
{
|
||||||
VASurfaceID surface = (VASurfaceID)(uintptr_t)frame->data[3];
|
VASurfaceID surface = (VASurfaceID)(uintptr_t)frame->data[3];
|
||||||
AVHWDeviceContext* deviceContext = (AVHWDeviceContext*)m_HwContext->data;
|
AVHWDeviceContext* deviceContext = (AVHWDeviceContext*)m_HwContext->data;
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public:
|
||||||
int maxFps,
|
int maxFps,
|
||||||
bool enableVsync);
|
bool enableVsync);
|
||||||
virtual bool prepareDecoderContext(AVCodecContext* context);
|
virtual bool prepareDecoderContext(AVCodecContext* context);
|
||||||
virtual void renderFrameAtVsync(AVFrame* frame);
|
virtual void renderFrame(AVFrame* frame);
|
||||||
virtual bool needsTestFrame();
|
virtual bool needsTestFrame();
|
||||||
virtual int getDecoderCapabilities();
|
virtual int getDecoderCapabilities();
|
||||||
virtual FramePacingConstraint getFramePacingConstraint();
|
virtual FramePacingConstraint getFramePacingConstraint();
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ IFFmpegRenderer::FramePacingConstraint VDPAURenderer::getFramePacingConstraint()
|
||||||
return PACING_ANY;
|
return PACING_ANY;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VDPAURenderer::renderFrameAtVsync(AVFrame* frame)
|
void VDPAURenderer::renderFrame(AVFrame* frame)
|
||||||
{
|
{
|
||||||
VdpStatus status;
|
VdpStatus status;
|
||||||
VdpVideoSurface videoSurface = (VdpVideoSurface)(uintptr_t)frame->data[3];
|
VdpVideoSurface videoSurface = (VdpVideoSurface)(uintptr_t)frame->data[3];
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public:
|
||||||
int maxFps,
|
int maxFps,
|
||||||
bool enableVsync);
|
bool enableVsync);
|
||||||
virtual bool prepareDecoderContext(AVCodecContext* context);
|
virtual bool prepareDecoderContext(AVCodecContext* context);
|
||||||
virtual void renderFrameAtVsync(AVFrame* frame);
|
virtual void renderFrame(AVFrame* frame);
|
||||||
virtual bool needsTestFrame();
|
virtual bool needsTestFrame();
|
||||||
virtual int getDecoderCapabilities();
|
virtual int getDecoderCapabilities();
|
||||||
virtual FramePacingConstraint getFramePacingConstraint();
|
virtual FramePacingConstraint getFramePacingConstraint();
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Caller frees frame after we return
|
// Caller frees frame after we return
|
||||||
virtual void renderFrameAtVsync(AVFrame* frame) override
|
virtual void renderFrame(AVFrame* frame) override
|
||||||
{
|
{
|
||||||
OSStatus status;
|
OSStatus status;
|
||||||
CVPixelBufferRef pixBuf = reinterpret_cast<CVPixelBufferRef>(frame->data[3]);
|
CVPixelBufferRef pixBuf = reinterpret_cast<CVPixelBufferRef>(frame->data[3]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue