[MPlayer-cygwin] Re: Mplayer win32 GUI questions

Joey Parrish joey at nicewarrior.org
Tue Dec 6 15:30:58 CET 2005


Frank Aurich wrote:

> Erik Lunchpail wrote:
>
>>> Since I don't use a GUI though, I'm wondering if it
>>> is possible to do some of the things without the need to use
>>> --enable-gui at ./configure?
>>>
>>> I tried extracting the -console code to integrate it
>>> into my build, but failed horribly. Then again, my knowledge of C is
>>> fairly bad.
>>>
>>>
>>> Anyway, it'd be great if there's a way to separate
>>> GUI code from the other enhancements.
>>
>>
>> Yea it's all quite possible, and in fact I believe
>> Joey Parrish has a patch in his cygwin builds that
>> uses AllocConsole(), so you could always look at that
>> as well.
>>
>> As far as IPC is concerned, it's not even necessary
>> with a commandline version of mplayer, unless you
>> don't like finishing playback of files :) Nonetheless,
>> a simple message handler is all that's needed if you
>> want to give it an idle loop and intercept messages.
>>
>> Regards,
>> Erik
>>
>
> I had already looked at the patches Joey provides, but unfortunately 
> the one I'm interested does only work on Cygwin (there's a method call 
> to cygwin_attach_handle_to_fd(..)).
>
> At that point my skills aren't good enough to do a rewrite for 
> MingW/Win32 :) 


I've rewritten it for MingW recently.  Haven't published any such thing 
yet, as I discovered the correct way at work.
Here:
  AllocConsole();
  freopen ("CONOUT$", "w", stdout);
  freopen ("CONIN$", "r", stdin);
This is all you need to open a console window and redirect those handles.




More information about the MPlayer-cygwin mailing list