[Live-devel] RTSP Client and multicast with AXIS cameras
Federico Ares
federico.ares at gmail.com
Tue Nov 1 12:05:46 PST 2005
Thank you Ross,
Thats right, the RTSPClient works perfectly with AXIS unicast servers.
I have done several implementation for these and had no problems at all.
It would be great if your libraries give support for the multicast servers.
I found that this behaviour about the SDP is mentioned in the RTSP RFC,
so I thought it was not so strange.
I'm trying to make the code work myself but I'm still unfamiliar with the
detailed
working principles of some classes (mediaSession for example).
I modified the RTSPClient::parseTransportResponse code to get the
"destination=" and "port=" fields. At least I got that right. :)
This is where I get lost. What shall I do with the parameters?
I tried redefining MediaSession::setDestinations() to accept RTP and RTCP
ports.
The method seems to be working in the sense it initializes the rtp and rtcp
sockets
with the values given in the SETUP response.
But still, the server starts transmitting, but no data is available from the
source.
Am I missing some other parameter to be configured so that the client reads
the
multicast packets?
Greetings and Thanks again,
Federico Ares
--------------------------------------------------------------------------------
For anyone who finds it useful, This is how I am parsing the SETUP response
to
gather the multicast data. I modified part of the parseTransportResponse
code.
This works ok.
Boolean RTSPClient::parseTransportResponse2 ( char const* line,
char*& multiAddressStr,
unsigned int* rtpPort,
unsigned int* rtcpPort)
unsigned int rtpTemp, rtcpTemp;
...................
while (sscanf(fields, "%[^;]", field) == 1)
{
if (sscanf(field, "port=%u-%u", &rtpTemp, &rtcpTemp) == 2)
{
foundClientPortNum = True;
}
if (_strncasecmp(field, "destination=", 12) == 0)
{
delete[] foundMultiAddressStr;
foundMultiAddressStr = strDup(field+12);
}
................
if (foundClientPortNum)
{
multiAddressStr = foundMultiAddressStr;
*rtpP= rtpTemp;
*rtcpP= rtcpTemp;
return True;
}
More information about the live-devel
mailing list