|
|
@ -308,10 +308,27 @@ bool CvCaptureCAM_PvAPI::setProperty( int property_id, double value ) |
|
|
|
monocrome=false; |
|
|
|
monocrome=false; |
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case CV_CAP_PROP_EXPOSURE: |
|
|
|
case CV_CAP_PROP_EXPOSURE: |
|
|
|
if (PvAttrUint32Set(Camera.Handle,"ExposureValue",(tPvUint32)value)==ePvErrSuccess) |
|
|
|
if ((PvAttrUint32Set(Camera.Handle,"ExposureValue",(tPvUint32)value)==ePvErrSuccess))
|
|
|
|
break; |
|
|
|
break; |
|
|
|
else |
|
|
|
else |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
case CV_CAP_PROP_PVAPI_MULTICASTIP: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (value==-1) { |
|
|
|
|
|
|
|
if ((PvAttrEnumSet(Camera.Handle,"MulticastEnable", "Off")==ePvErrSuccess))
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
string ip=cv::format("%d.%d.%d.%d", (value>>24)&255, (value>>16)&255, (value>>8)&255, value&255); |
|
|
|
|
|
|
|
if ((PvAttrEnumSet(Camera.Handle,"MulticastEnable", "On")==ePvErrSuccess) && |
|
|
|
|
|
|
|
(PvAttrStringSet(priv->handle, "MulticastIPAddress", ip.c_str())==ePvErrSuccess)) { |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
default: |
|
|
|
default: |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|