11 #include "ISavestate.h" 15 #include <flatbuffers/flatbuffers.h> 19 class FlatBufferBuilder;
27 struct SavestateBuilder;
36 void Reset()
override;
37 bool Serialize(
const uint8_t*& data,
size_t& size)
const override;
38 SAVE_TYPE Type()
const override;
39 uint8_t Slot()
const override;
40 std::string Label()
const override;
41 std::string Caption()
const override;
43 std::string GameFileName()
const override;
44 uint64_t TimestampFrames()
const override;
45 double TimestampWallClock()
const override;
46 std::string GameClientID()
const override;
47 std::string GameClientVersion()
const override;
48 AVPixelFormat GetPixelFormat()
const override;
49 unsigned int GetNominalWidth()
const override;
50 unsigned int GetNominalHeight()
const override;
51 unsigned int GetMaxWidth()
const override;
52 unsigned int GetMaxHeight()
const override;
53 float GetPixelAspectRatio()
const override;
54 const uint8_t* GetVideoData()
const override;
55 size_t GetVideoSize()
const override;
56 unsigned int GetVideoWidth()
const override;
57 unsigned int GetVideoHeight()
const override;
58 unsigned int GetRotationDegCCW()
const override;
59 const uint8_t* GetMemoryData()
const override;
60 size_t GetMemorySize()
const override;
61 void SetType(SAVE_TYPE type)
override;
62 void SetSlot(uint8_t slot)
override;
63 void SetLabel(
const std::string& label)
override;
64 void SetCaption(
const std::string& caption)
override;
65 void SetCreated(
const CDateTime& createdUTC)
override;
66 void SetGameFileName(
const std::string& gameFileName)
override;
67 void SetTimestampFrames(uint64_t timestampFrames)
override;
68 void SetTimestampWallClock(
double timestampWallClock)
override;
69 void SetGameClientID(
const std::string& gameClient)
override;
70 void SetGameClientVersion(
const std::string& gameClient)
override;
71 void SetPixelFormat(AVPixelFormat pixelFormat)
override;
72 void SetNominalWidth(
unsigned int nominalWidth)
override;
73 void SetNominalHeight(
unsigned int nominalHeight)
override;
74 void SetMaxWidth(
unsigned int maxWidth)
override;
75 void SetMaxHeight(
unsigned int maxHeight)
override;
76 void SetPixelAspectRatio(
float pixelAspectRatio)
override;
77 uint8_t* GetVideoBuffer(
size_t size)
override;
78 void SetVideoWidth(
unsigned int videoWidth)
override;
79 void SetVideoHeight(
unsigned int videoHeight)
override;
80 void SetRotationDegCCW(
unsigned int rotationCCW)
override;
81 uint8_t* GetMemoryBuffer(
size_t size)
override;
82 void Finalize()
override;
83 bool Deserialize(std::vector<uint8_t> data)
override;
91 std::unique_ptr<flatbuffers::FlatBufferBuilder> m_builder;
98 std::vector<uint8_t> m_data;
103 const Savestate* m_savestate =
nullptr;
105 using StringOffset = flatbuffers::Offset<flatbuffers::String>;
106 using VectorOffset = flatbuffers::Offset<flatbuffers::Vector<uint8_t>>;
109 SAVE_TYPE m_type = SAVE_TYPE::UNKNOWN;
111 std::unique_ptr<StringOffset> m_labelOffset;
112 std::unique_ptr<StringOffset> m_captionOffset;
113 std::unique_ptr<StringOffset> m_createdOffset;
114 std::unique_ptr<StringOffset> m_gameFileNameOffset;
115 uint64_t m_timestampFrames = 0;
116 double m_timestampWallClock = 0.0;
117 std::unique_ptr<StringOffset> m_emulatorAddonIdOffset;
118 std::unique_ptr<StringOffset> m_emulatorVersionOffset;
119 AVPixelFormat m_pixelFormat{AV_PIX_FMT_NONE};
120 unsigned int m_nominalWidth{0};
121 unsigned int m_nominalHeight{0};
122 unsigned int m_maxWidth{0};
123 unsigned int m_maxHeight{0};
124 float m_pixelAspectRatio{0.0f};
125 std::unique_ptr<VectorOffset> m_videoDataOffset;
126 unsigned int m_videoWidth{0};
127 unsigned int m_videoHeight{0};
128 unsigned int m_rotationCCW{0};
129 std::unique_ptr<VectorOffset> m_memoryDataOffset;
Definition: SavestateFlatBuffer.h:29
Definition: ISavestate.h:28
Definition: SavestateFlatBuffer.h:17
Controller configuration window.
Definition: AudioDecoder.h:18
DateTime class, which uses FileTime as it's base.
Definition: XBDateTime.h:63