Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cVideoFSRateController Class Reference

#include <cVideoFS.h>

Inheritance diagram for GrayLib::cVideoFSRateController:
GrayLib::cAVRateController GrayLib::cVideoFS GrayLib::cAVSink

Classes

struct  CBlock
 

Public Member Functions

 cVideoFSRateController ()
 
virtual ~cVideoFSRateController ()
 
virtual HRESULT OnHeaderStream (const cAVHeaderStream &head, const void *pForm, size_t nSizeForm) override
 
virtual HRESULT OnFrame (const cAVHeaderFrame &head, const void *pData, size_t nSizeData) override
 
virtual HRESULT BuildCompFrame (TIMESYS_t tWhenLast, const void *&rpCompRet, size_t &rnSizeRet) override
 
- Public Member Functions inherited from GrayLib::cAVSink
virtual ~cAVSink ()
 
virtual HRESULT OnHeaderOpen (const cAVHeader &head)
 
virtual HRESULT OnHeaderClose ()
 
virtual HRESULT OnClose ()
 

Protected Member Functions

void UpdateBlockParams ()
 
- Protected Member Functions inherited from GrayLib::cVideoFS
 cVideoFS (int nBlockX=k_BLOCK_DEF, int nBlockY=k_BLOCK_DEF)
 
 ~cVideoFS ()
 
void UpdateBlockParams ()
 
BYTE * BuildCompFrameHeader (BYTE *pComp) const
 
bool isReady () const noexcept
 
int get_BlocksTotal () const noexcept
 
void GetBlockRect (int col, int row, cRectI &rect) const noexcept
 
 UNITTEST_FRIEND (cVideoFS)
 

Protected Attributes

cArrayStruct< CBlockm_aBlocks
 the blocks making up the current frame. More...
 
cHeapBlock m_CompFrame
 holder for the last compressed frame. key or diff. persisted for BuildCompFrame( rpCompRet ) More...
 

Additional Inherited Members

- Public Attributes inherited from GrayLib::cVideoFS
cWinSize m_BlockSize
 Preconfigured size of the dirty block in pixels. (arbitrary 16..256, multiple of 16) More...
 
cWinSize m_FrameSize
 total size in pixels in Frame. More...
 
cWinSize m_Blocks
 Count of blocks = m_FrameSize / m_BlockSize. More...
 
UINT m_nFrameNum
 frame number in video stream so far. More...
 
cArrayVal< cColor888m_BlockTmp
 space to hold a block for (de)compression. m_BlockSize More...
 
- Static Public Attributes inherited from GrayLib::cVideoFS
static const int k_BLOCK_DEF = 32
 
static const FOURCC k_Form = ((DWORD)(BYTE)( 'F' ) | ((DWORD)(BYTE)( 'S' ) << 8) | ((DWORD)(BYTE)( 'V' ) << 16) | ((DWORD)(BYTE)( '1' ) << 24 ))
 

Detailed Description

take an incoming compressed stream and rate limit it. I must hold compressed blocks or at least the whole last good frame.

Constructor & Destructor Documentation

◆ cVideoFSRateController()

GrayLib::cVideoFSRateController::cVideoFSRateController ( )
inline

◆ ~cVideoFSRateController()

virtual GrayLib::cVideoFSRateController::~cVideoFSRateController ( )
inlinevirtual

Member Function Documentation

◆ BuildCompFrame()

HRESULT GrayLib::cVideoFSRateController::BuildCompFrame ( TIMESYS_t  tWhenLast,
const void *&  rpCompRet,
size_t &  rnSizeRet 
)
overridevirtual

based on cAVRateController Build a (sort of) key frame from a certain point in time.

  • tWhenLast = 0 = full key frame.
    Returns
    Number of blocks changed.

Implements GrayLib::cAVRateController.

◆ OnFrame()

HRESULT GrayLib::cVideoFSRateController::OnFrame ( const cAVHeaderFrame head,
const void *  pData,
size_t  nSizeData 
)
overridevirtual

cAVSink in cAVRateController Add a new frame to the cache.

Reimplemented from GrayLib::cAVSink.

◆ OnHeaderStream()

HRESULT GrayLib::cVideoFSRateController::OnHeaderStream ( const cAVHeaderStream head,
const void *  pForm,
size_t  nSizeForm 
)
overridevirtual

cAVSink in cAVRateController

Reimplemented from GrayLib::cAVSink.

◆ UpdateBlockParams()

void GrayLib::cVideoFSRateController::UpdateBlockParams ( )
protected

Member Data Documentation

◆ m_aBlocks

cArrayStruct<CBlock> GrayLib::cVideoFSRateController::m_aBlocks
protected

the blocks making up the current frame.

◆ m_CompFrame

cHeapBlock GrayLib::cVideoFSRateController::m_CompFrame
protected

holder for the last compressed frame. key or diff. persisted for BuildCompFrame( rpCompRet )


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