RTSP协议栈的实现

发布于 2024-07-30 01:48:35 字数 628 浏览 5 评论 0原文

我正在努力使 RTSP url 在 Android 上工作。

  1. 我已经使用 MediaPlayerVideoView 来播放 RTSP url,但它们都无法在 G1 设备和模拟器中播放。 错误是 PVMFFailureiin PLAYER_INIT

  2. 所以我想到从头开始实现一个RTSP客户端。 我开发了一个小应用程序,它交换所有消息(描述、设置、播放、拆卸)。 但问题是在 PLAY 之后,我应该在 client_port 接收 RTP 数据包,如传输标头中所述,但 TCP 转储显示以下消息。 我认为 UDP 数据包即将到来,但应用程序未收到。

11:38:50.213394 IP ew-in-f177.google.com.6970> 192.168.1.2.6970:UDP,长度444 11:38:50.213451 IP 192.168.1.2> ew-in-f177.google.com:ICMP 192.168.1.2 udp 端口​​ 6970 无法访问,长度 36

请让我知道如何解决此问题。

I am working on making RTSP url to work on Android.

  1. I have used MediaPlayer and VideoView to play the RTSP url but both of them fail to play in G1 Device and emulator. Error is PVMFFailureiin PLAYER_INIT.

  2. So I thought of implementing a RTSP client from scratch. I have developed a small application, it exchanges all the messages (DESCRIBE, SETUP, PLAY, TEARDOWN). But the problem is after PLAY, I should receive the RTP packets at client_port as mentioned in Transport header but TCP dump shows the following messages. I think UDP packets are coming but not received at the application.

11:38:50.213394 IP ew-in-f177.google.com.6970 > 192.168.1.2.6970: UDP, length 444
11:38:50.213451 IP 192.168.1.2 > ew-in-f177.google.com: ICMP 192.168.1.2 udp port 6970 unreachable, length 36

Please let me know how to solve this issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

暗恋未遂 2024-08-06 01:48:36

OpenCORE,Android 中的多媒体引擎,对于遵守各种标准相当严格。 一些可能在野外工作的东西(例如,基于 RTSP 的 MP3)不受支持,因为它们不在各自的规范中。 至少,这就是我们被告知的。

因此,您尝试流式传输的媒体可能稍微超出规格,或者服务器稍微超出规格。 您可能希望尝试找到一些已知可在 Android 上运行的 RTSP 流,让您的播放器正确使用它,然后专注于让它使用您自己的流。

OpenCORE, the multimedia engine in Android, is rather stringent about sticking to various standards. Some things that may work in the wild (e.g., MP3 over RTSP) are not supported because they are not in the respective spec. Leastways, that's what we have been told.

Hence, it may be that the media you are trying to stream is slightly out of spec, or the server is slightly out of spec. You may wish to try to find some RTSP stream known to work on Android, get your player working right using it, then focus on getting it to consume your own streams.

何以畏孤独 2024-08-06 01:48:36

某些手机​​(我不知道 Android 是否属于此类)在设备上包含防火墙。 为了接收数据包,您可能必须执行打洞(即向服务器发送一个虚拟数据包)。这将在本地设备上运行的防火墙上创建允许规则。如果需要,它还将创建适当的 NAT 映射.)

设备是否在 WIFI 上或在运营商的网络(哪个运营商)上?

Some handsets (I don't know whether Android falls in this category or not) include a firewall on the device. In order to receive packets you may have to perform a hole punch (i.e. send a dummy packet to the server. This will create an allow rule on a firewall running on the local device. It will also create the appropriate NAT mapping if necessary as well.)

Is the device on WIFI or on the carrier's network (which carrier)?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文