当前位置: 首页>>代码示例>>C++>>正文


C++ AVIFileRelease函数代码示例

本文整理汇总了C++中AVIFileRelease函数的典型用法代码示例。如果您正苦于以下问题:C++ AVIFileRelease函数的具体用法?C++ AVIFileRelease怎么用?C++ AVIFileRelease使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了AVIFileRelease函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DeleteDC

void CAviFile::ReleaseMemory()
{
	m_nAppendFuncSelector=0;		//Point to DummyFunction

	if(m_hAviDC)
	{
		DeleteDC(m_hAviDC);
		m_hAviDC=NULL;
	}
	if(m_pAviCompressedStream)
	{
		AVIStreamRelease(m_pAviCompressedStream);
		m_pAviCompressedStream=NULL;
	}
	if(m_pAviStream)
	{
		AVIStreamRelease(m_pAviStream);
		m_pAviStream=NULL;
	}
	if(m_pAviFile)
	{
		AVIFileRelease(m_pAviFile);
		m_pAviFile=NULL;
	}
	if(m_lpBits)
	{
		HeapFree(m_hHeap,HEAP_NO_SERIALIZE,m_lpBits);
		m_lpBits=NULL;
	}
	if(m_hHeap)
	{
		HeapDestroy(m_hHeap);
		m_hHeap=NULL;
	}
}
开发者ID:stainlessio,项目名称:Linkage,代码行数:35,代码来源:AviFile.cpp

示例2: free_anim_avi

static void free_anim_avi(struct anim *anim)
{
#if defined(_WIN32) && !defined(FREE_WINDOWS)
	int i;
#endif

	if (anim == NULL) return;
	if (anim->avi == NULL) return;

	AVI_close(anim->avi);
	MEM_freeN(anim->avi);
	anim->avi = NULL;

#if defined(_WIN32) && !defined(FREE_WINDOWS)

	if (anim->pgf) {
		AVIStreamGetFrameClose(anim->pgf);
		anim->pgf = NULL;
	}

	for (i = 0; i < anim->avistreams; i++) {
		AVIStreamRelease(anim->pavi[i]);
	}
	anim->avistreams = 0;

	if (anim->pfileopen) {
		AVIFileRelease(anim->pfile);
		anim->pfileopen = 0;
		AVIFileExit();
	}
#endif

	anim->duration = 0;
}
开发者ID:244xiao,项目名称:blender,代码行数:34,代码来源:anim_movie.c

示例3: AVIStreamRelease

bool NxVideo_Avi_Recorder::CloseVideoFile()
{

	if (mVideo->m_pStream)
	{
		AVIStreamRelease(mVideo->m_pStream);
		mVideo->m_pStream=NULL;
	}

	if (mVideo->m_pStreamCompressed)
	{
		AVIStreamRelease(mVideo->m_pStreamCompressed);
		mVideo->m_pStreamCompressed=NULL;
	}

	if (mVideo->m_pAVIFile)
	{
		AVIFileRelease(mVideo->m_pAVIFile);
		mVideo->m_pAVIFile=NULL;
	}

	// Close engine
	AVIFileExit();
	return true;
}
开发者ID:nxgraphics,项目名称:NxGraphics,代码行数:25,代码来源:NxVideo_Avi_Recorder.cpp

示例4: capCaptureAbort

void CMainFrame::OnClose()
{
	// TODO: 在此添加消息处理程序代码和/或调用默认值
	capCaptureAbort(m_hWndCap);
	capDriverDisconnect(m_hWndCap);
	Sleep(100);
	capSetCallbackOnError(m_hWndCap,NULL);
	capSetCallbackOnStatus(m_hWndCap,NULL);
	capSetCallbackOnVideoStream(m_hWndCap,NULL);
	delete lpbiIn;
	delete lpbiTmp;
	delete lpbiOut;
	if (m_vfwState==ENCDEC){
		ICDecompressEnd(hic2);
		ICClose(hic2);
		ICSeqCompressFrameEnd(&pc);
		ICCompressEnd(hic1);
		ICClose(hic1);
		AVIStreamClose(ps);
		if(m_pFile != NULL)
			AVIFileRelease(m_pFile);
	}

	enc_stop();
	dec_stop();

	Sleep(100);
	CFrameWnd::OnClose();
}
开发者ID:hiccupzhu,项目名称:misc_starting,代码行数:29,代码来源:MainFrm.cpp

示例5: test_ash1_corruption

