[FFmpeg-devel] [PATCH/RFC] sdp/udp: Refactoring of code, don't require a ?multicast option

Martin Storsjö martin
Tue Oct 5 15:37:21 CEST 2010


Hi,

Currently, the sdp code requires the url to have a ?multicast option in 
order to produce a proper multicast SDP, even if none of the other 
protocol code requires such an option. The udp code checks the actual IP 
address to see if it is a multicast address or not.

In order for the sdp code to be able to do the same, some code needs to be 
moved out of udp.c for sdp.c to reuse it.

General question: What would a suitable place for the is_multicast_address 
be? We don't have any network.c yet, should we add one? We have a bunch of 
network code in os_support.c, but that's only fallbacks for missing system 
functions, not normal code as such. Patch #2 moves this to network.h, 
which probably isn't the right place.

And a question more precisely to Luca A: The solution in patch #3 isn't 
all that pretty, but to be able to make it prettier, sdp_get_address and 
resolve_destination would have to be merged. Would you be ok with that?

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Move-multicast-detection-fallback-code-to-network.h.patch
Type: text/x-diff
Size: 1401 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101005/0f2eb353/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Share-the-is_multicast_address-function.patch
Type: text/x-diff
Size: 2050 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101005/0f2eb353/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-sdp-Don-t-require-the-explicit-multicast-option.patch
Type: text/x-diff
Size: 2771 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101005/0f2eb353/attachment-0002.patch>



More information about the ffmpeg-devel mailing list