I'm writing a C programming to create a AVI file from the jpeg frame which is get from camera. I've chosen a compression function recommended on the internet to compress these frames. the compressor which I want to chose that is DivX encoder.
HRESULT AddAviFrame(HAVI avi, HBITMAP hbm)
{ if (avi==NULL) return AVIERR_BADHANDLE;
if (hbm==NULL) return AVIERR_BADPARAM;
DIBSECTION dibs; int sbm = GetObject(hbm,sizeof(dibs),&dibs);
if (sbm!=sizeof(DIBSECTION)) return AVIERR_BADPARAM;
TAviUtil *au = (TAviUtil*)avi;
//
// create an empty compression, if the user hasn't set any
if (au->psCompressed==0)
{ AVICOMPRESSOPTIONS opts; ZeroMemory(&opts,sizeof(opts));
opts.fccHandler=mmioFOURCC('D','i','v','X');
HRESULT hr = AVIMakeCompressedStream(&au->psCompressed, au->ps, &opts, NULL);
if (hr != AVIERR_OK) {au->iserr=true; return hr;}
hr = AVIStreamSetFormat(au->psCompressed, 0, &dibs.dsBmih, dibs.dsBmih.biSize+dibs.dsBmih.biClrUsed*sizeof(RGBQUAD));
if (hr!=AVIERR_OK) {au->iserr=true; return hr;}
}
The problem is that I can only use this type of codec since I installed the DivX Player. it seems that it added some libraries for the DivX codec in my system after the Player had installed. How can I get these libraries and add them directly into my project without installing any Media Player.