[Live-devel] Advice on per-message connection in RTSPClient & RTSPServer?

xcsmith at rockwellcollins.com xcsmith at rockwellcollins.com
Sun Nov 19 20:04:10 PST 2006


Hello!

My colleagues have implemented an RTSP client which makes one TCP
connection per request/response transaction.  This client is the same as
your RTSPClient, except that it calls openConnectionFromURL() at the start
of each request and resetTCPSockets() at the end of each request.  The
client was tested against testOnDemandRTSPServer first with LIVE 2006.8.26
and  then with LIVE 2006.11.16.a and received the same output.  When a PLAY
message is sent, the server responds with 405 "Method Not Allowed."
However, the server response says that PLAY is allowed. Does the LIVE
RTSPServer assume that a TCP disconnect means the client is gone?  If so,
do you have any advice on how to change the server so that it will destroy
the session only when the client sends TEARDOWN or fails to note liveness
with OPTIONS?

Also I've noted in RFC2326 page 27:

For the scheme "rtsp", a persistent connection is assumed,
   while the scheme "rtspu" calls for RTSP requests to be sent without
   setting up a connection.

So, is it correct to use "rtsp" (and not "rtspu") for this?

I've included debug messages from the older version of LIVE.  Sorry I was
not sent the messages from the newer one, but I'm assured the result is the
same.

Thanks!
~Medra


** TCP Connect **
             OPTIONS rtsp://192.168.1.100:8554/mpeg2TransportStreamTest
RTSP/1.0
             CSeq: 1
             User-Agent: M:\openRTSP.exe (LIVE555 Streaming Media
v2006.08.26)

             RTSP/1.0 200 OK
             CSeq: 1
             Date: Thu, Nov 16 2006 09:22:32 GMT
             Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
** TCP Disconnect **

** TCP Connect **
             DESCRIBE rtsp://192.168.1.100:8554/mpeg2TransportStreamTest
RTSP/1.0
             CSeq: 2
             Accept: application/sdp
             User-Agent: M:\openRTSP.exe (LIVE555 Streaming Media
v2006.08.26)

             RTSP/1.0 200 OK
             CSeq: 2
             Date: Thu, Nov 16 2006 09:22:32 GMT
             Content-Base:
rtsp://192.168.1.100:8554/mpeg2TransportStreamTest/
             Content-Type: application/sdp
             Content-Length: 393
             o=- 1163668227008757 1 IN IP4 192.168.1.100
             s=Session streamed by "testOnDemandRTSPServer"
             i=mpeg2TransportStreamTest
             t=0 0
             a=tool:LIVE555 Streaming Media v2006.08.26
             a=type:broadcast
             a=control:*
             a=range:npt=0-
             a=x-qt-text-nam:Session streamed by
"testOnDemandRTSPServer"
             a=x-qt-text-inf:mpeg2TransportStreamTest
             m=video 5900 RTP/AVP 33
             c=IN IP4 192.168.1.100
             a=control:track1
** TCP Disconnect **

** TCP Connect **
             SETUP
rtsp://192.168.1.100:8554/mpeg2TransportStreamTest/track1 RTSP/1.0
             CSeq: 3
             Transport: RTP/AVP;unicast;client_port=5900-5901
             User-Agent: M:\openRTSP.exe (LIVE555 Streaming Media
v2006.08.26)

             RTSP/1.0 200 OK
             CSeq: 3
             Date: Thu, Nov 16 2006 09:22:32 GMT
             Transport:
RTP/AVP;unicast;destination=192.168.1.104;client_port=5900-5901;server_p
ort=6970-6971
             Session: 11
** TCP Disconnect **

** TCP Connect **
             PLAY rtsp://192.168.1.100:8554/mpeg2TransportStreamTest
RTSP/1.0
             CSeq: 4
             Session: 11
             Range: npt=0.000-
             User-Agent: M:\openRTSP.exe (LIVE555 Streaming Media
v2006.08.26)

             RTSP/1.0 405 Method Not Allowed
             CSeq: 4
             Date: Thu, Nov 16 2006 09:22:32 GMT
             Allow: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
** TCP Disconnect **

** TCP Connect **
             TEARDOWN rtsp://192.168.1.100:8554/mpeg2TransportStreamTest
RTSP/1.0
             CSeq: 5
             Session: 11
             User-Agent: M:\openRTSP.exe (LIVE555 Streaming Media
v2006.08.26)

             RTSP/1.0 405 Method Not Allowed
             CSeq: 5
             Date: Thu, Nov 16 2006 09:22:32 GMT
             Allow: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE
** TCP Disconnect **



More information about the live-devel mailing list