5

我是 android 编程新手,我需要有关 android RTP 编程的知识。问题

  1. 如何在 android 设备上捕获麦克风音频数据?
  2. 如何在不使用 API的情况下使用捕获的麦克风音频数据构造 RTP 数据包?
  3. 如何将 RTP 数据包传输到其他安卓设备?
  4. 如何在android中播放接收到的RTP数据包?
4

2 回答 2

2

For transmitting and receiving RTP packets, I would suggest looking into the jlibrtp library. Basically you initialize it with 2 DatagramSockets (one for sending RTP data and one for receiving RTCP data), define a payload type, add a recipient, and send byte arrays. I beleive it handles the RTP timestamps by itself, but you have to make sure you're payload is already formatted by the RFC reccommendations.

Here is an example of how you would set up an RTP session

于 2012-12-04T13:05:25.727 回答
1

你的问题的答案..

1.使用Android Media Api AudioRecord,如recording语音数据和AudioTrack语音playing数据,均为.pcm格式。

2.通过这个链接

3.你必须sip用于传输数据包。

4.通过这个链接

于 2012-09-29T07:39:03.107 回答