[MPlayer-dev-eng] Support for Source Specific Multicast

Jerome Duval jeromed at bluestreaktech.com
Fri Jul 2 23:21:55 CEST 2010


Hello all,
I'm interested in using Source Specific Multicast in mplayer. Looking through the code it seems unsupported and based on the VLC code, it should be fairly easy to implement (basically passing an extra option or two when setting up the socket).

I was wondering a few things before I start writing my patch. The usual syntax for source specific multicast is udp://1.2.3.4@5.6.7.8:9. Currently, url_new (in stream/url.c) interprets the command as user=1.2.3.4, host =5.6.7.8 and port=9. udp_open_socket (in stream/udp.c) then uses the host and port to setup the socket, ignoring the username completely. So the questions:

1- Should I modify url_new to correctly parse the syntax? If so, the following questions come to mind:
1.a- I have no knowledge of a raw udp socket requiring a username and the fact that it is ignored would seem to support this. Does anyone know of a case where this would be required?
1.b- Should this be limited to udp only? It seems to me tcp is in the same boat, though I have not actually looked at that code (since it does not concern my specific issue).
1.c- Is there a specific guideline to modifying the URL_t struct? I was thinking of adding a char* group_address member at the end of the struct. That seems a little wasteful to only be used by only one protocol, but then I come from the world of embedded devices where space is at a premium :)
1.d- Is this a separate patch from modifying udp_open_socket?

2- The code to reuse sockets was "commented out" in the original source (int reuse_socket=0). I assume this is to make compilation on systems that do not have SO_REUSEADDR easier. Should I use the same approach when implementing support for MCAST_JOIN_SOURCE_GROUP?

Jerome



More information about the MPlayer-dev-eng mailing list