From: Dan C. <da...@us...> - 2002-12-16 12:59:31
|
Hi, I've been considering writing a native Mac OS X output module for MPlayer - I had a feeling that the SDL plugin added some unnecessary overhead. Currently, I'm researching, trying to gather as much info as possible and trying to find some code that does the job - I know nothing of Apple programming. In this process I stumbled upon some _very_ interesting information: Mac OS X is capable of decoding MP3, AAC and AC-3 internally, or at least so it seems. And it also supports internal resampling. Thus, once an output module is complete, it should be possible to write at least a hardware AC-3 output module for MPlayer. This might free enough resources to make MPlayer almost as fast as VLC or Quicktime. In a week or so, I may find the time to begin coding, but I thought I'd tell you what I was up to :) Since I haven't really written anything yet, I thought I'd keep it out of the MPlayer mailing lists. Having hardware 5.1-channel AC-3 decoding wouldn't be all that bad though. Hopefully, slighter faster sound will make MPlayer fast enough to play most 640-width DivX-movies on my 400MHz iMac DV. The next step if this is ever finished would be writing a native video out, but that seems very difficult. SDL doesn't seem like it's hardware accelerated at all... The more I use MPlayer, the more I get impressed by it's potential. - Dan Reference: CoreAudioTypes.h, look for kAudioFormatLinearPCM and the more interesting ones below it: </System/Library/Frameworks/CoreAudio.framework/Versions/A/Headers/ CoreAudioTypes.h> Mac OS X supports internal decoding of AC-3 and MP3: <http://developer.apple.com/techpubs/macosx/Darwin/IOKit/DeviceDrivers/ Audio/WritingAudioDrivers/AudioOnMacOSX/_Mac_OS_X_A_apabilities.html> Even my bloody old iMac DV decodes AC-3 in hardware: <http://developer.apple.com/techpubs/hardware/Developer_Notes/ Macintosh_CPUs-G3/iMac_Aug00/iMac.pdf> A native output patch for mpg123, decreases CPU load from 11-13% to 9-11%: <http://sourceforge.net/projects/mosx-mpg123/> Yet another interesting link: <http://techweb.rfa.org/pipermail/portaudio/2002-August/001122.html> |