[FFmpeg-soc] [RFC] rtsp http tunneling implementation

Martin Storsjö martin at martin.st
Sat May 29 11:09:19 CEST 2010


On Fri, 28 May 2010, Josh Allmann wrote:

> Since RTSP over HTTP basically involves a few http request-replies and
> base64-encoding RTSP into a HTTP POST, I have the following thoughts:
> 
> -Add HTTP as a lower transport mechanism in rtsp.c

IMO, it isn't a lower transport mechanism, since it's orthogonal to them. 
You can run the RTSP session either as normal, or tunneled over HTTP - and 
in both cases you can send the RTP packets over UDP or interleaved in the 
RTSP session.

> To do this we need to signal to http.c to add the "x-sessioncookie"
> header when it is required. I was thinking of adding a new field to
> HTTPContext for this, and setting it via a flag passed to http_open
> (eg, URL_WRONLY | URL_RTSP ).

Hmm, yes. I'm not sure if this is the correct approach, though, ideally 
there would be a way to pass custom HTTP headers, but I don't know 
off-hand what the best way to do that would be. I don't think a global 
URL_RTSP flag will be accepted, though, or anything else that ties the 
http protocol specifically to rtsp.

> bikeshed: There is some weirdness in the spec, eg it mandates HTTP/1.0
> but uses 1.1-specific headers such as cache-control (albeit
> optionally). Adding configurable http/1.{0,1} to http.c seems more
> trouble than it's worth (we send out 1.1 requests at present) -- feng
> handles 1.1 requests fine. Haven't tried DSS though.

Make sure you test DSS sometimes along the way, at least.

// Martin


More information about the FFmpeg-soc mailing list