各位大大,最近遇到一个问题在建一个VFW视频会议的时候
ZeroMemory(&m_cv,sizeof(m_cv));
m_cv.cbSize=sizeof(m_cv);
m_cv.dwFlags=ICMF_COMPVARS_VALID ;
m_cv.hic=m_hIC;
m_cv.fccType=ICTYPE_VIDEO ; //"vidc"
m_cv.fccHandler=
mmioFOURCC(m_CodecType[m_Codec].Fourcc[0],m_CodecType[m_Codec].Fourcc[1], \
m_CodecType[m_Codec].Fourcc[2],m_CodecType[m_Codec].Fourcc[3]);
m_cv.lpbiOut=0;
m_cv.lKey=64; // I帧产生速率
m_cv.lDataRate=20; // KBPS
m_cv.lQ=1000;//1-10000
        m_hIC=ICOpen(ICTYPE_VIDEO,m_cv.fccHandler,ICMODE_COMPRESS);
一直返回为空,是不是我少装了什么插件啦,电脑系统是win7,64位的
但是在xpsp3上也是同样的问题。求各位解决。谢谢了视频会议codecvideo

解决方案 »

  1.   

    getlasterror
    看看返回值 是不是传参数错误!
      

  2.   

    GetLastError返回值为0,没有错误,但是m_hIC的值为空。
      

  3.   

    Returns a handle to a compressor or decompressor if successful or zero otherwise.
    返回0是失败的意思!
      

  4.   

    Parameters
    fccType
    Four-character code indicating the type of compressor or decompressor to open. For video streams, the value of this parameter is "VIDC".
    fccHandler
    Preferred handler of the specified type. Typically, the handler type is stored in the stream header in an AVI file.
    wMode
    Flag defining the use of the compressor or decompressor. The following values are defined.
    Value  Meaning
    ICMODE_COMPRESS Compressor will perform normal compression.
    ICMODE_DECOMPRESS Decompressor will perform normal decompression.
    ICMODE_DRAW Decompressor will decompress and draw the data directly to hardware.
    ICMODE_FASTCOMPRESS Compressor will perform fast (real-time) compression.
    ICMODE_FASTDECOMPRESS Decompressor will perform fast (real-time) decompression.
    ICMODE_QUERY Queries the compressor or decompressor for information.