[FFmpeg-devel] [RFC] protocol API vs SCTP

Luca Barbato lu_zero
Mon Mar 29 12:23:42 CEST 2010


I started working in adding sctp-rtp support in ffmpeg, the RTSP part
was quite easy then I started hacking the network layer and found a
small annoying problem. SCTP support a way to tag single packets with a
stream_id, the sctp rtp support uses that to interleave all the rtp and
rtsp streams and thus requiring a single port per connection.

Since the extended sctp api for recv delivers this information as a
separate struct and you cannot say you want to receive just one
stream_id I'm thinking which way would be better:

- double buffer in the protocol context somehow and register the
protocol per stream_id (probably overly complicated)
- register per ip:port and return the buffer with the stream_id/all the
extended information prepended to the actual buffer (quite simple but a
bit ugly)
- register per ip:port and put the extended info in a private field in
the context and fetch it (simple as well, maybe less ugly)

I'd got with the third way, not sure if would be better provide an
accessor like the one we have for fetch the fd or just directly fetch it.

lu


-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero




More information about the ffmpeg-devel mailing list