- 积分
- 114
贡献623
飞刀227 FD
注册时间2018-1-10
在线时间20 小时
扫一扫,手机访问本帖
|
我是linux3.05的内核,用的qt4.8.5版本,在使用QProcess启动gst-launch程序时始终没有响应,没有任何输出,就像是跳过了这一步,有没有哪位大神知道原因
- QString strMsg;
- QString strGStreamer("gst-launch");
- char* pstrMsg;
- QStringList strListArg4GStreamer;
- //strListArg4GStreamer <<"-ve";
- strListArg4GStreamer <<"v4l2src device=/dev/video2";
- //strListArg4GStreamer <<"device=/dev/video2";
- strListArg4GStreamer <<"!";
- strListArg4GStreamer <<"'video/x-raw-yuv, format=(fourcc)UYVY'";
- strListArg4GStreamer <<"!";
- strListArg4GStreamer <<"mfw_isink";
- strListArg4GStreamer <<"disp-width=1000";
- strListArg4GStreamer <<"disp-height=800";
- strListArg4GStreamer <<"axis-left=16";
- //strListArg4GStreamer <<QString::number((ui->LIVE->winId()));
- //strListArg4GStreamer <<"--help";
- strMsg = strGStreamer+" ";
- strMsg += strListArg4GStreamer.join(" "); // std output
- strMsg = "INFO: GStreamer argument:"+strMsg+"\n";
- QByteArray ba=strMsg.toLatin1();
- pstrMsg=ba.data();
- printf(pstrMsg);
- //m_qMplayerProcess = new QProcess(ui->LIVE);
- if(NULL == m_qMplayerProcess){
- printf("Err: QProcess error\n");
- }
- m_qMplayerProcess = new QProcess(ui->LIVE);
- //m_qMplayerProcess->setProcessChannelMode(QProcess::MergedChannels);
- m_qMplayerProcess->start(strGStreamer,strListArg4GStreamer);
复制代码 |
|