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

C++ ICClose函数代码示例

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

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



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

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


示例2: RefreshCodec

void RefreshCodec(HWND hW)
{
char buffer[255];
union {
	char chFCC[5];
	DWORD dwFCC;
	} fcc;
ICINFO icinfo;
memset(&icinfo,0,sizeof(icinfo));
icinfo.dwSize = sizeof(icinfo);
strcpy(fcc.chFCC,"VIDC");
RECORD_COMPRESSION1.hic = ICOpen(fcc.dwFCC,RECORD_COMPRESSION1.fccHandler,ICMODE_QUERY);
if(RECORD_COMPRESSION1.hic)
	{
	ICGetInfo(RECORD_COMPRESSION1.hic,&icinfo,sizeof(icinfo));
	ICClose(RECORD_COMPRESSION1.hic);
	wsprintf(buffer,"16 bit Compression: %ws",icinfo.szDescription);
	}
else
	wsprintf(buffer,"16 bit Compression: Full Frames (Uncompressed)");
SetDlgItemText(hW,IDC_COMPRESSION1,buffer);

memset(&icinfo,0,sizeof(icinfo));
icinfo.dwSize = sizeof(icinfo);
RECORD_COMPRESSION2.hic = ICOpen(fcc.dwFCC,RECORD_COMPRESSION2.fccHandler,ICMODE_QUERY);
if(RECORD_COMPRESSION2.hic)
	{
	ICGetInfo(RECORD_COMPRESSION2.hic,&icinfo,sizeof(icinfo));
	ICClose(RECORD_COMPRESSION2.hic);
	wsprintf(buffer,"24 bit Compression: %ws",icinfo.szDescription);
	}
else
	wsprintf(buffer,"24 bit Compression: Full Frames (Uncompressed)");
SetDlgItemText(hW,IDC_COMPRESSION2,buffer);
}
开发者ID:Asmodean-,项目名称:PCSXR,代码行数:35,代码来源:cfg.c


示例3: test_OpenCase

static void test_OpenCase(void)
{
    HIC h;
    ICINFO info;
    /* Check if default handler works */
    h = ICOpen(mmioFOURCC('v','i','d','c'),0,ICMODE_DECOMPRESS);
    ok(0!=h,"ICOpen(vidc.0) failed\n");
    if (h) {
        info.dwSize = sizeof(info);
        info.szName[0] = 0;
        ICGetInfo(h, &info, sizeof(info));
        trace("The default decompressor is %s\n", wine_dbgstr_w(info.szName));
        ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
    }
    h = ICOpen(mmioFOURCC('v','i','d','c'),0,ICMODE_COMPRESS);
    ok(0!=h || broken(h == 0),"ICOpen(vidc.0) failed\n");  /* Not present in Win8 */
    if (h) {
        info.dwSize = sizeof(info);
        info.szName[0] = 0;
        ICGetInfo(h, &info, sizeof(info));
        trace("The default compressor is %s\n", wine_dbgstr_w(info.szName));
        ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
    }

    /* Open a compressor with combinations of lowercase
     * and uppercase compressortype and handler.
     */
    h = ICOpen(mmioFOURCC('v','i','d','c'),mmioFOURCC('m','s','v','c'),ICMODE_DECOMPRESS);
    ok(0!=h,"ICOpen(vidc.msvc) failed\n");
    if (h) {
        ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
    }
    h = ICOpen(mmioFOURCC('v','i','d','c'),mmioFOURCC('M','S','V','C'),ICMODE_DECOMPRESS);
    ok(0!=h,"ICOpen(vidc.MSVC) failed\n");
    if (h) {
        ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
    }
    h = ICOpen(mmioFOURCC('V','I','D','C'),mmioFOURCC('m','s','v','c'),ICMODE_DECOMPRESS);
    ok(0!=h,"ICOpen(VIDC.msvc) failed\n");
    if (h) {
        ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
    }
    h = ICOpen(mmioFOURCC('V','I','D','C'),mmioFOURCC('M','S','V','C'),ICMODE_DECOMPRESS);
    ok(0!=h,"ICOpen(VIDC.MSVC) failed\n");
    if (h) {
        ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
    }
    h = ICOpen(mmioFOURCC('v','i','d','c'),mmioFOURCC('m','S','v','C'),ICMODE_DECOMPRESS);
    ok(0!=h,"ICOpen(vidc.mSvC) failed\n");
    if (h) {
        ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
    }
    h = ICOpen(mmioFOURCC('v','I','d','C'),mmioFOURCC('m','s','v','c'),ICMODE_DECOMPRESS);
    ok(0!=h,"ICOpen(vIdC.msvc) failed\n");
    if (h) {
        ok(ICClose(h)==ICERR_OK,"ICClose failed\n");
    }
}
开发者ID:ccpgames,项目名称:wine,代码行数:58,代码来源:msvfw.c


