QTfrontend/net/recorder.cpp
branchflibqtfrontend
changeset 8092 08960209db8c
parent 8069 bb7671829935
child 8363 0b4ac686fc44
equal deleted inserted replaced
8091:e0a76056a633 8092:08960209db8c
    45 {
    45 {
    46     emit encodingFinished(finished);
    46     emit encodingFinished(finished);
    47     if (queue.empty())
    47     if (queue.empty())
    48         numRecorders--;
    48         numRecorders--;
    49     else
    49     else
    50         queue.takeFirst()->Start(false);
    50         queue.takeFirst()->start(false);
    51 }
    51 }
    52 
    52 
    53 void HWRecorder::onClientDisconnect()
    53 void HWRecorder::onClientDisconnect()
    54 {
    54 {
    55 }
    55 }
    56 
    56 
       
    57 void HWRecorder::onEngineStart()
       
    58 {
       
    59 
       
    60 }
       
    61 
    57 void HWRecorder::onClientRead()
    62 void HWRecorder::onClientRead()
    58 {
    63 {
    59     quint8 msglen;
    64 /*    quint8 msglen;
    60     quint32 bufsize;
    65     quint32 bufsize;
    61     while (!readbuffer.isEmpty() && ((bufsize = readbuffer.size()) > 0) &&
    66     while (!readbuffer.isEmpty() && ((bufsize = readbuffer.size()) > 0) &&
    62             ((msglen = readbuffer.data()[0]) < bufsize))
    67             ((msglen = readbuffer.data()[0]) < bufsize))
    63     {
    68     {
    64         QByteArray msg = readbuffer.left(msglen + 1);
    69         QByteArray msg = readbuffer.left(msglen + 1);
    73             break;
    78             break;
    74         case 'v':
    79         case 'v':
    75             finished = true;
    80             finished = true;
    76             break;
    81             break;
    77         }
    82         }
    78     }
    83     }*/
    79 }
    84 }
    80 
    85 
    81 void HWRecorder::EncodeVideo(const QByteArray & record)
    86 void HWRecorder::EncodeVideo(const QByteArray & record)
    82 {
    87 {
    83     toSendBuf = record;
    88     /*toSendBuf = record;
    84     toSendBuf.replace(QByteArray("\x02TD"), QByteArray("\x02TV"));
    89     toSendBuf.replace(QByteArray("\x02TD"), QByteArray("\x02TV"));
    85     toSendBuf.replace(QByteArray("\x02TL"), QByteArray("\x02TV"));
    90     toSendBuf.replace(QByteArray("\x02TL"), QByteArray("\x02TV"));
    86     toSendBuf.replace(QByteArray("\x02TN"), QByteArray("\x02TV"));
    91     toSendBuf.replace(QByteArray("\x02TN"), QByteArray("\x02TV"));
    87     toSendBuf.replace(QByteArray("\x02TS"), QByteArray("\x02TV"));
    92     toSendBuf.replace(QByteArray("\x02TS"), QByteArray("\x02TV"));
    88 
    93 
    90     {
    95     {
    91         numRecorders++;
    96         numRecorders++;
    92         Start(false); // run engine
    97         Start(false); // run engine
    93     }
    98     }
    94     else
    99     else
    95         queue.push_back(this);
   100         queue.push_back(this);*/
    96 }
   101 }
    97 
   102 
    98 QStringList HWRecorder::getArguments()
   103 QStringList HWRecorder::getArguments()
    99 {
   104 {
   100     QStringList arguments;
   105     QStringList arguments;
   101     QRect resolution = config->rec_Resolution();
   106     QRect resolution = config->rec_Resolution();
   102     arguments << cfgdir->absolutePath();
   107     arguments << cfgdir->absolutePath();
   103     arguments << QString::number(resolution.width());
   108     arguments << QString::number(resolution.width());
   104     arguments << QString::number(resolution.height());
   109     arguments << QString::number(resolution.height());
   105     arguments << "32"; // bpp
   110     arguments << "32"; // bpp
   106     arguments << QString("%1").arg(ipc_port);
   111     //arguments << QString("%1").arg(ipc_port);
   107     arguments << "0"; // fullscreen
   112     arguments << "0"; // fullscreen
   108     arguments << "0"; // sound
   113     arguments << "0"; // sound
   109     arguments << "0"; // music
   114     arguments << "0"; // music
   110     arguments << "0"; // sound volume
   115     arguments << "0"; // sound volume
   111     arguments << QString::number(config->timerInterval());
   116     arguments << QString::number(config->timerInterval());