[FFmpeg-devel] [RFC] rtsp.c EOF support
Ronald S. Bultje
rsbultje
Fri Feb 27 20:56:46 CET 2009
Hi Michael,
On Fri, Feb 27, 2009 at 1:29 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> 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
Thanks for the comment. I was actually wondering the same thing,
forgot to mention it, it'd be nice to be able to get a file handle
using generic API indeed. This does currently not exist.
Here's what I know:
- there's three protocols for which it's implemented (including my
patch): UDP, RTP (2x UDP, one for RTP and one for RTCP) and TCP
- it could be implemented for HTTP (=TCP), file:// etc. as well but is
currently unused
- you'd need an API that can return more than one integer, since RTP
for example has two integers, not one
- udp/rtp also don't have a prefix :-) and are also declared (in fact,
right above this insert) in avio.h :-), so I'd have to fix all of them
(and prefix them)
I could implement a function int av_get_file_handle(URLContext*); and
just keep rtp_get_file_handles() as is (since RTP is the only one
returning two fds). would that be OK? Then after that, I can keep this
tidbit into avio.h as public API.
Ronald
More information about the ffmpeg-devel
mailing list