Mercurial > libavformat.hg
diff tcp.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 | 77e0c7511d41 |
children | 81c37b782fba |
line wrap: on
line diff
--- a/tcp.c Tue Mar 03 16:53:04 2009 +0000 +++ b/tcp.c Tue Mar 03 17:04:51 2009 +0000 @@ -181,6 +181,12 @@ return 0; } +static int tcp_get_file_handle(URLContext *h) +{ + TCPContext *s = h->priv_data; + return s->fd; +} + URLProtocol tcp_protocol = { "tcp", tcp_open, @@ -188,4 +194,5 @@ tcp_write, NULL, /* seek */ tcp_close, + .url_get_file_handle = tcp_get_file_handle, };