Commit c54928e0 authored by Artur Wieczorek's avatar Artur Wieczorek

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).
parent efd237b8
...@@ -2567,6 +2567,7 @@ int videoInput::start(int deviceID, videoDevice *VD){ ...@@ -2567,6 +2567,7 @@ int videoInput::start(int deviceID, videoDevice *VD){
if( setSizeAndSubtype(VD, VD->tryWidth, VD->tryHeight, VD->tryVideoType) ){ if( setSizeAndSubtype(VD, VD->tryWidth, VD->tryHeight, VD->tryVideoType) ){
VD->setSize(VD->tryWidth, VD->tryHeight); VD->setSize(VD->tryWidth, VD->tryHeight);
VD->videoType = VD->tryVideoType;
foundSize = true; foundSize = true;
} else { } else {
// try specified size with all formats // try specified size with all formats
...@@ -2577,6 +2578,7 @@ int videoInput::start(int deviceID, videoDevice *VD){ ...@@ -2577,6 +2578,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(verbose)printf("SETUP: trying format %s @ %i by %i\n", guidStr, VD->tryWidth, VD->tryHeight);
if( setSizeAndSubtype(VD, VD->tryWidth, VD->tryHeight, mediaSubtypes[i]) ){ if( setSizeAndSubtype(VD, VD->tryWidth, VD->tryHeight, mediaSubtypes[i]) ){
VD->setSize(VD->tryWidth, VD->tryHeight); VD->setSize(VD->tryWidth, VD->tryHeight);
VD->videoType = mediaSubtypes[i];
foundSize = true; foundSize = true;
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment