AVFCameraViewfinderSettings - add NV12 format

Add QVideoFrame::Format_NV12 (AVFoundation has kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
and kCVPixelFormatType_420YpCbCr8BiPlanarFullRange). Report it (set it) only if
it's supported by renderer's surface. Add bi-planar format support into CVPixelBufferVideoBuffer.

Change-Id: Ibc1c2be056bddf5cf3b595570fc40c626ee3ccf5
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
Timur Pocheptsov
2015-03-17 09:48:54 +01:00
parent 10354f4127
commit 09afe9377d
3 changed files with 94 additions and 29 deletions

View File

@@ -74,6 +74,7 @@ private:
void setFramerate(qreal minFPS, qreal maxFPS, bool useActive);
void setPixelFormat(QVideoFrame::PixelFormat newFormat);
AVCaptureDeviceFormat *findBestFormatMatch(const QCameraViewfinderSettings &settings) const;
QVector<QVideoFrame::PixelFormat> viewfinderPixelFormats() const;
bool convertPixelFormatIfSupported(QVideoFrame::PixelFormat format, unsigned &avfFormat) const;
void applySettings();
QCameraViewfinderSettings requestedSettings() const;