From 5c96021172fd1e3f0e845a29116d16924c5a2417 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Thu, 2 Oct 2014 17:51:10 +0200 Subject: [PATCH] Fixed getting CV_CAP_PROP_FOURCC property value Save selected FCC in order to return proper CV_CAP_PROP_FOURCC property value (currently FCC for RGB24 is always returned). --- modules/highgui/src/cap_dshow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/highgui/src/cap_dshow.cpp b/modules/highgui/src/cap_dshow.cpp index dfc0c43505..6cc29443d7 100644 --- a/modules/highgui/src/cap_dshow.cpp +++ b/modules/highgui/src/cap_dshow.cpp @@ -2578,6 +2578,7 @@ int videoInput::start(int deviceID, videoDevice *VD){ if( setSizeAndSubtype(VD, VD->tryWidth, VD->tryHeight, VD->tryVideoType) ){ VD->setSize(VD->tryWidth, VD->tryHeight); + VD->videoType = VD->tryVideoType; foundSize = true; } else { // try specified size with all formats @@ -2588,6 +2589,7 @@ int videoInput::start(int deviceID, videoDevice *VD){ if(verbose)printf("SETUP: trying format %s @ %i by %i\n", guidStr, VD->tryWidth, VD->tryHeight); if( setSizeAndSubtype(VD, VD->tryWidth, VD->tryHeight, mediaSubtypes[i]) ){ VD->setSize(VD->tryWidth, VD->tryHeight); + VD->videoType = mediaSubtypes[i]; foundSize = true; break; }