static void test_ash1_corruption(void)
{
    COMMON_AVI_HEADERS cah;
    char filename[MAX_PATH];
    PAVIFILE pFile;
    int res;
    PAVISTREAM pStream1;
    AVISTREAMINFOA asi1;

    GetTempPathA(MAX_PATH, filename);
    strcpy(filename+strlen(filename), testfilename);

    /* Corrupt the sample size in the audio stream header */
    init_test_struct(&cah);
    cah.ash1.dwSampleSize = 0xdeadbeef;

    create_avi_file(&cah, filename);

    res = AVIFileOpenA(&pFile, filename, OF_SHARE_DENY_WRITE, 0L);
    ok(res == 0, "Unable to open file: error=%u\n", res);

    res = AVIFileGetStream(pFile, &pStream1, 0, 1);
    ok(res == 0, "Unable to open audio stream: error=%u\n", res);

    res = AVIStreamInfoA(pStream1, &asi1, sizeof(asi1));
    ok(res == 0, "Unable to read stream info: error=%u\n", res);

    /* The result will still be 2, because the value is dynamically replaced with the nBlockAlign
       value from the stream format header. The next test will prove this */
    ok(asi1.dwSampleSize == 2, "got %u (expected 2)\n", asi1.dwSampleSize);

    AVIStreamRelease(pStream1);
    AVIFileRelease(pFile);
    ok(DeleteFileA(filename) !=0, "Deleting file %s failed\n", filename);
}
开发者ID:AlexSteel,项目名称:wine,代码行数:35,代码来源:api.c

示例6: test_ash1_corruption2

static void test_ash1_corruption2(void)
{
    COMMON_AVI_HEADERS cah;
    char filename[MAX_PATH];
    PAVIFILE pFile;
    int res;
    PAVISTREAM pStream1;
    AVISTREAMINFOA asi1;

    GetTempPathA(MAX_PATH, filename);
    strcpy(filename+strlen(filename), testfilename);

    /* Corrupt the block alignment in the audio format header */
    init_test_struct(&cah);
    cah.pcmwf.wf.nBlockAlign = 0xdead;

    create_avi_file(&cah, filename);

    res = AVIFileOpenA(&pFile, filename, OF_SHARE_DENY_WRITE, 0L);
    ok(res == 0, "Unable to open file: error=%u\n", res);

    res = AVIFileGetStream(pFile, &pStream1, 0, 1);
    ok(res == 0, "Unable to open audio stream: error=%u\n", res);

    ok(AVIStreamInfoA(pStream1, &asi1, sizeof(asi1)) == 0, "Unable to read stream info\n");

    /* The result will also be the corrupt value, as explained above. */
    ok(asi1.dwSampleSize == 0xdead, "got 0x%x (expected 0xdead)\n", asi1.dwSampleSize);

    AVIStreamRelease(pStream1);
    AVIFileRelease(pFile);
    ok(DeleteFileA(filename) !=0, "Deleting file %s failed\n", filename);
}
开发者ID:AlexSteel,项目名称:wine,代码行数:33,代码来源:api.c

示例7: AVIFileInit

bool CAviHelper::AVI_resolution(const wstring& strAviFileName, int& width, int& height)
{
	AVIFileInit();
	PAVIFILE avi;
	int res = AVIFileOpen(&avi, WS2S(strAviFileName).c_str(), OF_READ, NULL);
	int n = GetLastError();
	if (res!=AVIERR_OK)
	{
		//an error occures
		if (avi!=NULL)
			AVIFileRelease(avi);
		return false;
	}

	AVIFILEINFO avi_info;
	memset(&avi_info, 0, sizeof(AVIFILEINFO));

	res = AVIFileInfo(avi, &avi_info, sizeof(AVIFILEINFO));
	if( res != AVIERR_OK)
	{
		AVIFileExit();
		return false;
	}
	width = avi_info.dwWidth;
	height = avi_info.dwHeight;

	AVIFileExit();
	return true;
}
开发者ID:killbug2004,项目名称:DvrWorkstation,代码行数:29,代码来源:AviHelper.cpp

示例8: OpenSoundFile

BOOL OpenSoundFile(HWND hWnd,PAVISTREAM *pavi)
	{
#ifndef INTERIM_64_BIT	// CCJ
	OPENFILENAME ofn;
	char filter[256];

	AVIBuildFilter(filter,sizeof(filter),FALSE);

	ofn.lStructSize       = sizeof(OPENFILENAME);
	ofn.hwndOwner         = hWnd;
	ofn.hInstance         = NULL;	
	ofn.lpstrTitle        = GetResString(IDS_RB_OPENSOUND);
	ofn.lpstrFilter       = filter;
	ofn.lpstrCustomFilter = NULL;
	ofn.nMaxCustFilter    = 0;
	ofn.nFilterIndex      = 0;
	ofn.lpstrFile         = fileName;
	ofn.nMaxFile          = sizeof(fileName);
	ofn.lpstrFileTitle    = NULL;
	ofn.nMaxFileTitle     = 0;
	ofn.lpstrInitialDir   = NULL;
	ofn.Flags             = OFN_FILEMUSTEXIST|OFN_PATHMUSTEXIST|OFN_HIDEREADONLY;
	ofn.nFileOffset       = 0;
	ofn.nFileExtension    = 0;
	ofn.lpstrDefExt       = NULL;
	ofn.lCustData         = 0;
	ofn.lpfnHook          = NULL;
	ofn.lpTemplateName    = NULL;

	if (GetOpenFileNamePreview(&ofn)) {
		HRESULT		hr;
    	PAVIFILE	pfile;
		PAVISTREAM	pstream;
		BOOL res = TRUE;

   	 	hr = AVIFileOpen(&pfile,fileName,OF_READ,NULL);
    	if (hr) return FALSE;

		if (AVIFileGetStream(
				pfile,&pstream,streamtypeAUDIO,0) != AVIERR_OK) {			
			res = FALSE;
			goto done;
			}
		
		*pavi = pstream;

	done:
		AVIFileRelease(pfile);
		return res;
	} else {
		return FALSE;
		}
#else	// INTERIM_64_BIT
	return FALSE;
#endif	// INTERIM_64_BIT
	}
