[MPlayer-dev-eng] Suggested diffs to enable mplayer to stream audioto other apps

Triode triode1 at btinternet.com
Tue Nov 30 00:14:01 CET 2004


Firstly appologies for posting this twice - the first time I was not a member of the list and was not sure it was going to get 
posted.
Also as the sharp eyes have spotted I fixed a typo in the second one (I can't believe it, but I put the same mis-spelling of 
"silent" in all three places and even compiled it with this...)

To comment on the comments raised thus far:
1) I would like this to work with windows as well as under unix, so need to be able to write to stdout without relying on unix 
redirection.
2) For my application it is also important that mplayer closes when the listening app closes the pipe (hence the need to the check 
on writing in ao_pcm.c), I took this operation from elsewhere in mplayer (the dumpstream part of mplayer.c), so hoped it would not 
be too controversial.

Adrian

----- Original Message ----- 
From: "Triode" <triode1 at btinternet.com>
To: <mplayer-dev-eng at mplayerhq.hu>
Sent: Monday, November 29, 2004 8:15 PM
Subject: [MPlayer-dev-eng] Suggested diffs to enable mplayer to stream audioto other apps


> 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 -silent -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 "-silent" 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.
>
> Thanks,
>
> Adrian
>




More information about the MPlayer-dev-eng mailing list