Alice_I_W
Alice_I_W

Reputation: 21

Teardown: Appropriate in RTSP?

Is it appropriate to send TEARDOWN when user clicks on the stop-button in a video (RTSP )streaming session? If not then why??

Upvotes: 2

Views: 4811

Answers (3)

ciphor
ciphor

Reputation: 8288

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.

Upvotes: 0

J. Fritz Barnes
J. Fritz Barnes

Reputation: 928

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.

Upvotes: 1

shodanex
shodanex

Reputation: 15446

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

Upvotes: 1

Related Questions