Rename renderFrameAtVsync() to renderFrame() in preparation for further refactoring

This commit is contained in:
Cameron Gutman 2019-02-15 19:31:01 -08:00
parent 6cab2bec61
commit 81c6202582
11 changed files with 16 additions and 16 deletions

View file

@ -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]);
HRESULT hr;

View file

@ -21,12 +21,12 @@ public:
int width,
int height,
int maxFps,
bool enableVsync);
virtual bool prepareDecoderContext(AVCodecContext* context);
virtual void renderFrameAtVsync(AVFrame* frame);
virtual bool needsTestFrame();
virtual int getDecoderCapabilities();
virtual FramePacingConstraint getFramePacingConstraint();
bool enableVsync) override;
virtual bool prepareDecoderContext(AVCodecContext* context) override;
virtual void renderFrame(AVFrame* frame) override;
virtual bool needsTestFrame() override;
virtual int getDecoderCapabilities() override;
virtual FramePacingConstraint getFramePacingConstraint() override;
virtual void notifyOverlayUpdated(Overlay::OverlayType) override;
private:

View file

@ -244,7 +244,7 @@ void Pacer::renderFrame(AVFrame* frame)
m_VideoStats->totalPacerTime += beforeRender - frame->pts;
// Render it
m_VsyncRenderer->renderFrameAtVsync(frame);
m_VsyncRenderer->renderFrame(frame);
Uint32 afterRender = SDL_GetTicks();
addRenderTimeToHistory(afterRender - beforeRender);

View file

@ -23,7 +23,7 @@ public:
int maxFps,
bool enableVsync) = 0;
virtual bool prepareDecoderContext(AVCodecContext* context) = 0;
virtual void renderFrameAtVsync(AVFrame* frame) = 0;
virtual void renderFrame(AVFrame* frame) = 0;
virtual bool needsTestFrame() = 0;
virtual int getDecoderCapabilities() = 0;
virtual FramePacingConstraint getFramePacingConstraint() = 0;

View file

@ -171,7 +171,7 @@ bool SdlRenderer::initialize(SDL_Window* window,
return true;
}
void SdlRenderer::renderFrameAtVsync(AVFrame* frame)
void SdlRenderer::renderFrame(AVFrame* frame)
{
SDL_UpdateYUVTexture(m_Texture, nullptr,
frame->data[0],

View file

@ -15,7 +15,7 @@ public:
int maxFps,
bool enableVsync) override;
virtual bool prepareDecoderContext(AVCodecContext* context) override;
virtual void renderFrameAtVsync(AVFrame* frame) override;
virtual void renderFrame(AVFrame* frame) override;
virtual bool needsTestFrame() override;
virtual int getDecoderCapabilities() override;
virtual FramePacingConstraint getFramePacingConstraint() override;

View file

@ -183,7 +183,7 @@ IFFmpegRenderer::FramePacingConstraint VAAPIRenderer::getFramePacingConstraint()
}
void
VAAPIRenderer::renderFrameAtVsync(AVFrame* frame)
VAAPIRenderer::renderFrame(AVFrame* frame)
{
VASurfaceID surface = (VASurfaceID)(uintptr_t)frame->data[3];
AVHWDeviceContext* deviceContext = (AVHWDeviceContext*)m_HwContext->data;

View file

@ -37,7 +37,7 @@ public:
int maxFps,
bool enableVsync);
virtual bool prepareDecoderContext(AVCodecContext* context);
virtual void renderFrameAtVsync(AVFrame* frame);
virtual void renderFrame(AVFrame* frame);
virtual bool needsTestFrame();
virtual int getDecoderCapabilities();
virtual FramePacingConstraint getFramePacingConstraint();

View file

@ -251,7 +251,7 @@ IFFmpegRenderer::FramePacingConstraint VDPAURenderer::getFramePacingConstraint()
return PACING_ANY;
}
void VDPAURenderer::renderFrameAtVsync(AVFrame* frame)
void VDPAURenderer::renderFrame(AVFrame* frame)
{
VdpStatus status;
VdpVideoSurface videoSurface = (VdpVideoSurface)(uintptr_t)frame->data[3];

View file

@ -20,7 +20,7 @@ public:
int maxFps,
bool enableVsync);
virtual bool prepareDecoderContext(AVCodecContext* context);
virtual void renderFrameAtVsync(AVFrame* frame);
virtual void renderFrame(AVFrame* frame);
virtual bool needsTestFrame();
virtual int getDecoderCapabilities();
virtual FramePacingConstraint getFramePacingConstraint();

View file

@ -47,7 +47,7 @@ public:
}
// Caller frees frame after we return
virtual void renderFrameAtVsync(AVFrame* frame) override
virtual void renderFrame(AVFrame* frame) override
{
OSStatus status;
CVPixelBufferRef pixBuf = reinterpret_cast<CVPixelBufferRef>(frame->data[3]);