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

Michael Niedermayer michaelni
Fri Feb 27 19:29:39 CET 2009

On Fri, Feb 27, 2009 at 12:29:55PM -0500, Ronald S. Bultje wrote:
> 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?


> Index: ffmpeg-svn/libavformat/avio.h
> ===================================================================
> --- ffmpeg-svn.orig/libavformat/avio.h	2009-02-21 09:39:45.000000000 -0500
> +++ ffmpeg-svn/libavformat/avio.h	2009-02-27 08:54:57.000000000 -0500
> @@ -384,4 +384,7 @@
>  int udp_get_local_port(URLContext *h);
>  int udp_get_file_handle(URLContext *h);
> +/* tcp.c */
> +int tcp_get_file_handle(URLContext *h);
> +
>  #endif /* AVFORMAT_AVIO_H */

1. missing prefix
2. id prefer a generic way to get a file handle, dont we have one?
3. as is this does not belong in a public header

the other patches dont touch anything maintained by me, so expect no review
from me for them

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090227/4491dcd1/attachment.pgp>

More information about the ffmpeg-devel mailing list