#include <LinearMemoryStream.h>
◆ CLinearMemoryStream()
CLinearMemoryStream::CLinearMemoryStream |
( |
| ) |
|
◆ ~CLinearMemoryStream()
KODI::RETRO::CLinearMemoryStream::~CLinearMemoryStream |
( |
| ) |
|
|
overridedefault |
◆ AdvanceFrames()
uint64_t KODI::RETRO::CLinearMemoryStream::AdvanceFrames |
( |
uint64_t | frameCount | ) |
|
|
inlineoverridevirtual |
◆ BeginFrame()
uint8_t * CLinearMemoryStream::BeginFrame |
( |
| ) |
|
|
overridevirtual |
\ brief Get a pointer to which FrameSize() bytes can be written
The buffer exposed by this function is passed to the game client, which fills it with a serialization of its current state.
Implements KODI::RETRO::IMemoryStream.
◆ BufferSize()
uint64_t CLinearMemoryStream::BufferSize |
( |
| ) |
const |
|
protected |
◆ CullPastFrames()
virtual void KODI::RETRO::CLinearMemoryStream::CullPastFrames |
( |
uint64_t | frameCount | ) |
|
|
protectedpure virtual |
◆ CurrentFrame()
const uint8_t * CLinearMemoryStream::CurrentFrame |
( |
| ) |
const |
|
overridevirtual |
Get a pointer to the current frame.
This function must have no side effects. The pointer is valid until the stream is modified.
- Returns
- A buffer of size FrameSize(), or nullptr if the stream is empty
Implements KODI::RETRO::IMemoryStream.
◆ FrameSize()
size_t KODI::RETRO::CLinearMemoryStream::FrameSize |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ FutureFramesAvailable()
uint64_t KODI::RETRO::CLinearMemoryStream::FutureFramesAvailable |
( |
| ) |
const |
|
inlineoverridevirtual |
Return the number of frames ahead of the current frame.
If the stream supports forward seeking, frames that are passed over during a "rewind" operation can be recovered again.
Implements KODI::RETRO::IMemoryStream.
◆ GetFrameCounter()
uint64_t KODI::RETRO::CLinearMemoryStream::GetFrameCounter |
( |
| ) |
const |
|
inlineoverridevirtual |
Get the total number of frames played until the current frame.
- Returns
- The history of the current frame, or 0 for unknown
Implements KODI::RETRO::IMemoryStream.
◆ Init()
void CLinearMemoryStream::Init |
( |
size_t | frameSize, |
|
|
uint64_t | maxFrameCount ) |
|
overridevirtual |
Initialize memory stream.
- Parameters
-
frameSize | The size of the serialized memory state |
maxFrameCount | The maximum number of frames this stream can hold |
Implements KODI::RETRO::IMemoryStream.
◆ MaxFrameCount()
uint64_t KODI::RETRO::CLinearMemoryStream::MaxFrameCount |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ PastFramesAvailable()
uint64_t KODI::RETRO::CLinearMemoryStream::PastFramesAvailable |
( |
| ) |
const |
|
overridepure virtual |
◆ Reset()
void CLinearMemoryStream::Reset |
( |
| ) |
|
|
overridevirtual |
◆ RewindFrames()
uint64_t KODI::RETRO::CLinearMemoryStream::RewindFrames |
( |
uint64_t | frameCount | ) |
|
|
overridepure virtual |
◆ SetFrameCounter()
void KODI::RETRO::CLinearMemoryStream::SetFrameCounter |
( |
uint64_t | frameCount | ) |
|
|
inlineoverridevirtual |
Set the total number of frames played until the current frame.
- Parameters
-
frameCount | The history of the current frame |
Implements KODI::RETRO::IMemoryStream.
◆ SetMaxFrameCount()
void CLinearMemoryStream::SetMaxFrameCount |
( |
uint64_t | maxFrameCount | ) |
|
|
overridevirtual |
◆ SubmitFrame()
void CLinearMemoryStream::SubmitFrame |
( |
| ) |
|
|
overridevirtual |
◆ SubmitFrameInternal()
virtual void KODI::RETRO::CLinearMemoryStream::SubmitFrameInternal |
( |
| ) |
|
|
protectedpure virtual |
◆ m_bHasCurrentFrame
bool KODI::RETRO::CLinearMemoryStream::m_bHasCurrentFrame |
|
protected |
◆ m_bHasNextFrame
bool KODI::RETRO::CLinearMemoryStream::m_bHasNextFrame |
|
protected |
◆ m_currentFrame
std::unique_ptr<uint32_t[]> KODI::RETRO::CLinearMemoryStream::m_currentFrame |
|
protected |
Simple double-buffering. After XORing the two states, the next becomes the current, and the current becomes a buffer for the next call to CGameClient::Serialize().
◆ m_currentFrameHistory
uint64_t KODI::RETRO::CLinearMemoryStream::m_currentFrameHistory |
|
protected |
◆ m_maxFrames
uint64_t KODI::RETRO::CLinearMemoryStream::m_maxFrames |
|
protected |
◆ m_nextFrame
std::unique_ptr<uint32_t[]> KODI::RETRO::CLinearMemoryStream::m_nextFrame |
|
protected |
◆ m_paddedFrameSize
size_t KODI::RETRO::CLinearMemoryStream::m_paddedFrameSize |
|
protected |
The documentation for this class was generated from the following files: