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

#include <cAVIFileWriter.h>

Inheritance diagram for GrayLib::cAVIFileWriter:
GrayLib::cAVSink GrayLib::cRIFFWriter

Public Member Functions

 cAVIFileWriter (cStreamOutput *pOut, bool bWriteOptional=false)
 
virtual ~cAVIFileWriter ()
 
HRESULT OnHeaderAudio (const cAVHeaderStream &head, const cWaveFormatEx *pForm, size_t nSizeForm)
 
HRESULT OnHeaderVideo (const cAVHeaderStream &head, const cSurfaceBitmapInfo *pForm, size_t nSizeForm)
 
virtual HRESULT OnHeaderOpen (const cAVHeader &head) override
 
virtual HRESULT OnHeaderStream (const cAVHeaderStream &head, const void *pForm, size_t nSizeForm) override
 
virtual HRESULT OnHeaderClose () override
 
virtual HRESULT OnFrame (const cAVHeaderFrame &head, const void *pData, size_t nSizeData) override
 
virtual HRESULT OnClose () override
 
- Public Member Functions inherited from GrayLib::cAVSink
virtual ~cAVSink ()
 
- Public Member Functions inherited from GrayLib::cRIFFWriter
 cRIFFWriter (cStreamOutput *pOut)
 
HRESULT Ascend (cRIFFHeadX *pChunk)
 
HRESULT CreateChunk (cRIFFHeadX *pChunk, RIFFIO_TYPE dwFlags=RIFFIO_NULL)
 

Public Attributes

bool m_bWriteOptional
 write the optional parts. 'JUNK'+'strn' More...
 
bool m_bVideoCompressed
 
STREAM_POS_t m_nVideoHeader
 Offset to the video header. for patch on close. More...
 
UINT32 m_nVideoFrames
 Patch this on file close. More...
 
STREAM_POS_t m_nAudioHeader
 Offset to the audio header. for patch on close. More...
 
UINT32 m_nAudioFrames
 Patch this on file close. More...
 
cRIFFHeadX m_headRIFF
 
cRIFFHeadX m_headLIST
 'movi' or 'hdrl' More...
 
MainAVIHeader m_avimh
 Build this up to patch at the end. More...
 
RIFF_SIZE_t m_nMoviChunkSize
 Total m_nDataSize of the FOURCC_movi chunk in the file as we build it. More...
 
cAVIFileIndex m_Index
 index all the frames we get. Video + Audio. write this last. More...
 
- Public Attributes inherited from GrayLib::cRIFFWriter
cStreamOutputm_pOut
 File or memory stream output. More...
 

Static Public Attributes

static const int k_SuggestedBufferSec = 4
 for suggested buffer sizing. More...
 

Detailed Description

build an AVI format file. similar to _WIN32 VFW IAVIFile uses RIFF file format.

Note
Use RIFFpad at www.menasoft.com to inspect this file format.

Constructor & Destructor Documentation

◆ cAVIFileWriter()

GrayLib::cAVIFileWriter::cAVIFileWriter ( cStreamOutput pOut,
bool  bWriteOptional = false 
)

◆ ~cAVIFileWriter()

GrayLib::cAVIFileWriter::~cAVIFileWriter ( )
virtual

Member Function Documentation

◆ OnClose()

HRESULT GrayLib::cAVIFileWriter::OnClose ( )
overridevirtual

cAVSink update main RIFF chunk size

Reimplemented from GrayLib::cAVSink.

◆ OnFrame()

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

CAVPkt_Frame Start of a new data frame. Video or Audio data.

Reimplemented from GrayLib::cAVSink.

◆ OnHeaderAudio()

HRESULT GrayLib::cAVIFileWriter::OnHeaderAudio ( const cAVHeaderStream head,
const cWaveFormatEx pForm,
size_t  nSizeForm 
)

◆ OnHeaderClose()

HRESULT GrayLib::cAVIFileWriter::OnHeaderClose ( )
overridevirtual

cAVSink Close the FOURCC_hdrl m_bWriteOptional -> Write out the JUNK block for padding to AVI_HEADERSIZE

Reimplemented from GrayLib::cAVSink.

◆ OnHeaderOpen()

HRESULT GrayLib::cAVIFileWriter::OnHeaderOpen ( const cAVHeader head)
overridevirtual

cAVSink CAVPkt_HeaderOpen Just overwrite the file if there was already data here? AVIF_HASINDEX

Reimplemented from GrayLib::cAVSink.

◆ OnHeaderStream()

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

cAVSink CAVPkt_HeaderStream

Reimplemented from GrayLib::cAVSink.

◆ OnHeaderVideo()

HRESULT GrayLib::cAVIFileWriter::OnHeaderVideo ( const cAVHeaderStream head,
const cSurfaceBitmapInfo pForm,
size_t  nSizeForm 
)

Member Data Documentation

◆ k_SuggestedBufferSec

const int GrayLib::cAVIFileWriter::k_SuggestedBufferSec = 4
static

for suggested buffer sizing.

◆ m_avimh

MainAVIHeader GrayLib::cAVIFileWriter::m_avimh

Build this up to patch at the end.

◆ m_bVideoCompressed

bool GrayLib::cAVIFileWriter::m_bVideoCompressed

◆ m_bWriteOptional

bool GrayLib::cAVIFileWriter::m_bWriteOptional

write the optional parts. 'JUNK'+'strn'

◆ m_headLIST

cRIFFHeadX GrayLib::cAVIFileWriter::m_headLIST

'movi' or 'hdrl'

◆ m_headRIFF

cRIFFHeadX GrayLib::cAVIFileWriter::m_headRIFF

◆ m_Index

cAVIFileIndex GrayLib::cAVIFileWriter::m_Index

index all the frames we get. Video + Audio. write this last.

◆ m_nAudioFrames

UINT32 GrayLib::cAVIFileWriter::m_nAudioFrames

Patch this on file close.

◆ m_nAudioHeader

STREAM_POS_t GrayLib::cAVIFileWriter::m_nAudioHeader

Offset to the audio header. for patch on close.

◆ m_nMoviChunkSize

RIFF_SIZE_t GrayLib::cAVIFileWriter::m_nMoviChunkSize

Total m_nDataSize of the FOURCC_movi chunk in the file as we build it.

◆ m_nVideoFrames

UINT32 GrayLib::cAVIFileWriter::m_nVideoFrames

Patch this on file close.

◆ m_nVideoHeader

STREAM_POS_t GrayLib::cAVIFileWriter::m_nVideoHeader

Offset to the video header. for patch on close.


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