[Live-devel] Relaying a unicast stream.

Ross Finlayson finlayson at live555.com
Sat Oct 28 00:15:56 PDT 2017


> I have adapted the testRTSPClient sample to receive a stream from my UDP source. Now I need to relay the data to another UDP address.

Is your ‘UDP source’ a RTP/UDP source, or a raw-UDP source.  If it’s the former, then why not also relay the data as RTP/UDP packets (and why not use the “LIVE555 Proxy Server”: http://live555.com/proxyServer/ )?


> So I tried replacing the "DummySink" in testRTSPClient with the BasicUDPSink used in testRelay. It was almost a one-for-one replacement. But it doesn't work: it crashes the first time the datasink tries to write something to its output socket.

In general I can’t help people much with their custom code, but one thing came to mind:


>         scs.subsession->sink = OurRelaySink::CreateNew(env, destinationAddress, 65535);
> ...
> }
> 
> where CreateNew is defined as
> 
> OurRelaySink* OurRelaySink::CreateNew(UsageEnvironment& env, string& destUrl, unsigned packetSize)
> {
[…]
>         return (OurRelaySink*)BasicUDPSink::createNew(env, &outputGroupsock, packetSize);

This will work, of course, only if “OurRelaySink” is a subclass of “BasicUDPSink”.  So I assume it is…

But why not just create a “BasicUDPSink” (instead of defining your own class)?



Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list