[Live-devel] Using liveMedia to build a rtp relay

Ross Finlayson finlayson at live.com
Tue Aug 3 11:55:08 PDT 2004


>We would like to build an application relaying unicast RTP streams (or raw UDP
>feed) received on 1 side to N clients, these clients will in turn do the same.
>
>We are evaluating this library to see if we can use it to build this. We 
>studied
>the rtprelay sample, and started looking at the source code of the library. It
>doesn't seems possible to attach multiple sink to one source, ie:
>
>   sink1->startPlaying(*source, NULL, NULL);
>   sink2->startPlaying(*source, NULL, NULL);
>   sink3->startPlaying(*source, NULL, NULL);
>
>will probably fail, is this right ?

Yes, that won't work, because each source can feed only one sink.

>Is there a built-in way to achieve this with
>liveMedia or do we need to code the duplication code ?

You would need extra support for duplicating the stream.

I suggest holding off on trying to implement this yourself, because in a 
few days I'll be adding support for duplication (multiple destination IP 
addresses) to the distributed LIVE.COM code.  (It turns out that this same 
functionality is needed for unicast RTSP/RTP streaming, when you want to 
stream from a common input source.)

Once I've added this duplication support, I'll update the "testRelay" code 
with a comment explaining how to use this for relaying to multiple 
destinations.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list