[MPlayer-cygwin] Cygwin port won't play on other PC

Stefan Gürtler Stefan.guertler at stud.tum.de
Thu Jul 29 11:42:08 CEST 2004


----- Original Message -----
From: "Joey Parrish" <joey at nicewarrior.org>
To: "Win32/CygWin porting" <mplayer-cygwin at mplayerhq.hu>
Sent: Thursday, July 29, 2004 4:40 AM
Subject: Re: [MPlayer-cygwin] Cygwin port won't play on other PC


> On Wed, Jul 28, 2004 at 02:54:02PM +0200, Stefan Gürtler wrote:
> > > And for my packages, if you use the file associations (recommended)
then
> > > you may right-click the file and select "open and log" to write a
> > > verbose log file to $installdir/log.txt.  If you need this function
from
> > > commandline, run "mplayer -dumplog -v" ...
> > > This is an option/feature I added into my packages.
> >
> > Is there a possibility to get the -dumplog option into normal mingw
builds.
> > It can be very helpfull when there are problems while dropping clips on
> > mplayer.exe.
>
> Shouldn't be hard.  Feel free to adapt my patch any way you like.
> The essence of it is this:
>
> FILE *logfile = NULL;
>
> void log_init(char *filename)
> {
>   if (logfile) fclose(logfile);
>   logfile = fopen(filename, "w");
>   *stdout = *logfile;
>   *stderr = *logfile;
> }
>
> void log_uninit()
> {
>   if (!logfile) return;
>   fclose(logfile);
>   logfile = NULL;
> }
>
> The only real problem with this is that MPlayer begins printing messages
> to the console before the option parsing happens.  In particular, the
> version number is important for bug reports.  So my (cheap, hackish)
> solution was to do a quick scan of the command line arguments and look
> for -dumplog before MPlayer does any of it's parsing.  Then, I have a
> dummy entry in mplayer's config stuff so that it doesn't die on an
> unrecognized option.
>
> I believe that MPlayer prints version info before option parsing for a
> good reason.  It's probably in case the option parsing layer crashes the
> app.  Then, you still have version info on the console to send in a
> report of the option parsing crash.
>
> If you come up with a better solution for this (other than moving the
> parsing call or adding a hack like mine to look for -dumplog) then I
> expect this option/feature could be committed into CVS.  But I can't
> think of any good way to do it, and I'm not terribly concerned with
> getting this committed.
>
> --Joey
>
> --

I will have a look, but in the moment I am short of time because of upcoming
tests.
And i am not very good in programming either, just little bit of string
handling and some numeric calculations for solving linear/differential
equations (for calcualtion of statics).

Stefan




More information about the MPlayer-cygwin mailing list