cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Re: RTSP support

From: Chris Conroy <Chris.Conroy_at_hillcrestlabs.com>
Date: Fri, 13 Nov 2009 18:17:52 -0500

On Fri, 2009-11-13 at 23:24 +0100, Daniel Stenberg wrote:
> RTSP is very similar to HTTP. We need to figure out exactly how similar, and
> quite likely we should add RTSP as a some kind of extension to HTTP so that
> they can share as much code as possible. Of course we should make
> RTSP-specific stuff in a separate file/functions and the same goes for the
> non-RTSP parts of HTTP.

Indeed, their similarity is the major driving reason why I think cURL is
a good target for this code.

Here's an overview of the key high level differences as I see them, most
of which you probably already know:

-Commands are different: Rather than the HTTP verbs, there are RTSP
verbs like PLAY, PAUSE, SETUP, TEARDOWN, etc.. The logic for all of this
would be RTSP specific.

-RTSP is 'stateful': This mainly affects server implementations. On the
client side, a session identifier must be maintained.

-Commands use a monotonically increasing sequence number CSeq

-Server can send commands: When a persistent connection is used, the
server can request that the client do something (REDIRECT/ANNOUNCE).
This is not applicable if the client does not support persistent
connections, however.

-Different Headers: Though RTSP shares some of the HTTP headers like
Accept-Encoding, it also has its own set of headers for various media
functions. We'll need a different set of header logic for RTSP.

-Different Status Codes: Likewise with headers, though RTSP shares some,
it has its own set of status codes.

-RTP can be interleaved: We'll need to either not support this or detect
and hand off the RTP packets to the application.

-Chunked coding is not permitted

>
> The best way to proceed with adding a new protocol, is to implement a test
> server for it so that you can write up test cases for the curl test suite that
> runs tests against the server and you can see that it behaves correctly.
> Again, possibly the existing HTTP test server can be expanded to also support
> RTSP.
> Code-wise, a protocol is written in a new source file with a struct
> Curl_handler instance (or several like if there's a SSL version etc) and you
> add protocol bit(s) in the CURLPROTO_* style in include/curl/curl.h, default
> ports (PROT_* defines) in lib/urldata.h and some version_info() magic into
> lib/version.c.
Thanks. I'll definitely be familiarizing myself with these pieces
shortly.

>
> For more, just ask!

Will do. I won't be working much (if at all) on this over the weekend,
but I should have more questions/comments early next week.

--Chris
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-14

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET