]> git.sesse.net Git - ffmpeg/commit
rtsp: Add support for depacketizing RTP data via custom IO
authorMartin Storsjö <martin@martin.st>
Tue, 1 Jan 2013 21:41:29 +0000 (23:41 +0200)
committerMartin Storsjö <martin@martin.st>
Thu, 3 Jan 2013 13:15:27 +0000 (15:15 +0200)
commite96406eda4f143f101bd44372f7b2d542183000a
tree736ef477e160701b05627f562bb533c83f0e26a5
parent3f95f0dda55fca74b646937095a02a8fa9776622
rtsp: Add support for depacketizing RTP data via custom IO

To use this, set sdpflags=custom_io to the sdp demuxer. During
the avformat_open_input call, the SDP is read from the AVFormatContext
AVIOContext (ctx->pb) - after the avformat_open_input call,
during the av_read_frame() calls, the same ctx->pb is used for reading
packets (and sending back RTCP RR packets).

Normally, one would use this with a read-only AVIOContext for the
SDP during the avformat_open_input call, then close that one and
replace it with a read-write one for the packets after the
avformat_open_input call has returned.

This allows using the RTP depacketizers as "pure" demuxers, without
having them tied to the libavformat network IO.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtpdec.c
libavformat/rtpdec.h
libavformat/rtsp.c
libavformat/rtsp.h
libavformat/version.h