示例4: GetDlgItem

void CVideoOptions::RefreshCompressorButtons() 
{

	int sel = ((CComboBox *) GetDlgItem(IDC_COMPRESSORS))->GetCurSel();
	if (sel != CB_ERR)  {
		
	
		HIC hic = ICOpen(compressor_info[sel].fccType, compressor_info[sel].fccHandler, ICMODE_QUERY);
		if (hic) {
			
				
			if (ICQueryAbout(hic)) 
				((CButton *) GetDlgItem(ID_ABOUT))->EnableWindow(TRUE);
			else
				((CButton *) GetDlgItem(ID_ABOUT))->EnableWindow(FALSE);

			if (ICQueryConfigure(hic)) 
				((CButton *) GetDlgItem(ID_CONFIGURE))->EnableWindow(TRUE);
			else
				((CButton *) GetDlgItem(ID_CONFIGURE))->EnableWindow(FALSE);	

					
			
			ICClose(hic);
		}


	}

}
开发者ID:Kapitz,项目名称:camstudio-mousedown-highlight,代码行数:30,代码来源:VideoOptions.cpp


示例5: uninit

// uninit driver
static void uninit(sh_video_t *sh){
    HRESULT ret;
    vd_vfw_ctx *priv = sh->context;

#ifdef BUILD_VFWEX
    ret = ICDecompressEndEx(priv->handle);
#else
    ret = ICDecompressEnd(priv->handle);
#endif
    if (ret)
    {
	mp_msg(MSGT_WIN32, MSGL_WARN, "ICDecompressEnd failed: %ld\n", ret);
	return;
    }

    ret = ICClose(priv->handle);
    if (ret)
    {
	mp_msg(MSGT_WIN32, MSGL_WARN, "ICClose failed: %ld\n", ret);
	return;
    }

    free(priv->o_bih);
    free(priv);
}
开发者ID:basinilya,项目名称:mplayer,代码行数:26,代码来源:vd_vfw.c


示例6: ZeroMemory

