資源簡介
這個屏幕錄像源碼不錯,最快可以到10幀每秒,可以錄制全屏,CPU占用不高,整體性能不錯

代碼片段和文件信息
//?CoalitionDlg.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“Kinescope.h“
#include?“CoalitionDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CCoalitionDlg?dialog
CCoalitionDlg::CCoalitionDlg(CWnd*?pParent?/*=NULL*/)
:?CDialog(CCoalitionDlg::IDD?pParent)
{
//{{AFX_DATA_INIT(CCoalitionDlg)
//?NOTE:?the?ClassWizard?will?add?member?initialization?here
//}}AFX_DATA_INIT
}
void?CCoalitionDlg::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCoalitionDlg)
DDX_Control(pDX?IDC_LIST1?m_List);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CCoalitionDlg?CDialog)
//{{AFX_MSG_MAP(CCoalitionDlg)
ON_BN_CLICKED(IDC_BUTADD?OnButadd)
ON_BN_CLICKED(IDC_BUTCOALITION?OnButcoalition)
ON_BN_CLICKED(IDC_BUTDEL?OnButdel)
ON_BN_CLICKED(IDC_BUTCLEAR?OnButclear)
ON_BN_CLICKED(IDC_BUTUP?OnButup)
ON_BN_CLICKED(IDC_BUTDOWN?OnButdown)
ON_BN_CLICKED(IDC_BUTEXIT?OnButexit)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CCoalitionDlg?message?handlers
void?CCoalitionDlg::OnButadd()?
{
//?TODO:?Add?your?control?notification?handler?code?here
if(m_List.GetCount()==10)
{
MessageBox(“一次只能合成10個文件“);
return;
}
CFileDialog?dlg(TRUENULLNULLOFN_HIDEREADONLY|OFN_OVERWRITEPROMPT
“(*.avi)|*.avi|?|“AfxGetMainWnd());
CString?strPath;
if(dlg.DoModal()?==?IDOK)
{
strPath?=?dlg.GetPathName();
if(strPath.Right(4)?!=?“.avi“)
strPath?+=?“.avi“;
}
m_List.InsertString(m_List.GetCount()strPath);
}
void?CCoalitionDlg::OnButcoalition()?
{
//?TODO:?Add?your?control?notification?handler?code?here
CFileDialog?dlg(FALSENULLNULLOFN_HIDEREADONLY|OFN_OVERWRITEPROMPT
“(*.avi)|*.avi|?|“AfxGetMainWnd());
CString?strPathstrText=““;
if(dlg.DoModal()?==?IDOK)
{
strPath?=?dlg.GetPathName();
if(strPath.Right(4)?!=?“.avi“)
strPath?+=?“.avi“;
}
PAVISTREAM?ps;?
PAVISTREAM?pstream[20];?
PAVISTREAM?pComStream;
AVISTREAMINFO?strhdr;
PAVIFILE?pfile[20];
HRESULT?hr;?
int?m_Start=0m_Stop=0;
PAVIFILE?pfileto;
AVICOMPRESSOPTIONS?pCompressOption;???
AVICOMPRESSOPTIONS?FAR?*?opts[1]?=?{&pCompressOption};??
int?nframes?=?0;
AVIFileInit(); //初始化AVIFile函數庫
CString?m_Name;
m_List.GetText(0m_Name);
AVIFileOpen(&pfile[0]m_NameOF_READ?NULL); //打開源文件
AVIFILEINFO?pfinfo;
AVIFileInfo(pfile[0]&pfinfosizeof(AVIFILEINFO));?
AVIFileGetStream(pfile[0]?&pstream[0]?streamtypeVIDEO?0?); //獲取視頻流
//獲取流信息
AVISTREAMINFO?streaminfo;
AVIStreamInfo(pstream[0]&streaminfosizeof(AVISTREAMINFO));
PGETframe?pframe; //定義幀接口對象
pframe=AVIStreamGetframeOpen(pstream[0]NULL); //在流中打開幀
m_Start?=?AVIStreamStart(pstream[0]); //獲取流的起始幀
m_Stop?=?AVIStreamLength(pstream[0]); //獲
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????7198??2008-09-19?10:04??Kinescope\CoalitionDlg.cpp
?????文件???????1391??2008-09-08?16:11??Kinescope\CoalitionDlg.h
?????文件??????11397??2012-02-06?10:37??Kinescope\CutDlg.cpp
?????文件???????1693??2008-09-08?15:01??Kinescope\CutDlg.h
?????文件???????3637??2008-09-04?13:40??Kinescope\fr
?????文件???????1335??2008-09-04?13:40??Kinescope\fr
?????文件????2541168??2012-02-03?09:18??Kinescope\Kinescope.aps
?????文件???????3860??2012-02-06?09:13??Kinescope\Kinescope.clw
?????文件???????2105??2008-06-25?09:07??Kinescope\Kinescope.cpp
?????文件???????5264??2008-09-08?17:58??Kinescope\Kinescope.dsp
?????文件????????541??2008-06-25?09:07??Kinescope\Kinescope.dsw
?????文件???????1357??2008-06-25?09:07??Kinescope\Kinescope.h
?????文件?????107520??2012-02-06?10:37??Kinescope\Kinescope.ncb
?????文件?????658944??2012-02-06?10:37??Kinescope\Kinescope.opt
?????文件???????1802??2012-02-06?10:21??Kinescope\Kinescope.plg
?????文件???????9929??2012-02-02?17:57??Kinescope\Kinescope.rc
?????文件??????29655??2012-02-06?09:38??Kinescope\KinescopeDlg.cpp
?????文件???????3174??2008-09-08?16:50??Kinescope\KinescopeDlg.h
?????文件???????1103??2008-06-28?14:38??Kinescope\NameDlg.cpp
?????文件???????1189??2008-06-28?14:38??Kinescope\NameDlg.h
?????文件???????3633??2008-06-25?09:07??Kinescope\ReadMe.txt
?????文件?????279382??2008-07-12?10:27??Kinescope\res\Kinescope.ico
?????文件????????401??2008-06-25?09:07??Kinescope\res\Kinescope.rc2
????..A..H.?????24064??2008-09-22?15:17??Kinescope\res\Thumbs.db
?????文件?????279382??2008-07-12?08:28??Kinescope\res\停止.ico
?????文件?????279382??2008-07-12?09:34??Kinescope\res\剪切.ico
?????文件?????279382??2008-07-12?08:30??Kinescope\res\合成.ico
?????文件?????279382??2008-07-12?08:27??Kinescope\res\開始.ico
?????文件?????279382??2008-07-11?19:35??Kinescope\res\抓圖.ico
?????文件?????279382??2008-07-12?11:00??Kinescope\res\時間.ico
............此處省略11個文件信息
評論
共有 條評論