[MPlayer-dev-eng] MNG support for MPlayer
Diego Biurrun
diego at biurrun.de
Thu Sep 25 23:30:29 CEST 2008
On Fri, Sep 19, 2008 at 03:39:20PM +0200, Stefan Schuermans wrote:
> Diego Biurrun wrote:
>> On Thu, Sep 18, 2008 at 10:47:00PM +0200, Stefan Schuermans wrote:
>>> --- configure (revision 27638)
>>> +++ configure (working copy)
>>> @@ -4683,6 +4687,33 @@
>>> +echocheck "MNG support"
>>> +if test "$_mng" = auto ; then
>>> + _mng=no
>>> + cat > $TMPC << EOF
>>> +#include <libmng.h>
>>> +int main(void) {
>>> + const char * p_ver = mng_version_text() ?: "";
>>> + printf("libmng: %s\n", p_ver);
>>> + return p_ver[0] == 0;
>>> +}
>>> +EOF
>>> + if cc_check -lmng -lz $_ld_lm ; then
>>> + if tmp_run ; then
>>> + _mng=yes
>>> + else
>>> + _res_comment="no library version"
>>> + fi
>>> + fi
>>> +fi
>>
>> I wonder why tmp_run is necessary? And yes, I know that the libpng test
>> does it as well...
>
> If I've understood this correctly, cc_check tries to compile and link
> the C source and tmp_run tries to run the result. I think it is
> neccessary to run the code to detect if linking against libmng works.
> I've seen it at least once (with some broken libmng installation) that
> compiling and linking worked, but the binary did not run. I'm not sure
> any more if it crashed or did not load due to not finding libmng.so.
I think the the test in the libpng test is already suspicious. Just
drop it. As Reimar said, it will be problematic if cross-compiling.
> --- configure (revision 27638)
> +++ configure (working copy)
> @@ -4683,6 +4687,32 @@
>
> +if test "$_mng" = yes ; then
> + _def_mng='#define HAVE_MNG 1'
CONFIG_MNG
> --- libmpdemux/demux_mng.c (revision 0)
> +++ libmpdemux/demux_mng.c (revision 0)
> @@ -0,0 +1,622 @@
> +
> + * start time must be > 0 for the variable frame time mechanism
> + * (GIF, MATROSKA, MNG) in video.c to work for the first frame
When you have complete sentences like this, you should ideally
capitalize the first word and end in a period, same below.
> + * This structure is used as private data for MPlayer demuxer
> + * als also as private data for the MNG library.
als also?
> +/**
> + * \brief MNG library callback: (a part of) the canvas should be shown
> + * \param[in] h_mng MNG library image handle
> + * \param[in] x rectangle's left edge
> + * \param[in] y rectangle's top edge
> + * \param[in] width rectangle's width
> + * \param[in] height rectangle's heigt
> + * \return \p MNG_TRUE on success, \p MNG_FALSE on error (never happens)
What are all those rectangles? I may be missing something obvious
here..
> + // save number of milliseconds after which to call MNG library again
the MNG
> + * \return demuxer sructure on success, \p NULL on error
sTructure
Diego
More information about the MPlayer-dev-eng
mailing list