[FFmpeg-devel] [RFC] rtsp.c EOF support

Michael Niedermayer michaelni
Fri Feb 27 22:17:46 CET 2009


On Fri, Feb 27, 2009 at 02:56:46PM -0500, Ronald S. Bultje wrote:
> 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.

sounds acceptable
the old ones need to be deprecated and put under #if VERSION <
though 


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090227/0e6e8d29/attachment.pgp>



More information about the ffmpeg-devel mailing list