summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation/camera
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2016-04-24 00:37:56 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-04-29 13:51:08 +0000
commit13bc1e04baa44400835e10fbd2e79d1e4e669f0d (patch)
tree3aa569d7847e98bae042fb6f2cfe1a60a12a3414 /src/plugins/avfoundation/camera
parentbc8e257718240f92db70b229980fc97e8317997d (diff)
Add YUV 4:2:2 8Bit to supported formats of OS X camera plugin.
Now that QtQuick handles YUV 4:2:2 8Bit video formats, let the input use them. [ChangeLog][OS X][Input format] Added YUV 4:2:2 8 bit to supported camera video formats. Change-Id: Ib9b927a530232111a1d1139689b4cd2adf34da3f Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Diffstat (limited to 'src/plugins/avfoundation/camera')
-rw-r--r--src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm b/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm
index d2ae2af05..e1adf44b1 100644
--- a/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm
+++ b/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm
@@ -414,6 +414,10 @@ QVideoFrame::PixelFormat AVFCameraViewfinderSettingsControl2::QtPixelFormatFromC
case kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange:
case kCVPixelFormatType_420YpCbCr8BiPlanarFullRange:
return QVideoFrame::Format_NV12;
+ case kCVPixelFormatType_422YpCbCr8:
+ return QVideoFrame::Format_UYVY;
+ case kCVPixelFormatType_422YpCbCr8_yuvs:
+ return QVideoFrame::Format_YUYV;
default:
return QVideoFrame::Format_Invalid;
}
@@ -434,6 +438,12 @@ bool AVFCameraViewfinderSettingsControl2::CVPixelFormatFromQtFormat(QVideoFrame:
case QVideoFrame::Format_NV12:
conv = kCVPixelFormatType_420YpCbCr8BiPlanarFullRange;
break;
+ case QVideoFrame::Format_UYVY:
+ conv = kCVPixelFormatType_422YpCbCr8;
+ break;
+ case QVideoFrame::Format_YUYV:
+ conv = kCVPixelFormatType_422YpCbCr8_yuvs;
+ break;
// These two formats below are not supported
// by QSGVideoNodeFactory_RGB, so for now I have to
// disable them.