Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
6.5.0 Beta3
-
None
-
Environment: Mac mini, MacOS M1 64bit, Monterey 12.3.1
USB port: USB 3.0
Camera format: MotionJPEG
Qt version: Qt6.5 beta3.
Description
Hi,
Environment: Mac mini, MacOS M1 64bit, Monterey 12.3.1
USB port: USB 3.0
Camera format: MotionJPEG
Qt version: Qt6.5 beta3.
Description:
Using Qt6.5 beta3, after camera starting, there is nothing output about video streaming.
C++ code:
void CPreviewPage::startVideoStreaming(void) { QString str_id; QString str_vid; QString str_pid; const QList<QCameraDevice> cameras = QMediaDevices::videoInputs(); for (const QCameraDevice &camera_device : cameras) { example id = "0x2600000a16809b0" or "0x100000a1680970" qDebug() << "camera_device.id = " << camera_device.id(); str_id = camera_device.id().right(8); str_vid = str_id.mid(0, 4); str_pid = str_id.right(4); qDebug() << "id = " << str_id; qDebug() << "vid = 0x" << str_vid; qDebug() << "pid = 0x" << str_pid; if (str_vid != "a168") continue; captureSession = new QMediaCaptureSession(this); pCamera = new QCamera(camera_device); captureSession->setCamera(pCamera); pGraphyScene = new QGraphicsScene(0, 0, 640, 480); pGraphyView = new QGraphicsView(this); pGraphyView->setScene(pGraphyScene); pGraphyVideoItem = new QGraphicsVideoItem; pGraphyVideoItem->setSize(QSizeF(640, 480)); pGraphyVideoItem->setPos(0, 0); pGraphyScene->addItem(pGraphyVideoItem); captureSession->setVideoOutput(pGraphyVideoItem); pImageCapture = new QImageCapture((QObject *)pCamera); captureSession->setImageCapture(pImageCapture); QObject::connect(pImageCapture, SIGNAL(imageAvailable(int, const QVideoFrame &)), this, SLOT(onCaptureVideoFrame(int, const QVideoFrame &))); QObject::connect(pImageCapture, SIGNAL(imageCaptured(int, const QImage &)), this, SLOT(onCaptureImage(int, const QImage &))); pCamera->start(); // live play. QString title = camera_device.description() + " 0x" + QString::number(myDeviceDetectionData.devicePid, 16); setWindowTitle(title); break; } }
Attachments
Issue Links
- is duplicated by
-
QTBUG-109009 Ffmpeg: videotoolbox doesn't support some yuv 8bit formats
- Closed
- relates to
-
QTBUG-111632 Decoding camera format MotionJPEG to NV12 is failed.
- Closed