[mythtv] devel/rtp: multiple IPTV streams, same port-no

danielk danielk at cuymedia.net
Mon May 14 22:07:56 UTC 2012


On 05/14/2012 05:34 PM, James Courtier-Dutton wrote:
> On 28 April 2012 22:09, Niels Ole Kirkeby <nok at kirkeby.nu
> <mailto:nok at kirkeby.nu>> wrote:
> Why not use Source Specific Multicast. I.e. So you can match against
> both source and destination of the multicast.
> SSM uses multicast addresses that start with 232.X.X.X

MythTV does support specifying the the source. That's not the problem
The problem is that you bind more than once to the same port on the
local machine this either fails outright due to permissions and all
the data goes to the first socket to bind to that port, or if the
additional binds are allowed, individual packets are sent randomly
to any one of the open socket readers.

There are two ways to deal with this. One is to re-architect so that
instead of having one reader thread per stream, we have one thread
per locally bound port. The other is to simply bind to the multicast
address+port instead of listening on that port on a local address
and keep the current architecture. For now we're doing the latter
as it works well on Linux and results in a nice simple architecture.
However, it may not be portable. So this needs to be tested on other
operating systems and we may need to consider the less elegant but
more portable solution.

-- Daniel


More information about the mythtv-dev mailing list