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

Luca Abeni lucabe72
Sun Oct 18 20:34:27 CEST 2009


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.

Now, exporting a function only if the RTP muxer is enabled in configure
is not an option (because the API cannot depend on configure). The
current implementation is the one which was preferred when the SDP
generator was committed (there was some discussion about using
"if(CONFIG_RTP_MUXER)" instead of "#ifdef", but at the end this version
was considered better). 

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.

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).


			Luca




More information about the ffmpeg-devel mailing list