[Live-devel] Problem in finding the IP address

Frederic Faucheux frederic.faucheux at gmail.com
Wed Feb 2 13:35:03 PST 2005


Hello

I was trying to use one of the live.com test programs, called
testOnDemandRTSPServer,
in order to use it as a streaming server for some tests.
Installed on a Suse9.2 linux PC, it had a problem for finding the IP address
of the machine on which it was running (for instance 192.168.1.3)

I think multicast is not configured on this PC but I don't need it, and
testOnDemand should work in unicast, IIRC.

Precisely, it displayed lines such as:
  Play this stream using the URL "rtsp://0.0.0.0:7070/mpeg4ESVideoTest"
The client (vlc) could not understand this URI.

I investigated a bit in the code and found a way to solve this problem:
in the file
  groupsock/GroupsockHelper.cpp
in method:
  ourSourceAddressForMulticast
there are several "break" instructions that stop the program to find
the ip through the hostname of the PC.
(the part beginning with the comment  
  // We couldn't find our address using multicast loopback
  // so try instead to look it up directly.)

So I changed the "break"s into something like "multicasttest=false",
where 'multicasttest' is a boolean variable, and added some tests to
jump to the hostname hack.
And it worked. I now have the right IP displayed (and sent to client):
  Play this stream using the URL "rtsp://192.168.1.3:7070/mpeg4ESVideoTest"

-- 
Frédéric



More information about the live-devel mailing list