Changeset 1530 in ntrip for trunk/BNC/bncnetqueryrtp.cpp


Ignore:
Timestamp:
Jan 21, 2009, 1:40:33 PM (15 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncnetqueryrtp.cpp

    r1528 r1530  
    2929  _socket    = 0;
    3030  _udpSocket = 0;
     31  _CSeq      = 0;
    3132  _eventLoop = new QEventLoop(this);
    3233}
     
    124125    QByteArray reqStr;
    125126    reqStr = "SETUP " + _url.toEncoded() + " RTSP/1.0\r\n"
    126            + "CSeq: 1\r\n"
     127           + "CSeq: " + QString("%1").arg(++_CSeq).toAscii() + "\r\n"
    127128           + "Ntrip-Version: Ntrip/2.0\r\n"
    128129           + "Ntrip-Component: Ntripclient\r\n"
     
    138139      if (_socket->waitForReadyRead(timeOut)) {
    139140        QTextStream in(_socket);
    140         QByteArray session;
    141141        QByteArray serverPort;
    142142        QString line = in.readLine();
    143143        while (!line.isEmpty()) {
    144144          if (line.indexOf("Session:") == 0) {
    145             session = line.mid(9).toAscii();
     145            _session = line.mid(9).toAscii();
    146146          }
    147147          int iSrv = line.indexOf("server_port=");
     
    154154        // Send Request 2
    155155        // --------------
    156         if (!session.isEmpty()) {
     156        if (!_session.isEmpty()) {
    157157
    158158          // Send initial RTP packet for firewall handling
    159159          // ---------------------------------------------
    160160          if (!serverPort.isEmpty()) {
    161             int sessInt = session.toInt();
     161            int sessInt = _session.toInt();
    162162            char rtpbuffer[12];
    163163            rtpbuffer[0]  = (2<<6);
     
    179179
    180180          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"
    183183                 + "\r\n";
    184184          _socket->write(reqStr, reqStr.length());
Note: See TracChangeset for help on using the changeset viewer.