On 7 Apr 2009, at 06:34, Ross Finlayson wrote:

Basically, I've got an off the shelf TV encoder that broadcasts MPEG2-TS onto the network. I used testRelay to read the source address and relay it to another address. I've got VLC running on another box on the same LAN with two play list items, one pointing to the original broadcast address and the other to the relayed address. Original plays fine, relayed one is corrupted badly with lots of "libdvbpsi error (PSI decoder): TS discontinuity (received 14, expected 12) for PID 17" type messages appearing in the logs.

I suspect you're seeing network packet loss.  See 
http://www.live555.com/liveMedia/faq.html#packet-loss

This was the port problem Ross. I changed the code to receive on port 5000 and rebroadcast on 5001 and it's working perfectly.

Going forward with this little test app of mine, I need to be able to receive different UDP streams on the same machine. Unfortunately, all these streams will be on the same port. The encoder boxes in question will let you choose different multicast base addresses and ports, but the generated multicast addresses for each stream, while different, will always be on the same port.

As has been mentioned a few times in the archives, by default the GroupsockHelper code binds to the INADDR_ANY setting (ReceivingInterfaceAddr is defaulting to this). What I need to happen is that it should bind to the multicast address but join the group using the wildcard interface, INADDR_ANY. This will allow the UDP layer to filter correctly to the socket the datagrams for the addr/ port combination as opposed to app getting all datagrams for the port. I've changed the code in GroupsockHelper::socketJoinGroup so that when setting up the socket to join with IP_ADD_MEMBERSHIP we use INADDR_ANY for the imr.imr_interface.s_addr value as opposed to using the value in the ReceivingInterfaceAddr variable. This allows me to set ReceivingInterfaceAddr in the testRelay.cpp code to the multicast addr for correct binding while allowing the system to join the multicast group on any interface.

What's your take on how this should be achieved ?
--
Glen Gray
sla...@slaine.org




_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to