简体   繁体   English

Android 4.0+上的多播RTP

[英]Multicast RTP on Android 4.0+

Android now has native RTP and Multicast APIs. Android现在具有本机RTP多播 API。 What about multicast and/or broadcast RTP? 那么多播和/或广播RTP呢? I didn't see anything in the the docs on how to enable this? 我没有在文档中看到有关如何启用此功能的任何内容? I'm interested in both client and server. 我对客户端和服务器都很感兴趣。

As far as I can tell, from a lot of research and testing with the android.net.rtp package, it is possible to send to a multicast address (audio) using AudioStream and AudioGroup , but if you try to use AudioStream.associate() with a multicast address, you will not receive anything. 据我所知,通过android.net.rtp包的大量研究和测试,可以使用AudioStreamAudioGroup发送多播地址(音频),但是如果你尝试使用AudioStream.associate()使用多播地址,您将不会收到任何内容。

I have opened a bug report for this on the Android issue tracker, here: https://code.google.com/p/android/issues/detail?id=61289 我已在Android问题跟踪器上针对此问题打开了错误报告,请访问: https//code.google.com/p/android/issues/detail?id = 61289

Bear in mind that many Android devices do not in fact support sending IGMP join packets to the network ( http://www.programmingmobile.com/2012/01/multicast-and-android-big-headache.html is one example of many pieces of information regarding this). 请记住,许多Android设备实际上并不支持将IGMP加入数据包发送到网络( http://www.programmingmobile.com/2012/01/multicast-and-android-big-headache.html就是众多设备中的一个例子。有关此事的信息)。

Because of this you will need to make sure your network infrastructure is set up to deliver multicast UDP packets to your device(s). 因此,您需要确保将网络基础结构设置为向设备提供多播UDP数据包。 Some networks allow static multicast groups to be set up on the switch/router/access point etc. 某些网络允许在交换机/路由器/接入点等上设置静态组播组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM