[Live-devel] multicast and duplication

Nicolas Renard renard.nicolas at gmail.com
Wed Jan 30 07:32:26 PST 2008


Hi all,

I try to make a program to relay unicast streams (MPEG4ES) to
multicast addresses. I have let's say 4 different live sources and 4
multicast addresses. So I create 16 ServerMediaSession to cover all
the possibilities. I derive a class from PassiveServerMediaSubsession
to incorporate a RTPSink, a Framed Source and a refCount (to know the
number of clients using this object). I manage to know which source on
which address a client wants by the rtsp url (they look like:
rtsp://ip_server:port/sourcei_addressj)
There is two simple use cases:
A client wants an unused source to be streamed on an unused address
(none of the other clients is requesting this source or the use of
this address) or an already streamed source on the same address (a
previous client has already requested this source on this address).

My first problem is to duplicate a stream to a different address. This
is usefull when a first client has the source i on the address j and a
second client wants the same source i but on the address j+1 for
instance. In this case I would like to not get again the source
(bandwidth issue) and to stream it on the two addresses.

The second problem is the opposite: a first client has the source i on
the address j and a second client wants the source i+1 (for instance)
on the same address j. The ideal behavior is to stop the source i to
let the two clients watch the source i+1.

Can anybody give me some advice to solve these issues?

Thank you all for your time.

Nicolas Renard


More information about the live-devel mailing list