From f0a80394645ce436307d3d458878689411a44ba7 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" <rsbultje@gmail.com> Date: Tue, 3 Mar 2009 17:04:51 +0000 Subject: Add url_get_file_handle(), which is used to get the file descriptor associated with the I/O handle (e.g. the fd returned by open()). See "[RFC] rtsp.c EOF support" thread. There were previously some URI-specific implementations of the same idea, e.g. rtp_get_file_handles() and udp_get_file_handle(). All of these are deprecated by this patch and will be removed at the next major API bump. Originally committed as revision 17779 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/http.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libavformat/http.c') diff --git a/libavformat/http.c b/libavformat/http.c index 039ef7bbc5..d904e7a1e8 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -345,6 +345,13 @@ static int64_t http_seek(URLContext *h, int64_t off, int whence) return off; } +static int +http_get_file_handle(URLContext *h) +{ + HTTPContext *s = h->priv_data; + return url_get_file_handle(s->hd); +} + URLProtocol http_protocol = { "http", http_open, @@ -352,4 +359,5 @@ URLProtocol http_protocol = { http_write, http_seek, http_close, + .url_get_file_handle = http_get_file_handle, }; -- cgit v1.2.3