开发者ID:2asoft,项目名称:xray,代码行数:56,代码来源:sound.cpp

示例9: AVIFileRelease

void VideoReader::Close()
{
    // Close the stream and file. 
    AVIFileRelease(m_pf); 
    AVIFileExit();

    if (m_lpBuffer != NULL)
    {
        free(m_lpBuffer);
    }
}
开发者ID:bryan610,项目名称:concrtextras,代码行数:11,代码来源:VideoAgent.cpp

示例10: AVIStreamRelease

void CvVideoWriter_VFW::close()
{
    if( uncompressed )
        AVIStreamRelease( uncompressed );
    if( compressed )
        AVIStreamRelease( compressed );
    if( avifile )
        AVIFileRelease( avifile );
    cvReleaseImage( &tempFrame );
    init();
}
开发者ID:12rohanb,项目名称:opencv,代码行数:11,代码来源:cap_vfw.cpp

示例11: CloseAvi

HRESULT CloseAvi(HAVI avi)
{ if (avi==NULL) return AVIERR_BADHANDLE;
  TAviUtil *au = (TAviUtil*)avi;
  if (au->as!=0) AVIStreamRelease(au->as); au->as=0;
  if (au->psCompressed!=0) AVIStreamRelease(au->psCompressed); au->psCompressed=0;
  if (au->ps!=0) AVIStreamRelease(au->ps); au->ps=0;
  if (au->pfile!=0) AVIFileRelease(au->pfile); au->pfile=0;
  AVIFileExit();
  delete au;
  return S_OK;
}
开发者ID:rikvdbrule,项目名称:KinectRecording,代码行数:11,代码来源:avi_utils.cpp

示例12: AVIFileRelease

AVIReadHandlerTunnelW32::~AVIReadHandlerTunnelW32() {
    if (mpAvisynthClipInfo) {
        mpAvisynthClipInfo->Release();
        mpAvisynthClipInfo = nullptr;
    }

    if (mpAVIFile) {
        AVIFileRelease(mpAVIFile);
        mpAVIFile = nullptr;
    }
}
开发者ID:Cybuster,项目名称:vapoursynth,代码行数:11,代码来源:AVIReadHandlerTunnelW32.cpp

示例13: AVIStreamGetFrameClose

void CAviToBmp::Close()
{
	if (m_pGetFrame != NULL)
		AVIStreamGetFrameClose(m_pGetFrame);
	if (m_pStream != NULL)
		AVIStreamRelease(m_pStream);
	if (m_pFile != NULL)
		AVIFileRelease(m_pFile);
	if (m_pBmpInfo != NULL)
		delete m_pBmpInfo;
	Init();
}
开发者ID:fdiskcn,项目名称:Whorld,代码行数:12,代码来源:AviToBmp.cpp

示例14: AVI_stream_close

// AVI_stream_close() should be called when you are finished reading all the frames of an AVI
//
void AVI_stream_close()
{	
//	Assert( AVI_stream.flags & AVI_STREAM_F_USED);

   AVIStreamRelease(AVI_stream.pstream);				// closes the video stream
	AVIFileRelease(AVI_stream.pfile);					// closes the file 
	AVI_stream.flags &= ~AVI_STREAM_F_USED;			// clear the used flag

	AVIFileExit();          // releases AVIFile library 
	AVI_stream_inited = 0;

}
开发者ID:lubomyr,项目名称:freespace2,代码行数:14,代码来源:convert.cpp

示例15: Print

AviFile::~AviFile()
{
    if (!play) {
        Print("*** Closing AVI file '%s' with %d frames\n", (const char*) filename, nframe);
    }

    if (ps_comp)   AVIStreamRelease(ps_comp);
    if (ps)        AVIStreamRelease(ps);
    if (pfile)     AVIFileRelease(pfile);

    AVIFileExit();
}
开发者ID:Banbury,项目名称:starshatter-open,代码行数:12,代码来源:AviFile.cpp


注:本文中的AVIFileRelease函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。