summaryrefslogtreecommitdiff
path: root/libavformat/avio.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2009-03-03 17:04:51 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2009-03-03 17:04:51 +0000
commitf0a80394645ce436307d3d458878689411a44ba7 (patch)
tree78da33e8ec44b8767300dcf5fca4b3e6213fbdd4 /libavformat/avio.c
parent2fea965070a96a04a46513cc524ac4cfcf622fd8 (diff)
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
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r--libavformat/avio.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 011bc8808b..b7d3c23ac8 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -206,6 +206,13 @@ int64_t url_filesize(URLContext *h)
return size;
}
+int url_get_file_handle(URLContext *h)
+{
+ if (!h->prot->url_get_file_handle)
+ return -1;
+ return h->prot->url_get_file_handle(h);
+}
+
int url_get_max_packet_size(URLContext *h)
{
return h->max_packet_size;