[MPlayer-dev-eng] [PATCH] DivX6 support

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Wed Jun 21 17:51:59 CEST 2006


On Monday, 19 June 2006 at 13:19, Diego Biurrun wrote:
> On Mon, Jun 19, 2006 at 05:47:19AM +0200, Dominik 'Rathann' Mierzejewski wrote:
> > Here's a preliminary but already working interface to DivX6 .so decoder
> > based on vd_divx4.c.
> > 
> > --- /dev/null	2006-06-15 22:17:56.455481500 +0200
> > +++ mplayer/libmpcodecs/vd_divx6.c	2006-06-19 05:39:03.000000000 +0200
> > @@ -0,0 +1,178 @@
> > +#include <stdio.h>
> > +#include <stdlib.h>
> > +#include <stdarg.h>
> > +#include <assert.h>
> 
> I'd add a proper GPL header to the top of the file...

Very few files in MPlayer source have such a header. I'll add it if you
insist. Besides, I am fully aware that MPlayer binary linked against
libdivx.so is not distributable.

> > +#ifdef HAVE_DIVX6
> 
> That's ugly, please put this #ifdef in the Makefile, not in the source.

Done.

> > +// to set/get/query special features/parameters
> 
> I'd use C-style /* */ comments instead of C++-style //, but that may
> just be me...
> 
> > +static int control(sh_video_t *sh,int cmd,void* arg,...){
> > +#if 0
> > +	switch(cmd){
> > +	}
> > +#endif
> 
> Hmmm, is this large block in #if 0 necessary?

It was a copy&paste from vd_divx4.c. Fixed now.

> > --- mplayer/configure.divx6	2006-06-19 05:38:16.000000000 +0200
> > +++ mplayer/configure	2006-06-19 05:39:36.000000000 +0200
> > @@ -6569,6 +6581,33 @@
> >  fi
> >  echores "$_x264"
> >  
> > +echocheck "DivX 6.x decore"
> > +# DivX6
> 
> redundant comment..

Right.

> > +cat > $TMPC << EOF
> > +#include <decoder/LibQDec.h>
> > +int main(void) {
> > + LibQDecoreFunction* pDecore=getDecore(FourCC_create("DX50"));
> > + return pDecore(0, DEC_OPT_INIT, 0, 0);
> > +}
> > +EOF
> > +_ld_divx6="$_ld_divx6 -ldivx"
> > +for _inc_divx6 in "$_inc_divx6" \
> > +		   "-I/usr/local/include/divx" \
> > +		   "-I/usr/include/divx"; do
> > +  cc_check $_inc_divx6 $_ld_divx6 && _divx6=yes && break
> > +done
> 
> Only run this test if _divx6 is set to auto.

How about now?

> > @@ -7704,6 +7745,9 @@
> >  /* Define if you are using DivX5Linux Decore library */
> >  $_def_divx5
> >  
> > +/* Define if you are using DivX6 Codec library */
> 
> nit: lowercase codec ;)

No, that's its name: "DivX6 Codec".

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://rpm.greysector.net/mplayer/
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan



More information about the MPlayer-dev-eng mailing list