AVI.h
资源名称:视频会议系统.rar [点击查看]
上传用户:popouu88
上传日期:2013-02-11
资源大小:2894k
文件大小:1k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- // AVI.h: interface for the CAVI class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_AVI_H__8DB5F9E4_67F1_4625_A52B_22AC7C0A7AA1__INCLUDED_)
- #define AFX_AVI_H__8DB5F9E4_67F1_4625_A52B_22AC7C0A7AA1__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "vfw.h"
- #include "VideoCodec/VideoCodec.h"
- class CAVI
- {
- public:
- enum { AVI_WRITE = 1 , AVI_READ };
- CAVI( );
- virtual ~CAVI( );
- //打开avi文件
- BOOL OpenAVI( LPCSTR filename , DWORD openmode );
- //关闭avi文件
- BOOL CloseAVI( void );
- //设定avi信息(录像时用到的)
- BOOL SetAVIInfo( BITMAPINFOHEADER header , DWORD rate );
- //得到avi信息(回放时用的)
- BOOL GetAVIInfo( BITMAPINFOHEADER * header , DWORD *rate );
- //添加一帧图像
- BOOL AddFrame( void * data , UINT size = 0 );
- //得到一帧图像
- BOOL GetFrame( void ** data , UINT *size , int index = -1 );
- private:
- AVISTREAMINFO m_avi_stream_info;
- PAVIFILE m_avi_file;
- PAVISTREAM m_avi_stream;
- BITMAPINFOHEADER m_avi_bmp_info;
- DWORD read_frame;
- DWORD write_frame;
- char * avi_buffer;
- BOOL m_bMode;
- CVideoCodec codec;
- DWORD time_interval;
- DWORD time_now;
- };
- #endif // !defined(AFX_AVI_H__8DB5F9E4_67F1_4625_A52B_22AC7C0A7AA1__INCLUDED_)