void CPgPubExtra::FillCodecs()
{
	m_comboCodec.ResetContent();
	m_codecs.Destroy();

	BITMAPINFOHEADER bih; 
	ZeroMemory( &bih, sizeof( bih ) );
	bih.biSize = sizeof( bih );
	bih.biPlanes = 1; 
	bih.biCompression = BI_RGB;
	bih.biBitCount = 24;
	
	ICINFO ii;
	ZeroMemory( &ii, sizeof( ii ) );
	ii.dwSize = sizeof( ii );
	
	for ( DWORD i = 0; ICInfo( ICTYPE_VIDEO, i, &ii ); i++ )
	{
		// This one is valid
		DWORD fourCC = ii.fccHandler;

		HIC hIc = ICOpen( ii.fccType, ii.fccHandler, ICMODE_QUERY );
		if ( hIc != NULL )
		{
			// Ensure it supports our video type
			if (	ii.fccType == ICTYPE_VIDEO && 
//					ICCompressQuery( hIc, &bih, NULL ) == ICERR_OK &&
					ICGetInfo( hIc, &ii, sizeof( ii ) ) )
			{
				char str[ 256 ] = { 0 };
				wcstombs( str, ii.szDescription, sizeof( str ) );

				// Save codec info
				LPCODECINFO pci = (LPCODECINFO)m_codecs.NewObj( sizeof( CODECINFO ), NULL, i, str );
				if ( pci != NULL )
				{
					// Save data
					pci->bConfig = ICQueryConfigure( hIc ) != ICERR_OK; // Backwards???
					pci->fourCC = fourCC;

					// Get settings
					int item = m_comboCodec.AddString( str );
					if ( item != CB_ERR ) m_comboCodec.SetItemData( item, (DWORD)pci );

				} // end if
					
			} // end if

			ICClose( hIc ); 

		} // end if

		// Next codec
		ZeroMemory( &ii, sizeof( ii ) );
		ii.dwSize = sizeof( ii );
		i++;

	} // end while

}
开发者ID:sanyaade-webdev,项目名称:wpub,代码行数:60,代码来源:PgPubExtra.cpp


示例7: cap_ic_start

int cap_ic_start(cap_cx *cx, char *err)
{
	char format[32];
	char message[80];

	if((cx->ic = ICDecompressOpen(
		ICTYPE_VIDEO,
		0,
		&(cx->pfmt->bmiHeader),
		NULL)))
	{
		cx->outfmtlen = ICDecompressGetFormatSize(cx->ic, cx->pfmt);
		if((cx->poutfmt = malloc(cx->outfmtlen)))
		{
			if(ICDecompressGetFormat(cx->ic, cx->pfmt, cx->poutfmt) == ICERR_OK)
			{
				if(ICDecompressBegin(cx->ic, cx->pfmt, cx->poutfmt) == ICERR_OK)
				{
					cx->mode = CAP_USE_IC;
					return 1;
				}
			}
			free(cx->poutfmt);
		}
		ICClose(cx->ic);
	}

	sprintf(message, "Can't open decompressor for format \"%s\"",
		reverse_fourcc(format, cx->pfmt->bmiHeader.biCompression));
	set_err(message);
	
	return 0;
}
开发者ID:ofilin,项目名称:remcam2,代码行数:33,代码来源:capture.c


示例8: ICDecompressEnd

void CvCaptureCAM_VFW::closeHIC()
{
    if( hic )
    {
        ICDecompressEnd( hic );
        ICClose( hic );
        hic = 0;
    }
}
开发者ID:12rohanb,项目名称:opencv,代码行数:9,代码来源:cap_vfw.cpp


示例9: cap_ic_finish

void cap_ic_finish(cap_cx *cx)
{
	if(cx->mode == CAP_USE_IC)
	{
		ICDecompressEnd(cx->ic);
		free(cx->poutfmt);
		ICClose(cx->ic);
	}
}
开发者ID:ofilin,项目名称:remcam2,代码行数:9,代码来源:capture.c


示例10: memset

