[FFmpeg-devel] [PATCH] fix sdp(file) vs rtsp dep

Luca Abeni lucabe72
Sun Oct 18 23:01:13 CEST 2009


On Sun, 2009-10-18 at 20:55 +0200, Diego Biurrun wrote:
> On Sun, Oct 18, 2009 at 08:34:27PM +0200, Luca Abeni wrote:
> > On Sun, 2009-10-18 at 12:59 +0200, Diego Biurrun wrote:
> > [...]
> > > All of the RTP/SDP/RTSP code seems to be in for a great refactoring.
> > > For example:
> > > 
> > > - sdp.o is not compiled conditionally and is enclosed in
> > >   '#if CONFIG_RTP_MUXER'.  This should be done in the Makefile instead
> > >   and the file should be called rtp.o if that's what it implements.
> > This is a different thing, I think: sdp.c exports a public function
> > called avf_sdp_create(). If the RTP muxer is not compiled in, such
> > function fails.
> 
> I have seen this.  What is the function good for?

It generates an SDP description of an RTP session.


> > If you want to move the logic in the Makefile, I can create a new
> > sdp-dummy.c file, containing
> > int avf_sdp_create(AVFormatContext *ac[], int n_files, char *buff, int
> > size)
> > {
> >     return AVERROR(ENOSYS);
> > }
> > and modify the makefile to compile sdp-dummy when the RTP muxer is not
> > enabled... But I do not see it as a cleaner or simpler solution.
> > 
> > And I can also rename sdp.c to rtp.c or something else, but that would
> > be very confusing, because the file really implements an SDP generator.
> 
> Then the ifdef in that file is wrong and should be CONFIG_SDP_MUXER
> instead.

Well, the point is that we have no SDP muxer. There has been some
discussion about it, and I arrived to the conclusion that the muxer
interface is not well suited for the SDP generator, and avf_sdp_create()
is more flexible and convenient to use.

> If the RTP muxer depends on this, declare that dependency in
> configure.

There is no such dependency: the RTP muxer can work even without an SDP
generator (assuming the SDP has been previously generated, or is
generated in some other way).


> > Now, I can check if the "#ifdef CONFIG_RTP_MUXER" is still needed after
> > the RTP split I committed some time ago... Maybe we can avoid such an
> > ifdef (at the cost of increasing the library size when the RTP muxer is
> > disabled).
> 
> Please check.

Ok; it's now officially on my (not so short :) todo list.


				Luca




More information about the ffmpeg-devel mailing list