[Live-devel] not able to respond to SET_PARAMETER

venugopalpaikr venugopalpaikr at tataelxsi.co.in
Sun Dec 7 21:51:20 PST 2008


Hi,
    I am modifying Live555 to respond to Windows Media Player. While trying
to establish the session WMP sends SET_PARAMETER. The actual response to
SET_PARAMETER should be

RTSP/1.0 200 OK
Content-Type: application/x-rtsp-udp-packetpair;charset=UTF-8
Content-Length: 43
Date: Mon, 01 Dec 2008 05:28:27 GMT
CSeq: 3
Session: 13114845032829158031;timeout=60
Server: WMServer/9.5.6001.18000

type: high-entropy-packetpair variable-size*

The end of message should be at d asterisk sign as shown above.

I have written the response for SET_PARAMETER as shown :

void RTSPServer::RTSPClientSession::Call_SET_PARAMETER(char const* cseq) {

unsigned char ResponseBuffer[10000];

snprintf((char*)ResponseBuffer,sizeof ResponseBuffer,"RTSP/1.0 200
OK\r\nContent-Type:
application/x-rtsp-udp-packetpair;charset=UTF-8\r\n%sCSeq: %s\r\nSession:
%d;timeout=60\r\nServer: WMServer/9.5.6001.18000\r\n\r\n",dateHeader(),cseq,
fOurSessionId);

memset(fResponseBuffer,0,RTSP_BUFFER_SIZE);

send(fClientSocket,(char const*)ResponseBuffer,
strlen((char*)ResponseBuffer), 0);

snprintf((char*)ResponseBuffer,sizeof ResponseBuffer,"type:
high-entropy-packetpair variable-size\r\n");

send(fClientSocket, (char const*)ResponseBuffer,
strlen((char*)ResponseBuffer), 0);

memset(fResponseBuffer,0,RTSP_BUFFER_SIZE);
}

the response is as shown below
RTSP/1.0 200 OK
Content-Type: application/x-rtsp-udp-packetpair;charset=UTF-8
Date: Fri, Jan 02 1970 22:53:22 GMT
CSeq: 3
Session: 1;timeout=60
Server: WMServer/9.5.6001.18000

type: high-entropy-packetpair variable-size

*
the message ends at the asterisk sign which i don't want. Am not able to
replicate the response properly. How should i modify the code? if i don't
use "\r\n\r\n" the response gets appended to the Teardown response and is
sent along with it when a Teardown request is received.

REGARDS,
Venu



The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments contained in it.


More information about the live-devel mailing list