Does android support APIs for implementing RTP,RTSP for VoIP and PTT Project?

自古美人都是妖i 提交于 2019-12-23 10:39:31

问题


I am going to make a PTT project on Android. Could you tell me how deep Android supports Voice and Multimedia API (such as RTP,RTSP,VoIP) for developers?


回答1:


MediaPlayer supports playing rtsp://.. URLs. Audio and Video are supported. Check media format support to see which codecs are supported.

MediaPlayer internally automatically handles RTSP and RTP, so there is not much you need to handle. OTOH it does not give any low-level control over this process.

About VoIP: Android only consumes RTSP/RTP streams, but does not create/publish them. So this is one-way only.

Android 2.3 (Gingerbread) is said to have support for SIP-based VoIP.




回答2:


Use AudioTrack\AudioRecord APIs for streaming audio recording and playback. They allow you to deal with raw audio frames.

RTP packets are pretty straightforward - it's just a packet that contains some minimal header data and a raw audio frame. It is easy to implement - check out SipDroid for a reference implementation of RTP packets.



来源:https://stackoverflow.com/questions/4416639/does-android-support-apis-for-implementing-rtp-rtsp-for-voip-and-ptt-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!