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.
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. Should I be starting with a different sample, or can this be resolved? Thanks Code: -------------------------------------------------------- I replaced this (from testRTSPClient)... void continueAfterSETUP(RTSPClient* rtspClient, int resultCode, char* resultString) { do { ... scs.subsession->sink = DummySink::createNew(env, *scs.subsession, rtspClient->url()); ... } with this... void continueAfterSETUP(RTSPClient* rtspClient, int resultCode, char* resultString) { do { ... scs.subsession->sink = OurRelaySink::CreateNew(env, destinationAddress, 65535); ... } where CreateNew is defined as OurRelaySink* OurRelaySink::CreateNew(UsageEnvironment& env, string& destUrl, unsigned packetSize) { // Create a 'groupsock' for the destination address and port string scheme, host; unsigned nPort; if (CrackEndpoint(destUrl.c_str(), scheme, host, nPort)) { struct in_addr outputAddress; outputAddress.s_addr = our_inet_addr(host.c_str()); Port const outputPort(nPort); unsigned char const outputTTL = 255; Groupsock outputGroupsock(env, outputAddress, outputPort, outputTTL); return (OurRelaySink*)BasicUDPSink::createNew(env, &outputGroupsock, packetSize); } return NULL; } ___________________________________________________ Mark Woodard Mutualink, Inc. 313 S Jupiter Allen, TX 75002 Toll Free: (866) 957-5465 Ext: 508 Direct: (972) 200-5020 E-Mail: mwood...@mutualink.net <employ...@mutualink.net> Web: www.mutualink.net *Certified by the Department of Homeland Security SAFETY Act for Interoperable Communications* The information in this email, and subsequent attachments, may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee. Visit Mutualink at the following social media sites: <http://www.twitter.com/MutualinkInc> <http://www.facebook.com/Mutualink> <http://www.linkedin.com/company/mutualink> The information in this email, and subsequent attachments, may contain confidential information that is intended solely for the attention and use of the named addressee(s). This message or any part thereof must not be disclosed, copied, distributed or retained by any person without authorization from the addressee.
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel