• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AVIFileExit函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: fprintf

void MovieMaker::EndCapture()
{
    fprintf( stderr, "\n" );
	if (ps)
        {
		AVIStreamClose(ps);
        ps = NULL;
        }

	if (psCompressed)
        {
		AVIStreamClose(psCompressed);
        psCompressed = NULL;
        }

	if (psText)
        {
		AVIStreamClose(psText);
        psText = NULL;
        }

	if (pfile)
        {
		AVIFileClose(pfile);
        pfile = NULL;
        }

	WORD wVer = HIWORD(VideoForWindowsVersion());
	if (wVer >= 0x010A)
	    {
		AVIFileExit();
	    }

}
开发者ID:xinyaojiejie,项目名称:Dale,代码行数:34,代码来源:moviemaker.cpp


示例3: AVIStreamClose

void AviRecorder::Stop()
{
	m_fAudioReady = false;

	if (m_pstmVideo != NULL) {
		AVIStreamClose(m_pstmVideo);
		m_pstmVideo = NULL;
	}

	if (m_pstmAudio != NULL) {
		AVIStreamClose(m_pstmAudio);
		m_pstmAudio = NULL;
	}

	if (m_pavif != NULL) {
		AVIFileClose(m_pavif);
		m_pavif = NULL;
	}

	AVIFileExit();

	m_nSample = 0;
	delete m_pbmFlip;
	m_pbmFlip = NULL;
	delete m_ptbmPointer;
	m_ptbmPointer = NULL;
}
开发者ID:Ahmar,项目名称:hostile-takeover,代码行数:27,代码来源:aviwrite.cpp


示例4: 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


示例5: LogMessage

CAVIFileReader::~CAVIFileReader()
{
    LogMessage("CAVIFileReader::~CAVIFileReader started");

    if (NULL != m_pAudioStream)
    {
        AVIStreamRelease(m_pAudioStream);
        m_pAudioStream = NULL;
    }

    if (NULL != m_pWaveFormat)
    {
        FreeMemory(m_pWaveFormat);
        m_pWaveFormat = NULL;
    }


    //
    // AVIFileExit must be called on the same thread as AVIFileInit.
    // therefore this object must be created and deleted on the same thread
    //

    AVIFileExit();

    LogMessage("CAVIFileReader::~CAVIFileReader completed");
}
开发者ID:Ippei-Murofushi,项目名称:WindowsSDK7-Samples,代码行数:26,代码来源:avifilereader.cpp


示例6: CreateAvi

HAVI CreateAvi (const TCHAR *filename, int frameperiod, const WAVEFORMATEX *wfx)
{
	PAVIFILE pfile;
	HRESULT hr;
	TAviUtil *au;

	AVIFileInit();
	hr = AVIFileOpen(&pfile, filename, OF_WRITE | OF_CREATE, NULL);
	if (hr)
	{
		AVIFileExit();
		return NULL;
	}
	au = (TAviUtil *)malloc(sizeof(TAviUtil));
	au->pfile = pfile;
	if (wfx)
		CopyMemory(&au->wfx, wfx, sizeof(WAVEFORMATEX));
	else	ZeroMemory(&au->wfx, sizeof(WAVEFORMATEX));
	au->period = frameperiod;
	au->audStream = NULL;
	au->vidStream = NULL;
	au->vidStreamComp = NULL;
	au->nframe = 0;
	au->nsamp = 0;
	au->iserr = FALSE;
	return (HAVI)au;
}
开发者ID:MounikaArkala,项目名称:txstateprojects,代码行数:27,代码来源:AVI.cpp


示例7: AVIFileInit

int imFileFormatAVI::New(const char* file_name)
{
  /* initializes avi file library, can be called many times */
  AVIFileInit();

  /* creates a new file */
  HRESULT hr = AVIFileOpen(&file, file_name, OF_WRITE | OF_CREATE, NULL);
  if (hr != 0)
  {
    AVIFileExit();

    if (hr == AVIERR_FILEOPEN)
      return IM_ERR_OPEN;
    else if (hr == AVIERR_BADFORMAT || hr == REGDB_E_CLASSNOTREG)
      return IM_ERR_FORMAT;
    else
      return IM_ERR_ACCESS;
  }

  this->frame = 0;
  this->stream = 0;
  this->use_compressor = 0;
  this->dib = 0;

  return IM_ERR_NONE;
}
开发者ID:gcfavorites,项目名称:tastools,代码行数:26,代码来源:im_format_avi.cpp


示例8: GetKey

void plAVIWriterImp::Close()
{
    plgDispatch::Dispatch()->UnRegisterForExactType(plRenderMsg::Index(), GetKey());

#if HS_BUILD_FOR_WIN32
    hsTimer::SetRealTime(fOldRealTime);

    if (fStreamHandle)
    {
        AVIStreamClose(fStreamHandle);
        fStreamHandle = nil;
    }

    if (fCompressedHandle)
    {
        AVIStreamClose(fCompressedHandle);
        fCompressedHandle = nil;
    }

    if (fFileHandle)
    {
        AVIFileClose(fFileHandle);
        fFileHandle = nil;
    }

    AVIFileExit();
#endif
}
开发者ID:cwalther,项目名称:Plasma-nobink-test,代码行数:28,代码来源:plAVIWriter.cpp


示例9: 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


示例10: CloseAVI

/*
---------------------------------------------------------------------------------------
- destructor
---------------------------------------------------------------------------------------
*/
AviVideoRenderer::~AviVideoRenderer()
{
	CloseAVI();
	--_init_counter;

	if(_init_counter == 0)
		AVIFileExit();		// Release The File
}
开发者ID:leloulight,项目名称:lbanet,代码行数:13,代码来源:AviVideoRenderer.cpp


示例11: glDeleteTextures

void CAvi::cleanUp(void)												// Properly Closes The Avi File
{
	glDeleteTextures( 1, &m_textureId );
	DeleteObject(m_hBitmap);										// Delete The Device Dependant Bitmap Object
	DrawDibClose(m_hdd);											// Closes The DrawDib Device Context
	AVIStreamGetFrameClose(m_pgf);								// Deallocates The GetFrame Resources
	AVIStreamRelease(m_pavi);										// Release The Stream
	AVIFileExit();												// Release The File
}
开发者ID:DCubix,项目名称:1.4.0,代码行数:9,代码来源:AVI.cpp


示例12: AVIClose

void AVIClose(struct AVIFile** avi_out)
{
	if(*avi_out)
	{
		clean_up(*avi_out);
		delete *avi_out;
	}
	*avi_out = NULL;
	AVIFileExit();
}
开发者ID:Kriole,项目名称:snes9x-rr,代码行数:10,代码来源:AVIOutput.cpp


示例13: 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


示例14: 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


示例15: 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


示例16: 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


示例17: captureVideo

void captureVideo(HDC hDC){
	if(saves.size()>0){
		SendMessage(hWnd,WM_COMMAND,MAKEWPARAM(IDC_LISTBOX,LBN_SELCHANGE),0);

		currentFrame = 0;
		GLvoid *imageData = 0;
		while(WWDPhysics->totaltime<10000){
			while(!WWDPhysics->clientMoveAndDisplay(true, hDC)){}

			HDC hdcscreen=GetDC(0), hdc=CreateCompatibleDC(hdcscreen); ReleaseDC(0,hdcscreen);
			HBITMAP hData;

			hData = CreateDIBSection(hdc,(BITMAPINFO*) bi,DIB_RGB_COLORS,&imageData,NULL,NULL);
			GdiFlush(); //flush graphics operations batch to ensure memory contains the right pixels

			if(imageData!=0){
				glReadPixels(0, 0, abs(simWidth), abs(simHeight), GL_BGRA, GL_UNSIGNED_BYTE, imageData); //Copy the image to the array imageData

				DIBSECTION dibs; int sbm = GetObject(hData,sizeof(dibs),&dibs);

				if (sbm!=sizeof(DIBSECTION)){
#ifdef _DEBUG
					printf("dibsection fault\n");
#endif
				}else{
					DWORD keyframe = NULL;
					if(currentFrame==0){keyframe=AVIIF_KEYFRAME;}
					AVIStreamWrite(*pcompressedstream,currentFrame,1,dibs.dsBm.bmBits,dibs.dsBmih.biSizeImage,keyframe,NULL,NULL);
					currentFrame++;
				}
				DeleteObject(hData);
			}
			else{
#ifdef _DEBUG
				printf("frame skipped nr %d\n",currentFrame);
#endif
			}
		}
	}

	//vfw cleanup
	if(VFWReturnVal==0){
		AVIStreamRelease(*pcompressedstream);
		delete(pcompressedstream);
		AVIStreamRelease(*pstream);
		delete pstream;
		AVISaveOptionsFree(1,aopts);
		AVIFileRelease(*pfile);  // closes the file
	}
	AVIFileExit();          // releases AVIFile library
	//\vfw cleanup
}
开发者ID:kiniry-supervision,项目名称:walking-with-dinosaurs,代码行数:52,代码来源:GUI.cpp


示例18: DeleteObject

void AVIOBJ::CloseAVI(void)												// Properly Closes The Avi File
{

    DeleteObject(hBitmap);										// Delete The Device Dependant Bitmap Object
    if (hdd) DrawDibClose(hdd);											// Closes The DrawDib Device Context
    if (pgf)
    {
        AVIStreamGetFrameClose(pgf);								// Deallocates The GetFrame Resources
        AVIStreamRelease(pavi);										// Release The Stream
        AVIFileExit();												// Release The File
    }

}
开发者ID:dadymax,项目名称:BrainBayRaiseUp,代码行数:13,代码来源:ob_avi.cpp


示例19: avisynth_read_close

static int avisynth_read_close(AVFormatContext *s)
{
    AviSynthContext *avs = s->priv_data;
    int i;

    for (i = 0; i < avs->nb_streams; i++)
        AVIStreamRelease(avs->streams[i].handle);

    av_free(avs->streams);
    AVIFileRelease(avs->file);
    AVIFileExit();
    return 0;
}
开发者ID:DDTChen,项目名称:CookieVLC,代码行数:13,代码来源:avisynth.c


示例20: CreateAvi

HAVI CreateAvi(const char *fn, int frameperiod, const WAVEFORMATEX *wfx)
{ IAVIFile *pfile;
  AVIFileInit();
  HRESULT hr = AVIFileOpen(&pfile, fn, OF_WRITE|OF_CREATE, NULL);
  if (hr!=AVIERR_OK) {AVIFileExit(); return NULL;}
  TAviUtil *au = new TAviUtil;
  au->pfile = pfile;
  if (wfx==NULL) ZeroMemory(&au->wfx,sizeof(WAVEFORMATEX)); else CopyMemory(&au->wfx,wfx,sizeof(WAVEFORMATEX));
  au->period = frameperiod;
  au->as=0; au->ps=0; au->psCompressed=0;
  au->nframe=0; au->nsamp=0;
  au->iserr=false;
  return (HAVI)au;
}
开发者ID:QuinntyneBrown,项目名称:blog,代码行数:14,代码来源:avi_utils.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AVIFileOpen函数代码示例发布时间:2022-05-30
下一篇:
C++ AVG_ASSERT函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap