拆解:适合 RTSP 吗?

发布于 2024-07-12 07:34:34 字数 60 浏览 6 评论 0原文

当用户单击视频 (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 技术交流群。

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

发布评论

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

评论(3

蝶…霜飞 2024-07-19 07:34:34

我认为是的,没有其他“有保证”的方法来告诉服务器停止。
Quicktime 和 VLC 都是这样做的,我不知道其他客户端是否如此。
RFC 2326 的这个页面可以看到,建议使用 PAUSE 指令,但不建议使用必需的。 另外,它是为了暂停,而不是停止,所以是的,TEARDOWN 是正确的方法。

  method            direction        object     requirement
  DESCRIBE          C->S             P,S        recommended
  ANNOUNCE          C->S, S->C       P,S        optional
  GET_PARAMETER     C->S, S->C       P,S        optional
  OPTIONS           C->S, S->C       P,S        required
                                                (S->C: optional)
  PAUSE             C->S             P,S        recommended
  PLAY              C->S             P,S        required
  RECORD            C->S             P,S        optional
  REDIRECT          S->C             P,S        optional
  SETUP             C->S             S          required
  SET_PARAMETER     C->S, S->C       P,S        optional
  TEARDOWN          C->S             P,S        required

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.

  method            direction        object     requirement
  DESCRIBE          C->S             P,S        recommended
  ANNOUNCE          C->S, S->C       P,S        optional
  GET_PARAMETER     C->S, S->C       P,S        optional
  OPTIONS           C->S, S->C       P,S        required
                                                (S->C: optional)
  PAUSE             C->S             P,S        recommended
  PLAY              C->S             P,S        required
  RECORD            C->S             P,S        optional
  REDIRECT          S->C             P,S        optional
  SETUP             C->S             S          required
  SET_PARAMETER     C->S, S->C       P,S        optional
  TEARDOWN          C->S             P,S        required
月朦胧 2024-07-19 07:34:34

是的,这是合适的。

服务器应该为特定用户维护会话状态,它们不应该假设所有命令都来自同一个 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.

悲欢浪云 2024-07-19 07:34:34

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.

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