Merge branch '2.4'

This commit is contained in:
Andrey Kamaev
2013-01-31 14:35:27 +04:00
23 changed files with 418 additions and 55 deletions

View File

@@ -1203,7 +1203,7 @@ bool videoInput::setupDevice(int deviceNumber, int w, int h){
bool videoInput::setupDeviceFourcc(int deviceNumber, int w, int h,int fourcc){
if(deviceNumber >= VI_MAX_CAMERAS || VDList[deviceNumber]->readyToCapture) return false;
if ( fourcc > 0 ) {
if ( fourcc != -1 ) {
GUID *mediaType = getMediaSubtypeFromFourcc(fourcc);
if ( mediaType ) {
setAttemptCaptureSize(deviceNumber,w,h,*mediaType);
@@ -2193,7 +2193,7 @@ int videoInput::getFourccFromMediaSubtype(GUID type) {
GUID *videoInput::getMediaSubtypeFromFourcc(int fourcc){
for (int i=0;i<VI_NUM_TYPES;i++) {
if ( (unsigned long)fourcc == mediaSubtypes[i].Data1 ) {
if ( (unsigned long)(unsigned)fourcc == mediaSubtypes[i].Data1 ) {
return &mediaSubtypes[i];
}
}
@@ -3268,8 +3268,8 @@ bool CvCaptureCAM_DShow::setProperty( int property_id, double value )
break;
case CV_CAP_PROP_FOURCC:
fourcc = cvRound(value);
if ( fourcc < 0 ) {
fourcc = (int)(unsigned long)(value);
if ( fourcc == -1 ) {
// following cvCreateVideo usage will pop up caprturepindialog here if fourcc=-1
// TODO - how to create a capture pin dialog
}

View File

@@ -214,7 +214,7 @@ make & enjoy!
#include <sys/types.h>
#include <sys/mman.h>
#ifdef HAVE_CAMVAL
#ifdef HAVE_CAMV4L
#include <linux/videodev.h>
#endif

View File

@@ -499,7 +499,7 @@ CV_IMPL void cvDestroyWindow(const char* name)
CV_IMPL void cvDestroyAllWindows()
{
if (!guiMainThread)
CV_Error( CV_StsNullPtr, "NULL guiReceiver (please create a window)" );
return;
QMetaObject::invokeMethod(guiMainThread,
"destroyAllWindow",