Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

S60第三版中音频流的编码格式

From Wiki
Jump to: navigation, search
Article Metadata

文章
huwell 在 27 Nov 2007 创建
最后由 hamishwillee 在 15 Dec 2011 编辑
  • 设备, 软件 版本:

S60 3rd Edition


  • 详细描述

因为有了基于硬件编码(DSP)的DevSound,手机设备可以支持下列编码格式的流媒体播放。所有的S60第三版手机都支持下列硬件音频编码的流媒体播放:

FourCC  Type                       Description
 
" P16" (encoder+decoder) Uncompressed PCM 16-bit
 
" AMR" (encoder+decoder) AMR Narrow Band
 
Additionally, most Nseries and some Eseries devices support also the following:
 
"G711" (encoder+decoder) G.711
 
"G729" (encoder+decoder) G.729
 
"ILBC" (encoder+decoder) iLBC (internet Low Bitrate Codec)
 
" MP3" (decoder only) MPEG-1 Audio Layer 3 (MP3)
 
" AWB" (decoder only) AMR Wide Band
 
" AAC" (decoder only) Adv. Audio Coding (AAC)


  • 使用方法

在初始化音频流时我们使用一个fourCC码(TFourCC)来指定解码格式,例如在使用CMdaAudioInputStream时,当流格式成功打开后可以在MaiscOpenComplete进行如下操作:

void CMyAudioStreamer::MaiscOpenComplete( TInt aError )
 
{
 
if ( aError == KErrNone )
 
{
 
// Set the data type (encoding)
 
TRAPD(error, iInputStream->SetDataTypeL( TFourCC('G', '7', '1', '1')) );


  • 硬件编码配置

大部分编码在初始化时都定义了缺省配置,不需要额外操作。


但某些编码格式支持不同的解码模式,比如比特率或其他特性。对一个硬件编码来说,这些配置可以通过一个特定编码的自定义接口类来完成。我们可以从CMdaAudioXXXStream或CMMFDevSound的CustomInterface()方法获取一个该类实例的指针。这个指针被强制转换为特定编码的接口类型。


不过这些依赖硬件的接口无法作为S60 SDK的一部分被支持。如果项目中需要自定义配置的编码。开发者可以通过Nokia S60 API合作伙伴程序来使用这些自定义的接口。

This page was last modified on 15 December 2011, at 06:25.
291 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×