QMap<std::wstring, bool> AviCodecRestrictions::getUsableCodecs(const TDimension &resolution)
{
	QMap<std::wstring, bool> codecs;

	HIC hic = 0;
	ICINFO icinfo;
	memset(&icinfo, 0, sizeof(ICINFO));

	char descr[2048], name[2048];
	DWORD fccType = 0;

	BITMAPINFO inFmt;
	memset(&inFmt, 0, sizeof(BITMAPINFO));

	inFmt.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
	inFmt.bmiHeader.biWidth = inFmt.bmiHeader.biHeight = 100;
	inFmt.bmiHeader.biPlanes = 1;
	inFmt.bmiHeader.biCompression = BI_RGB;
	int bpp;
	for (bpp = 32; (bpp >= 24); bpp -= 8) {
		//find the codec.
		inFmt.bmiHeader.biBitCount = bpp;
		for (int i = 0; ICInfo(fccType, i, &icinfo); i++) {
			hic = ICOpen(icinfo.fccType, icinfo.fccHandler, ICMODE_COMPRESS);

			ICGetInfo(hic, &icinfo, sizeof(ICINFO)); // Find out the compressor name
			WideCharToMultiByte(CP_ACP, 0, icinfo.szDescription, -1, descr, sizeof(descr), 0, 0);
			WideCharToMultiByte(CP_ACP, 0, icinfo.szName, -1, name, sizeof(name), 0, 0);

			std::wstring compressorName;
			compressorName = toWideString(std::string(name) + " '" + toString(bpp) + "' " + std::string(descr));

			if (hic) {
				if (ICCompressQuery(hic, &inFmt, NULL) != ICERR_OK) {
					ICClose(hic);
					continue; // Skip this compressor if it can't handle the format.
				}
				codecs[compressorName] = canWork(hic, resolution, bpp);
				ICClose(hic);
			}
		}
	}
	return codecs;
}
开发者ID:CroW-CZ,项目名称:opentoonz,代码行数:44,代码来源:avicodecrestrictions.cpp


示例11: try_driver

static HIC try_driver(driver_info_t *info)
{
    HIC   hic;

    if ((hic = ICOpen(info->fccType, info->fccHandler, info->wMode))) 
    {
	if (!ICSendMessage(hic, info->querymsg, (DWORD_PTR)info->lpbiIn, (DWORD_PTR)info->lpbiOut))
	    return hic;
	ICClose(hic);
    }
    return 0;
}
开发者ID:dvdhoo,项目名称:wine,代码行数:12,代码来源:msvideo_main.c


示例12: SetVideoCompressState

//Ver 1.2
// Note : Because the program stores the state for only one compressor (in the
// pVideoCompressParams), if the user chooses "Configure" for compressor A, then
// chooses another compressor B and presses "Configure" again the previous state
// info for compressor A will be lost.
void CVideoOptionsDlg::OnConfigure()
{
	int sel = m_ctrlCBCompressor.GetCurSel();
	if (sel != CB_ERR) {
		// Still unable to handle DIVX state (results in error)
		//if (pCompressorInfo[sel].fccHandler == mmioFOURCC('D', 'I', 'V', 'X'))
		//	return;

//TODO, How long is this code stil experimental and soo in use ???
#define EXPERIMENTAL_CODE
#ifdef EXPERIMENTAL_CODE
		CHIC chic;
		if (chic.Open(pCompressorInfo[sel].fccType, pCompressorInfo[sel].fccHandler, ICMODE_QUERY)) {
			// Set our current Video Compress State Info into the hic,
			// which will update the ICConfigure Dialog
			SetVideoCompressState(chic, chic.Handler());
			chic.Configure(m_hWnd);

			// Get Video Compress State Info from the hic after adjustment with the
			// ICConfigure dialog. This will set the external pVideoCompressParams
			// variable which is used by AVICOMPRESSOPTIONS (This means the external
			// variable pVideoCompressParams will be changed even if user press "Cancel")
			DWORD dwSize = chic.GetStateSize();
			LRESULT lResult = chic.GetState(m_cOpts.State(dwSize), dwSize);

			// if (lResult != dwSize)  ==> C4244 Warning, type mismatch
			if ( lResult - dwSize != 0 ) // Save
			{
				m_cOpts.State(0L);
			}
		}
#else
		HIC hic = ICOpen(pCompressorInfo[sel].fccType, pCompressorInfo[sel].fccHandler, ICMODE_QUERY);
		if (hic) {
			// Set our current Video Compress State Info into the hic, which will
			// update the ICConfigure Dialog
			SetVideoCompressState(hic, pCompressorInfo[sel].fccHandler);

			ICConfigure(hic, m_hWnd);

			// Get Video Compress State Info from the hic after adjustment with the
			// ICConfigure dialog. This will set the external pVideoCompressParams
			// variable which is used by AVICOMPRESSOPTIONS (This means the external
			// variable pVideoCompressParams will be changed even if user press "Cancel")
			GetVideoCompressState(hic, pCompressorInfo[sel].fccHandler);

			ICClose(hic);
		}
#endif
#undef EXPERIMENTAL_CODE
	}
}
开发者ID:aisnote,项目名称:camstudio-clone,代码行数:57,代码来源:VideoOptions.cpp


