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

Diego Biurrun diego at biurrun.de
Mon Jun 19 13:19:03 CEST 2006


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...

> +#ifdef HAVE_DIVX6

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

> +// 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?

> --- 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..

> +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.

> @@ -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 ;)

Diego



More information about the MPlayer-dev-eng mailing list