Changeset 1530 in ntrip
- Timestamp:
- Jan 21, 2009, 1:40:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncnetqueryrtp.cpp
r1528 r1530 29 29 _socket = 0; 30 30 _udpSocket = 0; 31 _CSeq = 0; 31 32 _eventLoop = new QEventLoop(this); 32 33 } … … 124 125 QByteArray reqStr; 125 126 reqStr = "SETUP " + _url.toEncoded() + " RTSP/1.0\r\n" 126 + "CSeq: 1\r\n"127 + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n" 127 128 + "Ntrip-Version: Ntrip/2.0\r\n" 128 129 + "Ntrip-Component: Ntripclient\r\n" … … 138 139 if (_socket->waitForReadyRead(timeOut)) { 139 140 QTextStream in(_socket); 140 QByteArray session;141 141 QByteArray serverPort; 142 142 QString line = in.readLine(); 143 143 while (!line.isEmpty()) { 144 144 if (line.indexOf("Session:") == 0) { 145 session = line.mid(9).toAscii();145 _session = line.mid(9).toAscii(); 146 146 } 147 147 int iSrv = line.indexOf("server_port="); … … 154 154 // Send Request 2 155 155 // -------------- 156 if (! session.isEmpty()) {156 if (!_session.isEmpty()) { 157 157 158 158 // Send initial RTP packet for firewall handling 159 159 // --------------------------------------------- 160 160 if (!serverPort.isEmpty()) { 161 int sessInt = session.toInt();161 int sessInt = _session.toInt(); 162 162 char rtpbuffer[12]; 163 163 rtpbuffer[0] = (2<<6); … … 179 179 180 180 reqStr = "PLAY " + _url.toEncoded() + " RTSP/1.0\r\n" 181 + "CSeq: 2\r\n"182 + "Session: " + session + "\r\n"181 + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n" 182 + "Session: " + _session + "\r\n" 183 183 + "\r\n"; 184 184 _socket->write(reqStr, reqStr.length());
Note:
See TracChangeset
for help on using the changeset viewer.