diff http.c @ 4640:b34d9614b887 libavformat

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.
author rbultje
date Tue, 03 Mar 2009 17:04:51 +0000
parents e04458242c54
children 1d5f8836c8a8
line wrap: on
line diff
--- a/http.c	Tue Mar 03 16:53:04 2009 +0000
+++ b/http.c	Tue Mar 03 17:04:51 2009 +0000
@@ -345,6 +345,13 @@
     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 @@
     http_write,
     http_seek,
     http_close,
+    .url_get_file_handle = http_get_file_handle,
 };