拆解:适合 RTSP 吗?
当用户单击视频 (RTSP) 流会话中的停止按钮时发送 TEARDOWN 是否合适? 如果不是那为什么?
Is it appropriate to send TEARDOWN when user clicks on the stop-button in a video (RTSP )streaming session?
If not then why??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为是的,没有其他“有保证”的方法来告诉服务器停止。
Quicktime 和 VLC 都是这样做的,我不知道其他客户端是否如此。
从 RFC 2326 的这个页面可以看到,建议使用 PAUSE 指令,但不建议使用必需的。 另外,它是为了暂停,而不是停止,所以是的,TEARDOWN 是正确的方法。
I think it is, there is no other "guaranteed" way to tell the server to stop.
Both Quicktime and VLC do it that way, I don't know for the other client.
As you can see from this page of RFC 2326, the PAUSE directive is recommended but not required. Plus it is for pausing, and not stopping so yes, TEARDOWN is the right way to go.
是的,这是合适的。
服务器应该为特定用户维护会话状态,它们不应该假设所有命令都来自同一个 TCP 连接,而是提供在第一个 SETUP 回复发送到客户端时创建的 sessionid。 随后的所有请求都应包含 sessionid(也有例外)。 通过发送 TEARDOWN 请求,客户端向服务器表明它可以释放与该用户关联的所有状态。
PAUSE只会指示服务器停止发送数据包,而不会释放与该会话关联的状态。
Yes, it is appropriate.
Servers are supposed to maintain a session state for a particular user, they are not supposed to assume that all commands will come from the same TCP connection but rather provide a sessionid that is created when the first SETUP reply is sent to the client. All requests following that should include the sessionid (there are exceptions). By sending the TEARDOWN request, the client is indicating to the server that it can release all state associated with that user.
PAUSE would only instruct the server to stop sending packets, not to release the state associated with that session.
rtsp 客户端软件拆除媒体会话的行为有多种实现方式。
Realplayer 将在 TEARDOWN 之前发送 PAUSE。
Quicktime Player 和 VLC 将在不暂停的情况下发送 TEARDOWN。
我认为两者都可以接受。
The behavior of rtsp client software to teardown the media session has multiple implementations.
Realplayer will send PAUSE before TEARDOWN.
Quicktime Player and VLC will send TEARDOWN without PAUSE.
I think both one are acceptable.