[FFmpeg-devel] Adding an SDP generator to libavformat
Luca Abeni
lucabe72
Thu May 31 15:33:31 CEST 2007
Hi all,
I am thinking about the best way to integrate an SDP generator in
libavformat (I already have some working code for generating SDPs, which
works for MPEG{1,2,4} video and MPEG1 audio, but it is not well
integrated with ffmpeg).
ffserver already contains a (very very basic) SDP generator, in
prepare_sdp_description(), and a comment says "move that to rtsp.c, but
would need to replace FFStream by AVFormatContext".
Writing a function that gets an AVFormatContext and produces an SDP
would not be difficult, and I can easily modify ffserver to call it. But
I think such function would have a lot of limitations (which are not
really important for ffserver's usage, but would create problems when
using this function in different contexts). For example, an SDP is
composed by some "session level" lines (which are valid for all the
media streams) and some "media level" lines. The "c=" line (indicating
the destination IP address for a stream) can be either "session level"
(all the media streams are directed to the same IP address or multicast
group) or "media level" (some media streams are sent to a different
multicast group). An AVFormatContext can only contain a "session level"
destination address (in the file name), so I believe that an SDP
generation function which accepts an AVFormatContext as an input would
not flexible enough...
I would be tempted to define an SDPContext structure which can contain a
good description of an SDP, and to use it as an input for the SDP generator.
Does anyone have better ideas? And, more important: do people think that
this kind of functionality would be useful in libavformat? If I prepare
a patch implementing it, would the patch be accepted?
Thanks,
Luca
More information about the ffmpeg-devel
mailing list