[MPlayer-dev-eng] Suggested diffs to enable mplayer to stream audio to other apps
D Richard Felker III
dalias at aerifal.cx
Mon Nov 29 16:21:23 CET 2004
On Sun, Nov 28, 2004 at 07:26:59PM -0000, Triode wrote:
> Hi,
>
> I have been working on a streaming audio project, using mplayer due to its
> excellent support of codecs and different formats. I
> would like to propose my diffs for consideration for adding to the mplayer
> source. Ideally I would like to get this into the
> standard code base as my application is intended to be a plugin for an open
> source server, and it would aid distribution if any
> potential users could use a standard mplayer distribution.
>
> First the application: I use mplayer as part of an audio pipeline to enable
> remote streams to be processed.
>
> The application works something like this:
> mplayer -slient -ao pcm -aofile - <url> | lame <> etc
>
> To do this I have made a couple of minor mods to allow all messages to
> stdout to be suppressed and allow pcm audio to be streamed to stdout.
>
> The changes are:
> - new command line option "-slient" to allow all messages to stdout to be
> suppressed
> - definition of a special -aofile filename "-" to mean send audio output to
> stdout
> - additional error checking on write in ao_pcm.c to allow mplayer to shut
> down if the pipeline is broken
> - removal of all printf's from one of the relavent files (aviprint.c) -
> I've changed the whole file to mp_msg - hopefully this is
> useful and I've got the right message levels.
>
> I realise the "-silent" option stands out a bit because I read argv before
> normal, but I couldn't find a more elagant way of
> avoiding all status messages, even the mplayer banners, going to stdout
> without changing normal operation.
they should simply be changed to go to stderr. that's one of the big
reasons we've been getting rid of all printf's and replacing them with
mp_msg -- so the target can easily be changed.
rich
More information about the MPlayer-dev-eng
mailing list