CFugue
Public Member Functions | List of all members
CAviFile Class Reference

Public Member Functions

 CAviFile (LPCTSTR lpszFileName=_T("Output.avi"), DWORD dwCodec=mmioFOURCC('M','P','G','4'), DWORD dwFrameRate=1)
 
 ~CAviFile (void)
 
HRESULT AppendNewFrame (HBITMAP hBitmap)
 
HRESULT AppendNewFrame (int nWidth, int nHeight, LPVOID pBits, int nBitsPerPixel)
 
LPCTSTR GetLastErrorMessage () const
 

Detailed Description

Definition at line 9 of file AviFile.h.

Constructor & Destructor Documentation

CAviFile::CAviFile ( LPCTSTR  lpszFileName = _T("Output.avi"),
DWORD  dwCodec = mmioFOURCC('M','P','G','4'),
DWORD  dwFrameRate = 1 
)

Constructor accepts the filename, video code and frame rate settings as parameters. lpszFileName: Name of the output movie file to create dwCodec: FourCC of the Video Codec to be used for compression dwFrameRate: The Frames Per Second (FPS) setting to be used for the movie

The default Codec used here is MPG4. To use a different codec, pass its Fourcc value as the input parameter for dwCodec. For example, pass mmioFOURCC('D','I','V','X') to use DIVX codec, or pass mmioFOURCC('I','V','5','0') to use IV50 codec etc...

Also, you can pass just 0 to avoid the codecs altogether. In that case, Frames would be saved as they are without any compression; However, the output movie file size would be very huge in that case.

Finally, make sure you have the codec installed on the machine before passing its Fourcc here.

Definition at line 10 of file AviFile.cpp.

CAviFile::~CAviFile ( void  )

Destructor closes the movie file and flushes all the frames

Definition at line 43 of file AviFile.cpp.

Member Function Documentation

HRESULT CAviFile::AppendNewFrame ( HBITMAP  hBitmap)

Inserts the given HBitmap into the movie as a new Frame at the end.

Definition at line 234 of file AviFile.cpp.

HRESULT CAviFile::AppendNewFrame ( int  nWidth,
int  nHeight,
LPVOID  pBits,
int  nBitsPerPixel 
)

Inserts the given bitmap bits into the movie as a new Frame at the end. The width, height and nBitsPerPixel are the width, height and bits per pixel of the bitmap pointed to by the input pBits.

Definition at line 239 of file AviFile.cpp.

LPCTSTR CAviFile::GetLastErrorMessage ( ) const

Returns the last error message, if any.

Definition at line 92 of file AviFile.h.


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

CFugue, the C++ Music Programming Library © Copyright 2009 Cenacle Research India Private Limited Gopalakrishna Palem