cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: RTSP not working with MediaHawk server

From: Christopher Conroy <cconroy_at_gmail.com>
Date: Wed, 1 Dec 2010 01:58:32 -0500

On Sun, Nov 28, 2010 at 1:56 PM, Andrius Didzbalis
<andrius.didzbalis_at_elsystems.lt> wrote:
> Hello,
>
> I've been trying to write my own RTSP client using libcurl. My
> application works fine when used with live555MediaServer, however I am
> not able to negotiate with MediaHawk VoD server correctly. The problem
> is with the DESCRIBE response - there is an extra '\r\n' after SDP. curl
> library returns this extra '\r\n' as a response to the next RTSP command
> (SETUP) and fails. The actual response to SETUP is returned prepended to
> TEARDOWN response if I issue one.
>
> Is this a bug in libcurl, mediahawk server or my program? If this is a
> bug in the server is there any way to work-around it using libcurl?
>
> I am using version 7.20.1 of libcurl. Below is the output I get:
>
> ----
>
> * About to connect() to 77.221.64.59 port 554 (#0)
> *   Trying 77.221.64.59... * connected
> * Connected to 77.221.64.59 (77.221.64.59) port 554 (#0)
>> OPTIONS rtsp://77.221.64.59/r1/priviet_martyske RTSP/1.0
> CSeq: 1
>
> < RTSP/1.0 200 OK
> < CSeq: 1
> < Date: 29 Nov 2010 01:38:03 GMT
> < Public: DESCRIBE, SETUP, PLAY, PAUSE, GET_PARAMETER, TEARDOWN
> < Server: MediaHawk
> < Content-Length: 0
> <
> * Connection #0 to host 77.221.64.59 left intact
> * Re-using existing connection! (#0) with host 77.221.64.59
> * Connected to 77.221.64.59 (77.221.64.59) port 554 (#0)
>> DESCRIBE rtsp://77.221.64.59/r1/priviet_martyske RTSP/1.0
> CSeq: 2
> If-Modified-Since: Thu, 01 Jan 1970 00:00:00 GMT
> Accept: application/sdp
>
> < RTSP/1.0 200 OK
> < CSeq: 2
> < Date: 29 Nov 2010 01:38:03 GMT
> < Content-Type: application/sdp
> < Content-Length:   235
> <
> * Connection #0 to host 77.221.64.59 left intact
> * Re-using existing connection! (#0) with host 77.221.64.59
> * Connected to 77.221.64.59 (77.221.64.59) port 554 (#0)
>> SETUP rtsp://77.221.64.59/r1/priviet_martyske RTSP/1.0
> CSeq: 3
> Transport: MP2T/H2221/UDP;unicast;client_port=0
> If-Modified-Since: Thu, 01 Jan 1970 00:00:00 GMT
>
> <
> * The CSeq of this request 3 did not match the response 0
> * Connection #0 to host 77.221.64.59 left intact
> * RTSP CSeq mismatch or invalid CSeq
>
> ---
>
> Thanks in advance for Your reply :)

Looks like a bug in the server. All the relevant code for determining
the message boundary via content-length is done in http.c (read: non
RTSP specific) and thus I'm inclined to blame the server here. I don't
know of any workarounds for such a bug off-hand.

-- 
Chris Conroy
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-12-01