[MPlayer-users] Problem of mplayer playing process

D Richard Felker III dalias at aerifal.cx
Tue Jul 15 12:46:03 CEST 2003


On Tue, Jul 15, 2003 at 09:00:21AM -0000, u9006101 at ttu.edu.tw wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hey everyone out there, I need your comment or information.
> 
> Now I'm tracing mplayer to find out how does it play audio file.
> I begin from the mplayer.c and go to servel file in ~/libmpcodecs or ~/libmpdemux.
> If I am right, in the mplayer.c "main" func, it call "open_stream" func to
> tell the it is audio or video , and call "~/libmpdemux/demuxer.c demux_open"
> to identify file_format.And it call "~/libmpcodecs/dec_audio.c
> init_best_audio_code   init_audio" to init the codec.
> 
> My final goal to make mplayer can play the 'AAC' file. I know mplayer can use
> libfaad to decodec the audio part in 'MOV' file. But for now, the mplayer
> still can't play the AAC file.I had tried xmms or use xmms InputPlug in
> mplayer, and it could work. But I don't want to use that way.
> 
> Ok, here is the point. Could any one explain how mplayer play the audio file?
> I mean the process from get input file to call decodec. I think MP3 may be a
> good example.It's audio file too and use mp3lib to decode. Or, could any one
> show me some DOCS about the mplayer(like xine)?

Wow, this is a rare treat...usually lusers post user questions to the
developer list, but here you actually posted an intelligent
development question to the users list. :)

In any case, I think the file you want to modify is
libmpcodecs/demux_audio.c, which currently handles wav and mp3 files.
You could make it detect and handle aac as well. However, I think the
following will work:

mplayer file.aac -rawaudio on:format=0x........

where format is filled in with the string "mp4a" converted to a 32bit
integer in (I think) little endian order ('m' | 'p'<<8 | '4'<<16 |
'a'<<24).

Of course, I'm not sure any of this can work, since I don't really
know anything about aac stream format. But it's worth a try. See what
you can do.

Rich



More information about the MPlayer-users mailing list