views:

247

answers:

2

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

A: 

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
shodanex
A: 

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.

J. Fritz Barnes