示例13: ICGetDisplayFormat

/***********************************************************************
 *		ICGetDisplayFormat			[[email protected]]
 */
HIC VFWAPI ICGetDisplayFormat(
	HIC hic,LPBITMAPINFOHEADER lpbiIn,LPBITMAPINFOHEADER lpbiOut,
	INT depth,INT dx,INT dy)
{
	HIC	tmphic = hic;

	TRACE("(%p,%p,%p,%d,%d,%d)!\n",hic,lpbiIn,lpbiOut,depth,dx,dy);

	if (!tmphic) {
		tmphic=ICLocate(ICTYPE_VIDEO,0,lpbiIn,NULL,ICMODE_DECOMPRESS);
		if (!tmphic)
			return tmphic;
	}
	if ((dy == lpbiIn->biHeight) && (dx == lpbiIn->biWidth))
		dy = dx = 0; /* no resize needed */

	/* Can we decompress it ? */
	if (ICDecompressQuery(tmphic,lpbiIn,NULL) != 0)
		goto errout; /* no, sorry */

	ICSendMessage(tmphic, ICM_DECOMPRESS_GET_FORMAT, (DWORD_PTR)lpbiIn, (DWORD_PTR)lpbiOut);

	if (lpbiOut->biCompression != 0) {
           FIXME("Ooch, how come decompressor outputs compressed data (%d)??\n",
			 lpbiOut->biCompression);
	}
	if (lpbiOut->biSize < sizeof(*lpbiOut)) {
           FIXME("Ooch, size of output BIH is too small (%d)\n",
			 lpbiOut->biSize);
	   lpbiOut->biSize = sizeof(*lpbiOut);
	}
	if (!depth) {
		HDC	hdc;

		hdc = GetDC(0);
		depth = GetDeviceCaps(hdc,BITSPIXEL)*GetDeviceCaps(hdc,PLANES);
		ReleaseDC(0,hdc);
		if (depth==15)	depth = 16;
		if (depth<8)	depth =  8;
	}
	if (lpbiIn->biBitCount == 8)
		depth = 8;

	TRACE("=> %p\n", tmphic);
	return tmphic;
errout:
	if (hic!=tmphic)
		ICClose(tmphic);

	TRACE("=> 0\n");
	return 0;
}
开发者ID:dvdhoo,项目名称:wine,代码行数:55,代码来源:msvideo_main.c


示例14: getCodec

void AviCodecRestrictions::openConfiguration(const std::wstring &codecName, void *winId)
{
	if (codecName == L"Uncompressed")
		return;

	//find the codec
	int bpp;
	HIC hic = getCodec(codecName, bpp);
	if (!hic)
		return;

	ICConfigure(hic, winId);
	ICClose(hic);
}
开发者ID:CroW-CZ,项目名称:opentoonz,代码行数:14,代码来源:avicodecrestrictions.cpp


示例15: enum_compressors

