Fixed RTMP hanging bug, added to RTSP SDP

This commit is contained in:
Thulinma 2010-09-04 14:47:03 +02:00
parent 6047a71d56
commit e47e51ee5b
2 changed files with 2 additions and 1 deletions

View file

@ -148,6 +148,7 @@ void parseChunk(){
amfreply.addContent(AMFType("", (double)0, 0x05));//null - command info amfreply.addContent(AMFType("", (double)0, 0x05));//null - command info
amfreply.addContent(AMFType("", (double)1));//stream ID - we use 1 amfreply.addContent(AMFType("", (double)1));//stream ID - we use 1
SendChunk(3, 20, next.msg_stream_id, amfreply.Pack()); SendChunk(3, 20, next.msg_stream_id, amfreply.Pack());
SendUSR(0, 0);//send UCM StreamBegin (0), stream 0
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "AMF0 command: createStream result\n"); fprintf(stderr, "AMF0 command: createStream result\n");
#endif #endif

View file

@ -102,7 +102,7 @@ void ParseRTSPPacket(){
//parse DESCRIBE request //parse DESCRIBE request
if (q.params["request"] == "DESCRIBE"){ if (q.params["request"] == "DESCRIBE"){
a.params["Content-Type"] = "application/sdp"; a.params["Content-Type"] = "application/sdp";
a.data = "v=0\r\no=- 0 0 IN IP4 ddvtech.com\r\ns=PLSServer\r\nc=IN IP4 0.0.0.0\r\na=recvonly\r\nt=0 0\r\nm=video 0 RTP/AVP 98\r\na=rtpmap:98 H264/90000\r\nm=audio 0 RTP/AVP 99\r\na=rtpmap:99 MPEG4-GENERIC/11025/1\r\n"; a.data = "v=0\r\no=- 0 0 IN IP4 ddvtech.com\r\ns=PLSServer\r\nc=IN IP4 0.0.0.0\r\na=recvonly\r\nt=0 0\r\nm=video 0 RTP/AVP 98\r\na=rtpmap:98 H264/90000\r\na=fmtp:98 packetization-mode=1\r\nm=audio 0 RTP/AVP 99\r\na=rtpmap:99 MPEG4-GENERIC/11025/1\r\na=ftmp:99 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexltalength=3; config=1210\r\n";
RTSPReply(q, a, "200 OK"); RTSPReply(q, a, "200 OK");
DEBUG("Sent DESCRIBE reply\n"); DEBUG("Sent DESCRIBE reply\n");
} }