SIP API媒体编解码器 [英] SIP API media codecs
问题描述
我正在尝试使用SIP API(在Android 2.3或更高版本中提供)开发android应用程序。我想知道此API支持哪些音频编解码器和视频编解码器?该API是否具有允许配置/选择编解码器的工具?请帮助我。
I am trying to develop an android application with SIP API (provided in Android 2.3 or higher). I want to know which audio codecs and video codecs does this API supports ? does this API have any tools allowing to configure/choose codecs ? please help me.
推荐答案
我想知道此API支持哪些音频编解码器和视频编解码器?
I want to know which audio codecs and video codecs does this API supports?
您可以从文档本身获取受支持的编解码器列表,请检查 AudioCodec 。
You can get supported codec list from docs itself, check AudioCodec.
这些是:
- PCMU
- PCMA
- GSM_EFR
- GSM
- AMR
- PCMU
- PCMA
- GSM_EFR
- GSM
- AMR
此API是否具有允许使用的任何工具配置/选择编解码器?
does this API have any tools allowing to configure/choose codecs ?
您可以使用与SIP和RTP相关的API。 android.net.rtp
包含 AudioStream
, AudioGroup
和易于使用的 AudioCodec
类。这些中的最后一个允许您选择所需的编解码器。
you could use the APIs related to the SIP and RTP. android.net.rtp
contains the AudioStream
, AudioGroup
and AudioCodec
classes that are easy to use. The last of these allows you to choose the codec which you want.
您可以按照上面的链接创建编解码器:
You can create codec as given in above link:
AudioCodec codec = AudioCodec.getCodec(100, "AMR/8000", "mode-set=1");
然后,您可以将此编解码器设置为 AudioStream 使用 setCodec(codec)
方法。
Then you can set this codec to your AudioStream using setCodec(codec)
method.
这篇关于SIP API媒体编解码器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!