static BOOL enum_compressors(HWND list, COMPVARS *pcv, BOOL enum_all)
{
    UINT id, total = 0;
    ICINFO icinfo;

    id = 0;

    while (ICInfo(pcv->fccType, id, &icinfo))
    {
        struct codec_info *ic;
        DWORD idx;
        HIC hic;

        id++;

        hic = ICOpen(icinfo.fccType, icinfo.fccHandler, ICMODE_COMPRESS);

        if (hic)
        {
            /* for unknown reason fccHandler reported by the driver
             * doesn't always work, use the one returned by ICInfo instead.
             */
            DWORD fccHandler = icinfo.fccHandler;

            if (!enum_all && pcv->lpbiIn)
            {
                if (ICCompressQuery(hic, pcv->lpbiIn, NULL) != ICERR_OK)
                {
                    TRACE("fccHandler %s doesn't support input DIB format %d\n",
                          wine_dbgstr_fcc(icinfo.fccHandler), pcv->lpbiIn->bmiHeader.biCompression);
                    ICClose(hic);
                    continue;
                }
            }

            ICGetInfo(hic, &icinfo, sizeof(icinfo));
            icinfo.fccHandler = fccHandler;

            idx = SendMessageW(list, CB_ADDSTRING, 0, (LPARAM)icinfo.szDescription);

            ic = HeapAlloc(GetProcessHeap(), 0, sizeof(struct codec_info));
            ic->icinfo = icinfo;
            ic->hic = hic;
            SendMessageW(list, CB_SETITEMDATA, idx, (LPARAM)ic);
        }
        total++;
    }

    return total != 0;
}
开发者ID:dvdhoo,项目名称:wine,代码行数:50,代码来源:msvideo_main.c


示例16: EnumVCM

void EnumVCM(bool bEnc)
{
	ICINFO info;
	char buf[256];

	for (int i = 0; ICInfo(ICTYPE_VIDEO, i, &info); i++)
	{
		HIC hic = ICOpen(ICTYPE_VIDEO, info.fccHandler, bEnc ? ICMODE_COMPRESS : ICMODE_DECOMPRESS);
		if (hic == NULL)
			continue;
		ICGetInfo(hic, &info, sizeof(info));
		ICClose(hic);
		wsprintf(buf, "VCM\t%d\t%S\t%c%c%c%c\n", bEnc, info.szDescription, FCC4PRINTF(info.fccHandler));
		printf("%s", buf);
	}
}
开发者ID:umezawatakeshi,项目名称:vclist,代码行数:16,代码来源:vclist-enum.cpp


示例17: AVIFILE_CloseCompressor

static void AVIFILE_CloseCompressor(IGetFrameImpl *This)
{
  if (This->lpInFormat != This->lpOutFormat) {
    HeapFree(GetProcessHeap(), 0, This->lpOutFormat);
    This->lpOutFormat = NULL;
  }
  HeapFree(GetProcessHeap(), 0, This->lpInFormat);
  This->lpInFormat = NULL;
  if (This->hic != NULL) {
    if (This->bResize)
      ICDecompressExEnd(This->hic);
    else
      ICDecompressEnd(This->hic);
    ICClose(This->hic);
    This->hic = NULL;
  }
}
开发者ID:Jactry,项目名称:wine,代码行数:17,代码来源:getframe.c


示例18: ICClose16

/***********************************************************************
 *		ICClose			[MSVIDEO.204]
 */
LRESULT WINAPI ICClose16(HIC16 hic)
{
    BOOL ret = ICClose(HIC_32(hic));

    EnterCriticalSection(&msvideo_cs);
    if (ret)
    {
        struct msvideo_thunk* thunk;
        if ((thunk = MSVIDEO_HasThunk(hic)))
        {
            thunk->pfn16 = 0;
            thunk->hIC16 = 0;
        }
        else ret = FALSE;
    }
    LeaveCriticalSection(&msvideo_cs);
    return ret;
}
开发者ID:AmesianX,项目名称:RosWine,代码行数:21,代码来源:msvideo16.c


示例19: GetSafeHwnd

