如何强制客户端将 RTP 传输从 UDP 切换到 TCP? [英] How to force client to switch RTP transport from UDP to TCP?

查看:65
本文介绍了如何强制客户端将 RTP 传输从 UDP 切换到 TCP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果客户端想要观看我的 RTSP 服务器上的流,它首先尝试通过 UDP 协议设置流.我怎么能告诉它我的服务器只支持 RTP/AVP/TCP 并且它应该切换传输?

If the client wants to watch a stream that is on my RTSP server, it first tries to setup a stream through the UDP protocol. How can I tell it that my server only supports RTP/AVP/TCP and that it should switch transports?

我想终止我服务器上的 UDP 支持,但所有客户端首先尝试通过 UDP 设置会话,然后他们通过 TCP 设置......我想尽快将它们切换到 TCPRTSP 协议.

I want to terminate the UDP support on my server, but all the clients first try to SETUP the session over UDP, and later they do so over TCP... and I want to switch them to TCP as soon as possible in RTSP protocol.

我该怎么做?

推荐答案

OK 一种方法是发送400 Bad Request"作为对客户端 SETUP 请求的响应......它会自动切换到 TCP 协议.这适用于 RealOne 和 QuickTime.

OK one way is to send "400 Bad Request" as the response to the client's SETUP request... and it automatically switches to TCP protocol. This is for RealOne and QuickTime.

但我不确定它是否适用于所有其他玩家,因为这是一个 hack.

But I am not sure that it will work on all other players since this is a hack.

还有其他想法吗?=|

这篇关于如何强制客户端将 RTP 传输从 UDP 切换到 TCP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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