diff options
Diffstat (limited to 'src/plugins/avfoundation/camera/avfcamerasession.mm')
-rw-r--r-- | src/plugins/avfoundation/camera/avfcamerasession.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/avfoundation/camera/avfcamerasession.mm b/src/plugins/avfoundation/camera/avfcamerasession.mm index 4ede4a514..993e28319 100644 --- a/src/plugins/avfoundation/camera/avfcamerasession.mm +++ b/src/plugins/avfoundation/camera/avfcamerasession.mm @@ -220,7 +220,7 @@ void AVFCameraSession::updateCameraDevices() // the screen when held in portrait ==> 270 degrees clockwise angle // - Front-facing cameras have the top side of the sensor aligned with the left side of // the screen when held in portrait ==> 270 degrees clockwise angle - // On Mac OS, the position will always be unspecified and the sensor orientation unknown. + // On OS X, the position will always be unspecified and the sensor orientation unknown. switch (device.position) { case AVCaptureDevicePositionBack: info.position = QCamera::BackFace; @@ -346,6 +346,7 @@ void AVFCameraSession::attachVideoInputDevice() [m_captureSession removeInput:m_videoInput]; [m_videoInput release]; m_videoInput = 0; + m_activeCameraInfo = AVFCameraInfo(); } AVCaptureDevice *videoDevice = m_service->videoDeviceControl()->createCaptureDevice(); @@ -359,6 +360,7 @@ void AVFCameraSession::attachVideoInputDevice() qWarning() << "Failed to create video device input"; } else { if ([m_captureSession canAddInput:m_videoInput]) { + m_activeCameraInfo = m_cameraDevices.at(m_service->videoDeviceControl()->selectedDevice()); [m_videoInput retain]; [m_captureSession addInput:m_videoInput]; } else { @@ -432,6 +434,8 @@ FourCharCode AVFCameraSession::defaultCodec() void AVFCameraSession::onCameraFrameFetched(const QVideoFrame &frame) { + Q_EMIT newViewfinderFrame(frame); + m_videoProbesMutex.lock(); QSet<AVFMediaVideoProbeControl *>::const_iterator i = m_videoProbes.constBegin(); while (i != m_videoProbes.constEnd()) { |