Changeset 8203 in ntrip for trunk/BNC/src/bncnetqueryrtp.cpp
- Timestamp:
- Dec 11, 2017, 2:42:03 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncnetqueryrtp.cpp
r6787 r8203 48 48 if (_socket) { 49 49 QByteArray reqStr = "TEARDOWN " + _url.toEncoded() + " RTSP/1.0\r\n" 50 + "CSeq: " + QString("%1").arg(++_CSeq).to Ascii() + "\r\n"50 + "CSeq: " + QString("%1").arg(++_CSeq).toLatin1() + "\r\n" 51 51 + "Session: " + _session + "\r\n" 52 52 + "\r\n"; … … 60 60 if (_socket) { 61 61 QByteArray reqStr = "GET_PARAMETER " + _url.toEncoded() + " RTSP/1.0\r\n" 62 + "CSeq: " + QString("%1").arg(++_CSeq).to Ascii() + "\r\n"62 + "CSeq: " + QString("%1").arg(++_CSeq).toLatin1() + "\r\n" 63 63 + "Session: " + _session + "\r\n" 64 64 + "\r\n"; … … 126 126 // -------------- 127 127 if (_socket->waitForConnected(timeOut)) { 128 QString uName = QUrl::fromPercentEncoding(_url.userName().to Ascii());129 QString passW = QUrl::fromPercentEncoding(_url.password().to Ascii());128 QString uName = QUrl::fromPercentEncoding(_url.userName().toLatin1()); 129 QString passW = QUrl::fromPercentEncoding(_url.password().toLatin1()); 130 130 QByteArray userAndPwd; 131 131 132 132 if(!uName.isEmpty() || !passW.isEmpty()) { 133 userAndPwd = "Authorization: Basic " + (uName.to Ascii() + ":" +134 passW.to Ascii()).toBase64() + "\r\n";133 userAndPwd = "Authorization: Basic " + (uName.toLatin1() + ":" + 134 passW.toLatin1()).toBase64() + "\r\n"; 135 135 } 136 136 … … 141 141 _udpSocket->bind(0); 142 142 connect(_udpSocket, SIGNAL(readyRead()), _eventLoop, SLOT(quit())); 143 QByteArray clientPort = QString("%1").arg(_udpSocket->localPort()).to Ascii();143 QByteArray clientPort = QString("%1").arg(_udpSocket->localPort()).toLatin1(); 144 144 145 145 QByteArray reqStr; 146 146 reqStr = "SETUP " + _url.toEncoded() + " RTSP/1.0\r\n" 147 + "CSeq: " + QString("%1").arg(++_CSeq).to Ascii() + "\r\n"147 + "CSeq: " + QString("%1").arg(++_CSeq).toLatin1() + "\r\n" 148 148 + "Ntrip-Version: Ntrip/2.0\r\n" 149 149 + "Ntrip-Component: Ntripclient\r\n" … … 167 167 while (!line.isEmpty()) { 168 168 if (line.indexOf("Session:") == 0) { 169 _session = line.mid(9).to Ascii();169 _session = line.mid(9).toLatin1(); 170 170 } 171 171 int iSrv = line.indexOf("server_port="); 172 172 if (iSrv != -1) { 173 serverPort = line.mid(iSrv+12).to Ascii();173 serverPort = line.mid(iSrv+12).toLatin1(); 174 174 } 175 175 line = in.readLine(); … … 203 203 204 204 reqStr = "PLAY " + _url.toEncoded() + " RTSP/1.0\r\n" 205 + "CSeq: " + QString("%1").arg(++_CSeq).to Ascii() + "\r\n"205 + "CSeq: " + QString("%1").arg(++_CSeq).toLatin1() + "\r\n" 206 206 + "Session: " + _session + "\r\n" 207 207 + "\r\n";
Note:
See TracChangeset
for help on using the changeset viewer.