0

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.

vominhtien961476
  • 317
  • 4
  • 17
  • if these libraries are installed then why dont you add it to your linker path?and add the header files to your compiler searchpath? – Koushik Shetty Apr 08 '13 at 04:33
  • Actually I don't know exactly which libraries ware installed I just know that the DivX codec can work properly after the Player had installed. So is there any suggestion for me to find them and add in the linker or the header file as you said. – vominhtien961476 Apr 08 '13 at 08:07

0 Answers0