[Ffmpeg-devel] RTP patches & RFC

Michael Niedermayer michaelni
Mon Oct 9 17:38:21 CEST 2006


Hi

On Mon, Oct 09, 2006 at 05:11:42PM +0200, Luca Barbato wrote:
[...]
> > 
> > 3) My sdp parsing code uses a few functions from rtsp.c: redir_isspace,
> > skip_spaces, and get_word_sep.  These are all small functions, but I
> > hate duplicating code. What's the best solution for this?  Make those
> > functions non-static in rtsp.c?

yes


[...]
> > 5) My code in rtp_h264 uses linked lists.  It creates packets, copies
> > stuff into them, resizes them, etc.  It means at best 2 copies per
> > packet (from the UDP buffer, to my packet, to the AVPacket), and at
> > worst it could be many copies (I have to aggregate all of the packets
> > for a given timestamp together).  My philosophy is "get it working, then
> > make it fast.".  Are these acceptable issues?  I could keep a pool of
> > packets around, but the payloads are various sizes.  Alternatively could
> > set it up the way tcp handles it's streams, but that's a lot of pointer
> > overhead and room for error.
[...]
> Can't you put some of this part in the framer layer?

framer == AVParser (so you have a chance to find it ...)

anyway, code which does unneeded memcpies when they can be avoided easily
will be rejected
and i dont understand why you need 2 copies, just have a few AVPackets (one
for each frame) and get_buffer() the data into them
if the final size isnt known (missdesigned protocoll ...) then you need
some av_realloc() for out of order packets which IMO should be rare
memcpy() should be fine

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

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list