摘要:Windows Multimedia API ICConfigure可以通知视频编码程序显示它的配置对话框。对于有经验的用户,这工作的很好。但是对于不了解视频编码程序的用户,面对一大堆鸟语设置肯定会晕头转向。
但是我只需要简单的设置带宽就可以了。
手头没有XVID的接口,所以用了类似修改游戏的方法来找到带宽设置在压缩参数中的地址
??HIC hic = ICOpen(compressor_info[sel].fccType, compressor_info[sel].fccHandler, ICMODE_QUERY);????if (hic) {?????????//Set our current Video Compress State Info into the hic, which will update the ICConfigure Dialog#ifdef?_DEBUG???DWORD statesize = ICGetStateSize(hic);???LPBYTE?lpOldStart=NULL;???if(pVideoCompressParams){????lpOldStart=new BYTE[statesize];????memcpy(lpOldStart,pVideoCompressParams,statesize);???}#endif??????SetVideoCompressState (hic , compressor_info[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 , compressor_info[sel].fccHandler);?????????ICClose(hic);#ifdef?_DEBUG???if(lpOldStart){????LPBYTE lpNewStart=(LPBYTE )pVideoCompressParams;????for(int i=0;i阅读全文]