summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2023-01-31 19:15:09 +1300
committerScott Mansell <phiren@gmail.com>2023-02-09 18:36:20 +1300
commit628af9d564e32079fb2f366b256fff9c9927a309 (patch)
treefbb6d9cefcd5d85e95a00f9ad3b570fca62ad6a7 /Source/Core
parent4422af1272959fb48418a6a863a62c20730434ac (diff)
Fix builds with FFMPEG disabled
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/FrameDumpFFMpeg.h28
-rw-r--r--Source/Core/VideoCommon/FrameDumper.cpp12
-rw-r--r--Source/Core/VideoCommon/FrameDumper.h22
3 files changed, 33 insertions, 29 deletions
diff --git a/Source/Core/VideoCommon/FrameDumpFFMpeg.h b/Source/Core/VideoCommon/FrameDumpFFMpeg.h
index 18c98c7720..8431e24274 100644
--- a/Source/Core/VideoCommon/FrameDumpFFMpeg.h
+++ b/Source/Core/VideoCommon/FrameDumpFFMpeg.h
@@ -10,8 +10,26 @@
struct FrameDumpContext;
class PointerWrap;
-struct FrameData;
-struct FrameState;
+
+// Holds relevant emulation state during a rendered frame for
+// when it is later asynchronously written.
+struct FrameState
+{
+ u64 ticks = 0;
+ int frame_number = 0;
+ u32 savestate_index = 0;
+ int refresh_rate_num = 0;
+ int refresh_rate_den = 0;
+};
+
+struct FrameData
+{
+ const u8* data = nullptr;
+ int width = 0;
+ int height = 0;
+ int stride = 0;
+ FrameState state;
+};
class FFMpegFrameDump
{
@@ -47,10 +65,10 @@ private:
};
#if !defined(HAVE_FFMPEG)
-inline FrameDump::FrameDump() = default;
-inline FrameDump::~FrameDump() = default;
+inline FFMpegFrameDump::FFMpegFrameDump() = default;
+inline FFMpegFrameDump::~FFMpegFrameDump() = default;
-inline FrameState FrameDump::FetchState(u64 ticks, int frame_number) const
+inline FrameState FFMpegFrameDump::FetchState(u64 ticks, int frame_number) const
{
return {};
}
diff --git a/Source/Core/VideoCommon/FrameDumper.cpp b/Source/Core/VideoCommon/FrameDumper.cpp
index f0c62c4c17..06bbe1b1c9 100644
--- a/Source/Core/VideoCommon/FrameDumper.cpp
+++ b/Source/Core/VideoCommon/FrameDumper.cpp
@@ -288,16 +288,16 @@ void FrameDumper::StopFrameDumpToFFMPEG()
#else
-bool FrameDump::StartFrameDumpToFFMPEG(const FrameData&)
+bool FrameDumper::StartFrameDumpToFFMPEG(const FrameData&)
{
return false;
}
-void FrameDump::DumpFrameToFFMPEG(const FrameData&)
+void FrameDumper::DumpFrameToFFMPEG(const FrameData&)
{
}
-void FrameDump::StopFrameDumpToFFMPEG()
+void FrameDumper::StopFrameDumpToFFMPEG()
{
}
@@ -352,4 +352,10 @@ bool FrameDumper::IsFrameDumping() const
return false;
}
+void FrameDumper::DoState(PointerWrap& p)
+{
+#ifdef HAVE_FFMPEG
+ m_ffmpeg_dump.DoState(p);
+#endif
+}
std::unique_ptr<FrameDumper> g_frame_dumper;
diff --git a/Source/Core/VideoCommon/FrameDumper.h b/Source/Core/VideoCommon/FrameDumper.h
index 8006739671..cdf6d9359d 100644
--- a/Source/Core/VideoCommon/FrameDumper.h
+++ b/Source/Core/VideoCommon/FrameDumper.h
@@ -16,26 +16,6 @@ class AbstractStagingTexture;
class AbstractTexture;
class AbstractFramebuffer;
-// Holds relevant emulation state during a rendered frame for
-// when it is later asynchronously written.
-struct FrameState
-{
- u64 ticks = 0;
- int frame_number = 0;
- u32 savestate_index = 0;
- int refresh_rate_num = 0;
- int refresh_rate_den = 0;
-};
-
-struct FrameData
-{
- const u8* data = nullptr;
- int width = 0;
- int height = 0;
- int stride = 0;
- FrameState state;
-};
-
class FrameDumper
{
public:
@@ -54,7 +34,7 @@ public:
bool IsFrameDumping() const;
- void DoState(PointerWrap& p) { m_ffmpeg_dump.DoState(p); }
+ void DoState(PointerWrap& p);
private:
// NOTE: The methods below are called on the framedumping thread.