[FFmpeg-devel] [RFC] rtsp.c EOF support

Ronald S. Bultje rsbultje
Fri Feb 27 18:29:55 CET 2009


Hi,

attached set of patches allow EOS support in the RTSP demuxer. Please
let me know your thoughts.

The patches do the following:rtsp-move-read_reply.patch:
moves the RTSP message reply parsing out of rtsp_send_cmd() into its
own function

tcp-get_file_handle.patch:
implements tcp_get_file_handle(), similar to the udp/rtp variants

rtsp-tc-interleave-messages.patch:
adapts tcp_read_packet() and udp_read_packet() to use it. For tcp,
this now becomes the main way of reading packets. Instead of scanning
input for $ and discarding everything else, we read messages until we
see a $ and then parse the msg. This allows interleaved messages to be
parsed appropriately. For udp, we simply use tcp_get_file_handle() to
select() on that as well and parse any additional incoming messages
over the RTSP connection

rtp-eos-support.patch:
parses the X-Notice/Notice field in the RTSP messages, either ANNOUNCE
or SET_PARAMETER, which is used to announce EOS. rtsp_read_reply()
then parses the notice value to detect EOS and we return AVERROR_EOF
in rtsp_read_packet().

All together, this fixes the long-standing issue of not supporting
messages on the RTSP connection after the connection is initiated, and
adds EOS support as well. Please let me know whether you like these
features.

PS Luca could you please review the ASF header parsing patch (the
rtsp.c/h part of it) that I emailed you about?

Ronald
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtsp-move-read_reply.patch
Type: application/octet-stream
Size: 2461 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090227/0c13ebaf/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcp-get_file_handle.patch
Type: application/octet-stream
Size: 885 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090227/0c13ebaf/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtsp-tcp-interleave-messages.patch
Type: application/octet-stream
Size: 4302 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090227/0c13ebaf/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtsp-eos-support.patch
Type: application/octet-stream
Size: 2671 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090227/0c13ebaf/attachment-0003.obj>



More information about the ffmpeg-devel mailing list