[MPlayer-cygwin] Re: Mplayer win32 GUI questions

Frank Aurich fa859178 at inf.tu-dresden.de
Thu Dec 8 23:27:35 CET 2005


Erik Lunchpail wrote:
>> Are you saying that for you, the second freopen call
>> I gave actually 
>> blocked for input?
> 
> It had behaved strangely for me in Cygwin, I couldn't
> get any playback until I entered some form of input. I
> removed my cygwin, so I can't really test, but this
> works in Mingw. Could you let me know if it's ok in
> Cygwin?
> 
> AllocConsole();
> fp = freopen("con", "w", stdout);
> *stdout = *fp;
> setvbuf(stdout, NULL, _IONBF, 0);
> fp = freopen("con", "r", stdin);
> *stdin = *fp;
> setvbuf(stdin, NULL, _IONBF, 0);
> fp = freopen("con", "w", stdout);
> *stderr = *fp;
> setvbuf(stderr, NULL, _IONBF, 0);
> 
> Regards,
> Erik
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 


Thank you guys,

with Joeys patch ("40.winstuff.patch") from January and the code above I 
was able to make it work. If there's interest I can post a patch, 
although I will have to dig into diff first :)

I'm quite happy it works, but the code is kinda hackish. I tried 
integrating the -console switch into MPlayer native parameter parsing 
engine, but failed. A) it didn't work and B) it somehow affected MPlayer 
being _very_ slow at times.
Is there any documentation how the parsing of the command line works?
Especially the format of the mplayer_opts[] array in cfg-mplayer.h would 
be interesting to know about.
How do I give a new commandline parameter a default value? Where gets 
decided to change this value (in my case this would be simply from 0 
(show no console) to 1 (show console))?

Regards,
Frank




More information about the MPlayer-cygwin mailing list