[Ffmpeg-devel] Re: Revised os2.diff
Paul Smedley
paul
Mon Apr 25 12:21:55 CEST 2005
Hi,
Michael Niedermayer wrote:
> Hi On Saturday 23 April 2005 03:32, Paul Smedley wrote:
>
>
> IIRC there must be no spaces before #
> so
> + #ifdef CONFIG_OS2
> will cause problems
Hmmm it compiles OK here....
> >> + // Make stdout and stderr unbuffered
> >> + setbuf( stdout, NULL );
> >> + setbuf( stderr, NULL );
>
>
> why?
from:
http://wiki.netlabs.org/index.php/SDL#Morph_your_program_to_a_PM_program_at_runtime
<Begin quote>
Most SDL applications assume that they can write to STDOUT, and the user
will see it. In OS/2, you have to compile your application to a PM
application in order to be able to have a PM Window, but the STDOUT will
go to NULL in this case. The solution is to compile your code to a VIO
application, and morph the application to a PM one dynamically, at
runtime, before calling SDL_Init().
Once you have your text output back, you might use it for showing debug
messages. If you do so, it's a good idea to make the STDOUT and STDERR
unbuffered, so the debug messages will be shown right at the time when
the printf() is called, so every message will be visible even in case of
a crash.
Here is an example code on how to morph your VIO application to a PM one
dynamically, at runtime, and how to set STDOUT and STDERR unbuffered:
<End Quote>
Cheers,
Paul.
More information about the ffmpeg-devel
mailing list