Knowledge Base Nr: 00168 aviwrite.cpp - http://www.swe-kaiser.de

Downloads: C++-Klassen

Win32: AVI-Datei erstellen mit Video for Windows

  
int CVideoSupport::RecordAVIStart(const char* lpszFilename)
{
...
BOOL bSucc = capFileSetCaptureFile(s_hWndC, lpszFilename);
if (!bSucc)
{
m_strLastError.Format("RecordAVIStart: capFileSetCaptureFile(%s) failed!", lpszFilename);
return -2;
}

bSucc = capCaptureSingleFrameOpen(s_hWndC);
if (!bSucc)
{
m_strLastError.Format("RecordAVIStart: capCaptureSingleFrameOpen() failed!");
return -3;
}
...
}

int CVideoSupport::RecordAVIAddFrame()
{
...
BOOL bSucc = capCaptureSingleFrame(s_hWndC);
if (!bSucc)
{
m_strLastError.Format("RecordAVIAddFrame: capCaptureSingleFrame() failed!");
return -2;
}
...
}

int CVideoSupport::RecordAVIEnd()
{
...
BOOL bSucc = capCaptureSingleFrameClose(s_hWndC);
if (!bSucc)
{
m_strLastError.Format("RecordAVIEnd: capCaptureSingleFrameClose() failed!");
return -2;
}
...
}