RTSP客户端在Android中 [英] RTSP Client in Android

查看:231
本文介绍了RTSP客户端在Android中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

同样的问题可能已经问,但我没有找到任何可用的解决方案给我。

The same question might have been asked but I didn't find any solutions available for me.

我想在Android的播放RTSP流和服务器是达尔文流媒体服务器。现在,我已经试过VideoView和MediaPlayer的,这两者总是工作正常,当我使用3G,但是有问题,当我用WIFI有的时候,特别是当我用wifi我的工作场所,并在LogCat中的错误:

I'm trying to play RTSP stream in android and the server is Darwin streaming server. For now I’ve tried VideoView and MediaPlayer, both of which always work fine when I use 3G but have problems when I use Wifi sometimes, specifically when I use Wifi at my workplace, and the error in LogCat:

PlayerDriver(31):缓冲(0)

我用Google搜索周围,猜测原因可能有WiFi热点的是在防火墙后面,使用UDP端口被阻塞,而媒体的OpenCore框架仅支持RTP在UDP上。纠正我,如果我错了。

I have googled around and guess the reason maybe the Wifi hotspot is behind the firewall and the UDP port is blocked, and the Opencore media framework only supports RTP over UDP. Correct me if I am wrong.

那么,这里是我的问题,我怎么能解决这个问题,如果我不能改变防火墙的情况。如果使用的是内置的VideoView / MediaPlayer的是不可能的,那该怎么写我自己的RTSP客户端。

Then, here is my question, how can I solve it if i cannot change the firewall situation. If using the build-in VideoView/MediaPlayer is not possible, then how to write my own rtsp client.

任何建议将AP preciated:)

Any suggestion will be appreciated:)

在此先感谢!

博尔顿

推荐答案

我不认为你可以做很多这... ...这是我的想法:

I don't think that you can do much with this... Heres my idea:

请将在同一个局域网的Darvin启动一个应用程序,那么它会得到的Darvin的RTP流肚里通过UDP(局域网),然后传输通过TCP广域网,这样你就可以访问它。您可以轻松地用C#该应用程序......,它会很好地工作。或者,如果你有一些Linux发行版,你可以写,将使用NC做同样复杂的Bash脚本...

Make an app that will be started in the same LAN as Darvin, then it will get Darvin's RTP stream which goes over UDP (in LAN) and then transmit that over TCP to WAN, so you can access it. You can easily write that app in C#... and it will work perfectly. Or if you have some Linux distro, you can write a complex Bash script that will use NC to do the same...

因此​​,这是基本的想法:

So this is basically the idea:

这篇关于RTSP客户端在Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