views:

242

answers:

1

I need to be able to play an encrypted file in Android.

The file is AAC.

The only way I can see to do this is either:

  1. decrypt the file to internal private storage and point the player at that file to play, or
  2. decrypt & decode the file to pcm and feed it to an AudioTrack.

1 isn't great because it takes a long time to do that.
2 isn't great either because I don't know how I can take advantage of the HW decoder to do this.

Any ideas?

tia.

A: 

Well I think Android does not support .AAC format.

 3GPP (.3gp) and MPEG-4 (.mp4, .m4a). No support for raw AAC (.aac)

but you could change the file playerdriver.cpp inside the Android OpenCORE the following line::

mDataSource->SetDataSourceFormatType(PVMF_FORMAT_UNKNOWN); 

to

mDataSource->SetDataSourceFormatType(PVMF_AACFF); 

then you could play your AAC file =)

Jorgesys
Note that this solution requires creating your own Android firmware.
CommonsWare
sorry, I meant a .M4A file, the problem is not playing an unencrypted version, the problem is playing an encrypted version. I need for the media player to take an InputStream.
creating your own Android firmware - ug. seriously? there's got to be a way to do it... what about re-encrypting the file into a native DRM that the android system knows about? is DRM basically out for android or what? seems like a pretty severe limitation...