| 435 | } |
| 436 | |
| 437 | void CBackendDesktop::RecordVideo(QRecordVideoEvent *e) |
| 438 | { |
| 439 | //qDebug(log) << "Update image"; |
| 440 | if(!e) return; |
| 441 | if(QMediaRecorder::RecordingState != m_Recorder.recorderState()) { |
| 442 | qCritical(log) << "Recorder is inavailable"; |
| 443 | return; |
| 444 | } |
| 445 | QVideoFrame frame(e->GetImage()); |
| 446 | bool bRet = m_VideoFrameInput.sendVideoFrame(frame); |
| 447 | if(!bRet) { |
| 448 | //TODO: 放入未成功发送队列, |
| 449 | // 当 QVideoFrameInput::readyToSendVideoFrame() 时,再发送 |
| 450 | qDebug(log) << "m_VideoFrameInput.sendVideoFrame fail"; |
| 451 | } |
| 452 | } |
| 453 | |
| 454 | int CBackendDesktop::Stop() |
| 455 | { |