我是linux3.05的内核,用的qt4.8.5版本,在使用QProcess启动gst-launch程序时始终没有响应,没有任何输出,就像是跳过了这一步,有没有哪位大神知道原因
QString strMsg;
QString strGStreamer("gst-launch");
char* pstrMsg;
QStringList strListArg4GStreamer;
//strListArg4GStreamer <<&quot;-ve&quot;;
strListArg4GStreamer <<&quot;v4l2src device=/dev/video2&quot;;
//strListArg4GStreamer <<&quot;device=/dev/video2&quot;;
strListArg4GStreamer <<&quot;!&quot;;
strListArg4GStreamer <<&quot;'video/x-raw-yuv, format=(fourcc)UYVY'&quot;;
strListArg4GStreamer <<&quot;!&quot;;
strListArg4GStreamer <<&quot;mfw_isink&quot;;
strListArg4GStreamer <<&quot;disp-width=1000&quot;;
strListArg4GStreamer <<&quot;disp-height=800&quot;;
strListArg4GStreamer <<&quot;axis-left=16&quot;;
//strListArg4GStreamer <<QString::number((ui->LIVE->winId()));
//strListArg4GStreamer <<&quot;--help&quot;;
strMsg = strGStreamer+&quot; &quot;;
strMsg += strListArg4GStreamer.join(&quot; &quot;); // std output
strMsg = &quot;INFO: GStreamer argument:&quot;+strMsg+&quot;\n&quot;;
QByteArray ba=strMsg.toLatin1();
pstrMsg=ba.data();
printf(pstrMsg);
//m_qMplayerProcess = new QProcess(ui->LIVE);
if(NULL == m_qMplayerProcess){
printf(&quot;Err: QProcess error\n&quot;);
}
m_qMplayerProcess = new QProcess(ui->LIVE);
//m_qMplayerProcess->setProcessChannelMode(QProcess::MergedChannels);
m_qMplayerProcess->start(strGStreamer,strListArg4GStreamer); |