void CPgPubExtra::OnSettings() 
{
	CReg *pReg = (CReg*)CDlgTabFrame::GetData( GetSafeHwnd() );
	if ( pReg == NULL ) return;
	CRKey *pRk = pReg->FindKey( "PUBINFO" );
	if ( pRk == NULL ) return;

	int sel = m_comboCodec.GetCurSel();
	if ( sel == CB_ERR ) return;

	// Get data pointer
	LPCODECINFO pci = (LPCODECINFO)m_comboCodec.GetItemData( sel );
	if ( pci == NULL || !m_codecs.VerifyPointer( pci ) ) return;

	// Attempt to open settings dialog
	HIC hIc = ICOpen( ICTYPE_VIDEO, pci->fourCC, ICMODE_QUERY );
	if ( hIc != NULL )
	{
		DWORD size = pRk->GetValueSize( "CodecData" );
		LPBYTE buf = (LPBYTE)pRk->GetValuePtr( "CodecData" );

		// Restore settings
		if ( size > 0 && buf != NULL )
			ICSetState( hIc, buf, size );

		// Configure the compressor
		if ( ICConfigure( hIc, GetSafeHwnd() ) != ICERR_OK )
			return;

		size = ICGetStateSize( hIc );
		if ( size > 0 )
		{
			TMem< BYTE > mem;
			if ( mem.allocate( size ) )
				if ( ICGetState( hIc, mem.ptr(), size ) == ICERR_OK )
					pRk->Set( "CodecData", mem.ptr(), size );

		} // end if

		ICClose( hIc ); 

	} // end if
	
}
开发者ID:sanyaade-webdev,项目名称:wpub,代码行数:44,代码来源:PgPubExtra.cpp


示例20: switch

INT_PTR CALLBACK Frameserver::StatusDlgProc2( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message) {
	case WM_INITDIALOG:
		SetWindowLongPtr(hWnd, DWLP_USER, lParam);
		SetDlgItemText(hWnd, IDC_STATIC_FSNAME, ((Frameserver *)lParam)->lpszFsname);
		SetTimer(hWnd,1,1000,NULL);

		{
			HKEY hkey;
			HIC hic;
			BOOL fAVIFile = FALSE, fVCM = FALSE;

			if (RegOpenKeyEx(HKEY_CLASSES_ROOT, "CLSID\\{894288E0-0948-11D2-8109-004845000EB5}\\InProcServer32\\AVIFile", 0, KEY_QUERY_VALUE, &hkey)==ERROR_SUCCESS) {
				RegCloseKey(hkey);
				fAVIFile = TRUE;
			}

			if (hic = ICOpen('CDIV', 'TSDV', ICMODE_DECOMPRESS)) {
				ICClose(hic);
				fVCM = TRUE;
			}

			if (fAVIFile && fVCM)
				SetDlgItemText(hWnd, IDC_STATIC_FCINSTALLED, "AVIFile and VCM");
			else if (fAVIFile)
				SetDlgItemText(hWnd, IDC_STATIC_FCINSTALLED, "AVIFile only");
			else if (fVCM)
				SetDlgItemText(hWnd, IDC_STATIC_FCINSTALLED, "VCM only");
		}
		return TRUE;
	case WM_COMMAND:
		if (LOWORD(wParam) != IDOK) break;
	case WM_CLOSE:
		mbExit = true;
		return TRUE;
	case WM_TIMER:
		SetDlgItemInt(hWnd, IDC_STATIC_REQCOUNT, lRequestCount, FALSE);
		SetDlgItemInt(hWnd, IDC_STATIC_FRAMECNT, lFrameCount, FALSE);
		SetDlgItemInt(hWnd, IDC_STATIC_AUDIOSEGS, lAudioSegCount, FALSE);
		return TRUE;
    }
    return FALSE;
}
开发者ID:KGE-INC,项目名称:VirtualDub,代码行数:44,代码来源:server.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ICMPH_TYPE_SET函数代码示例发布时间:2022-05-30
下一篇:
C++ IBindStatusCallback_Release函数代码示例发布时间: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