[MPlayer-dev-eng] MNG support for MPlayer

Diego Biurrun diego at biurrun.de
Tue Sep 16 23:59:45 CEST 2008


On Tue, Sep 16, 2008 at 09:36:42PM +0200, Stefan Schuermans wrote:
>
> Thanks, I've fixed those and the issues found by Diego Biurrun in the  
> attached version of my patch.
>
> --- trunk/configure	2008-09-16 16:41:32.000000000 +0200
> +++ mng/configure	2008-09-16 16:40:32.000000000 +0200
> @@ -4675,6 +4679,39 @@
>  
> +echocheck "MNG support"
> +if test "$_mng" = auto ; then
> +  _mng=no
> +  if irix ; then
> +    # Don't check for -lmng on irix
> +    _res_comment="disabled on irix"

Did you verify this or is it just copied and pasted (and thus
guesswork) from the PNG test?

> +cat > $TMPC << EOF
> +#include <libmng.h>
> +#include <string.h>
> +int main(void) {
> +  const char * p_ver = mng_version_text() ?: "";
> +  printf("libmng: %s\n", p_ver);
> +  return p_ver[0] == 0;
> +}

You do not seem to be using string.h.

> --- trunk/libmpdemux/demux_mng.c	1970-01-01 01:00:00.000000000 +0100
> +++ mng/libmpdemux/demux_mng.c	2008-09-16 21:23:49.000000000 +0200
> @@ -0,0 +1,481 @@
> +
> +  mng_handle h_mng;           // handle of MNG library image

MNG library image handle

> +  mng_uint32 width;           // width of MNG image

MNG image width

> +  mng_uint32 height;          // height of MNG image

MNG image height

> +  int timer_msecs;            // number of milliseconds after which the MNG library want to be called again

wants

> +// MNG library callback: (a part of) the canvas should be shown
> +static mng_bool demux_mng_refresh(mng_handle __attribute__((unused)) h_mng,
> +                                  mng_uint32 __attribute__((unused)) x,
> +                                  mng_uint32 __attribute__((unused)) y,
> +                                  mng_uint32 __attribute__((unused)) width,
> +                                  mng_uint32 __attribute__((unused)) height)

Hmm, are you sure these __attribute__((unused)) work without problems in
non-gcc compilers?

> +    mng_priv->displaying = 1; // remember that mng_display() has been called now
> +    mng_priv->finished = mng_ret == 0; // remember if animation is finished (i.e. mng_display() returned 0)
> +  

trailing whitespace

> +    // shutdown MNG inmage instance

image

> +static void demux_mng_seek(demuxer_t * demuxer, float rel_seek_secs, float __attribute__((unused)) audio_delay, int flags)

awfully long line

In general you will earn extra good karma by keeping line length below
80 characters.

> +    if (mng_ret) {
> +       mp_msg(MSGT_DEMUX, MSGL_ERR, "demux_mng: could not reset MNG display state: mng_retcode %d\n", mng_ret);
> +      	return;

stray tab

Diego



More information about the MPlayer-dev-eng mailing list