summaryrefslogtreecommitdiffstats
path: root/src/plugins/directshow/camera
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@qt.io>2016-09-06 16:57:09 +0200
committerYoann Lopes <yoann.lopes@qt.io>2016-09-16 11:50:50 +0000
commite2adbda766f5fbdc6238cbd6bc64a6d3383c844e (patch)
tree6a062de7363830d71152357d263f1a1d112780f5 /src/plugins/directshow/camera
parent0fc6ef504c6a4e923b894db38a2bc2a475bc3e7c (diff)
DirectShow: support MJPEG cameras
Map MEDIASUBTYPE_MJPG to QVideoFrame::Format_Jpeg, which makes sure that cameras that only support MJPEG are configured properly. Task-number: QTBUG-55359 Change-Id: I732c56afc51109aba0231c8537f795e8d276c194 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/plugins/directshow/camera')
-rw-r--r--src/plugins/directshow/camera/dscamerasession.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/directshow/camera/dscamerasession.cpp b/src/plugins/directshow/camera/dscamerasession.cpp
index 1cb91cd4a..5df2d2fb3 100644
--- a/src/plugins/directshow/camera/dscamerasession.cpp
+++ b/src/plugins/directshow/camera/dscamerasession.cpp
@@ -168,6 +168,8 @@ QVideoFrame::PixelFormat pixelFormatFromMediaSubtype(GUID uid)
return QVideoFrame::Format_YUYV;
else if (uid == MEDIASUBTYPE_NV12)
return QVideoFrame::Format_NV12;
+ else if (uid == MEDIASUBTYPE_MJPG)
+ return QVideoFrame::Format_Jpeg;
else if (uid == MEDIASUBTYPE_IMC1)
return QVideoFrame::Format_IMC1;
else if (uid == MEDIASUBTYPE_IMC2)