diff options
| author | altimumdelta <48530820+altimumdelta@users.noreply.github.com> | 2019-03-18 05:50:53 +0100 |
|---|---|---|
| committer | altimumdelta <48530820+altimumdelta@users.noreply.github.com> | 2019-06-30 13:02:39 +0200 |
| commit | 1df655e376fe59291ee5c69755f2f2a70f82ee75 (patch) | |
| tree | 1b8028bd6b9df6e4a9992a0cba5b297c4274542b /Source/Core/VideoCommon/RenderBase.cpp | |
| parent | 4f6cdfe68675eba932bd2806d6aa1bea97c864be (diff) | |
VideoCommon: Rename AVIDump to FrameDump
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 8c3f89de57..190a827f1b 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -48,7 +48,6 @@ #include "Core/Host.h" #include "Core/Movie.h" -#include "VideoCommon/AVIDump.h" #include "VideoCommon/AbstractFramebuffer.h" #include "VideoCommon/AbstractStagingTexture.h" #include "VideoCommon/AbstractTexture.h" @@ -57,6 +56,7 @@ #include "VideoCommon/CPMemory.h" #include "VideoCommon/CommandProcessor.h" #include "VideoCommon/FPSCounter.h" +#include "VideoCommon/FrameDump.h" #include "VideoCommon/FramebufferManager.h" #include "VideoCommon/ImageWrite.h" #include "VideoCommon/NetPlayChatUI.h" @@ -1339,7 +1339,7 @@ void Renderer::DumpCurrentFrame(const AbstractTexture* src_texture, copy_rect = src_texture->GetRect(); } - // Index 0 was just sent to AVI dump. Swap with the second texture. + // Index 0 was just sent to FFMPEG dump. Swap with the second texture. if (m_frame_dump_readback_textures[0]) std::swap(m_frame_dump_readback_textures[0], m_frame_dump_readback_textures[1]); @@ -1348,7 +1348,7 @@ void Renderer::DumpCurrentFrame(const AbstractTexture* src_texture, m_frame_dump_readback_textures[0]->CopyFromTexture(src_texture, copy_rect, 0, 0, m_frame_dump_readback_textures[0]->GetRect()); - m_last_frame_state = AVIDump::FetchState(ticks); + m_last_frame_state = FrameDump::FetchState(ticks); m_last_frame_exported = true; } @@ -1442,7 +1442,8 @@ void Renderer::ShutdownFrameDumping() tex.reset(); } -void Renderer::DumpFrameData(const u8* data, int w, int h, int stride, const AVIDump::Frame& state) +void Renderer::DumpFrameData(const u8* data, int w, int h, int stride, + const FrameDump::Frame& state) { m_frame_dump_config = FrameDumpConfig{data, w, h, stride, state}; @@ -1471,16 +1472,16 @@ void Renderer::FinishFrameData() void Renderer::RunFrameDumps() { Common::SetCurrentThreadName("FrameDumping"); - bool dump_to_avi = !g_ActiveConfig.bDumpFramesAsImages; + bool dump_to_ffmpeg = !g_ActiveConfig.bDumpFramesAsImages; bool frame_dump_started = false; -// If Dolphin was compiled without libav, we only support dumping to images. +// If Dolphin was compiled without ffmpeg, we only support dumping to images. #if !defined(HAVE_FFMPEG) - if (dump_to_avi) + if (dump_to_ffmpeg) { - WARN_LOG(VIDEO, "AVI frame dump requested, but Dolphin was compiled without libav. " - "Frame dump will be saved as images instead."); - dump_to_avi = false; + WARN_LOG(VIDEO, "FrameDump: Dolphin was not compiled with FFmpeg, using fallback option. " + "Frames will be saved as PNG images instead."); + dump_to_ffmpeg = false; } #endif @@ -1510,8 +1511,8 @@ void Renderer::RunFrameDumps() { if (!frame_dump_started) { - if (dump_to_avi) - frame_dump_started = StartFrameDumpToAVI(config); + if (dump_to_ffmpeg) + frame_dump_started = StartFrameDumpToFFMPEG(config); else frame_dump_started = StartFrameDumpToImage(config); @@ -1523,8 +1524,8 @@ void Renderer::RunFrameDumps() // If we failed to start frame dumping, don't write a frame. if (frame_dump_started) { - if (dump_to_avi) - DumpFrameToAVI(config); + if (dump_to_ffmpeg) + DumpFrameToFFMPEG(config); else DumpFrameToImage(config); } @@ -1536,40 +1537,40 @@ void Renderer::RunFrameDumps() if (frame_dump_started) { // No additional cleanup is needed when dumping to images. - if (dump_to_avi) - StopFrameDumpToAVI(); + if (dump_to_ffmpeg) + StopFrameDumpToFFMPEG(); } } #if defined(HAVE_FFMPEG) -bool Renderer::StartFrameDumpToAVI(const FrameDumpConfig& config) +bool Renderer::StartFrameDumpToFFMPEG(const FrameDumpConfig& config) { - return AVIDump::Start(config.width, config.height); + return FrameDump::Start(config.width, config.height); } -void Renderer::DumpFrameToAVI(const FrameDumpConfig& config) +void Renderer::DumpFrameToFFMPEG(const FrameDumpConfig& config) { - AVIDump::AddFrame(config.data, config.width, config.height, config.stride, config.state); + FrameDump::AddFrame(config.data, config.width, config.height, config.stride, config.state); } -void Renderer::StopFrameDumpToAVI() +void Renderer::StopFrameDumpToFFMPEG() { - AVIDump::Stop(); + FrameDump::Stop(); } #else -bool Renderer::StartFrameDumpToAVI(const FrameDumpConfig& config) +bool Renderer::StartFrameDumpToFFMPEG(const FrameDumpConfig& config) { return false; } -void Renderer::DumpFrameToAVI(const FrameDumpConfig& config) +void Renderer::DumpFrameToFFMPEG(const FrameDumpConfig& config) { } -void Renderer::StopFrameDumpToAVI() +void Renderer::StopFrameDumpToFFMPEG() { } |
