Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::RETRO::CDeltaPairMemoryStream Class Reference

Implementation of a linear memory stream using XOR deltas. More...

#include <DeltaPairMemoryStream.h>

Inheritance diagram for KODI::RETRO::CDeltaPairMemoryStream:
KODI::RETRO::CLinearMemoryStream KODI::RETRO::IMemoryStream

Classes

struct  DeltaPair
 
struct  MemoryFrame
 

Public Member Functions

 CDeltaPairMemoryStream ()=default
 
 ~CDeltaPairMemoryStream () override=default
 
void Reset () override
 Free any resources used by this stream.
 
uint64_t PastFramesAvailable () const override
 Return the number of frames behind the current frame.
 
uint64_t RewindFrames (uint64_t frameCount) override
 Seek backwards the specified number of frames.
 
- Public Member Functions inherited from KODI::RETRO::CLinearMemoryStream
 CLinearMemoryStream ()
 
 ~CLinearMemoryStream () override=default
 
void Init (size_t frameSize, uint64_t maxFrameCount) override
 Initialize memory stream.
 
void Reset () override
 Free any resources used by this stream.
 
size_t FrameSize () const override
 Return the frame size passed to Init()
 
uint64_t MaxFrameCount () const override
 Return the current max frame count.
 
void SetMaxFrameCount (uint64_t maxFrameCount) override
 Update the max frame count.
 
uint8_tBeginFrame () override
 
void SubmitFrame () override
 Indicate that a frame of size FrameSize() has been written to the location returned from BeginFrame()
 
const uint8_tCurrentFrame () const override
 Get a pointer to the current frame.
 
uint64_t FutureFramesAvailable () const override
 Return the number of frames ahead of the current frame.
 
uint64_t AdvanceFrames (uint64_t frameCount) override
 Seek ahead the specified number of frames.
 
uint64_t GetFrameCounter () const override
 Get the total number of frames played until the current frame.
 
void SetFrameCounter (uint64_t frameCount) override
 Set the total number of frames played until the current frame.
 
- Public Member Functions inherited from KODI::RETRO::IMemoryStream
virtual ~IMemoryStream ()=default
 

Protected Types

using DeltaPairVector = std::vector<DeltaPair>
 

Protected Member Functions

void SubmitFrameInternal () override
 
void CullPastFrames (uint64_t frameCount) override
 
- Protected Member Functions inherited from KODI::RETRO::CLinearMemoryStream
uint64_t BufferSize () const
 

Protected Attributes

std::deque< MemoryFramem_rewindBuffer
 
- Protected Attributes inherited from KODI::RETRO::CLinearMemoryStream
size_t m_paddedFrameSize
 
uint64_t m_maxFrames
 
std::unique_ptr< uint32_t[]> m_currentFrame
 
std::unique_ptr< uint32_t[]> m_nextFrame
 
bool m_bHasCurrentFrame
 
bool m_bHasNextFrame
 
uint64_t m_currentFrameHistory
 

Detailed Description

Implementation of a linear memory stream using XOR deltas.

Member Typedef Documentation

◆ DeltaPairVector

Constructor & Destructor Documentation

◆ CDeltaPairMemoryStream()

KODI::RETRO::CDeltaPairMemoryStream::CDeltaPairMemoryStream ( )
default

◆ ~CDeltaPairMemoryStream()

KODI::RETRO::CDeltaPairMemoryStream::~CDeltaPairMemoryStream ( )
overridedefault

Member Function Documentation

◆ CullPastFrames()

void CDeltaPairMemoryStream::CullPastFrames ( uint64_t frameCount)
overrideprotectedvirtual

◆ PastFramesAvailable()

uint64_t CDeltaPairMemoryStream::PastFramesAvailable ( ) const
overridevirtual

Return the number of frames behind the current frame.

Implements KODI::RETRO::CLinearMemoryStream.

◆ Reset()

void CDeltaPairMemoryStream::Reset ( )
overridevirtual

Free any resources used by this stream.

Implements KODI::RETRO::IMemoryStream.

◆ RewindFrames()

uint64_t CDeltaPairMemoryStream::RewindFrames ( uint64_t frameCount)
overridevirtual

Seek backwards the specified number of frames.

Returns
The number of frames rewound

Implements KODI::RETRO::CLinearMemoryStream.

◆ SubmitFrameInternal()

void CDeltaPairMemoryStream::SubmitFrameInternal ( )
overrideprotectedvirtual

Member Data Documentation

◆ m_rewindBuffer

std::deque<MemoryFrame> KODI::RETRO::CDeltaPairMemoryStream::m_rewindBuffer
protected

The documentation for this class was generated from the following files: