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

Luca Abeni lucabe72
Mon Oct 19 11:21:51 CEST 2009


Diego Biurrun wrote:
[...]
>>>>> - 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.
> 
> Let me refine my question: Why does it have to be part of the public
> API?

Because user applications might need to generate SDPs, and this (av_sdp_create())
is the most convenient interface...
For example, to use a muxer you would have to encode all the destination
addresses and ports in a singe string, and to parse such string in the
muxer. This would add complexity to both the caller and the library.


>>> 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).
> 
> Then the preprocessor condition used in sdp.c is wrong.
> CONFIG_RTP_MUXER means that it depends on the RTP muxer.

(note: in your previous email you were saying the opposite)

This is the current situation:
- the existence of av_sdp_create() does not depend on CONFIG_RTP_MUXER
   (it cannot depend on it, as it's part of the public API)
- the behaviour of av_sdp_create() depends on CONFIG_RTP_MUXER (if
   CONFIG_RTP_MUXER is not defined, av_sdp_create() fails)

I think the current #ifdeffery correctly represents this situation.


				Luca



More information about the ffmpeg-devel mailing list