Return false if cannot adapt packed size with mtu max of network adapter
This commit is contained in:
parent
686737e24f
commit
a419ecfde5
@ -186,7 +186,8 @@ bool CvCaptureCAM_PvAPI::open( int index )
|
||||
//PvAttrEnumGet(Camera.Handle, "pixelFormat", pixelFormat,256,NULL);
|
||||
maxSize = 8228;
|
||||
PvAttrUint32Get(Camera.Handle,"PacketSize",&maxSize);
|
||||
PvCaptureAdjustPacketSize(Camera.Handle,maxSize);
|
||||
if (PvCaptureAdjustPacketSize(Camera.Handle,maxSize)!=ePvErrSuccess)
|
||||
return false;
|
||||
//printf ("Pixel Format %s %d %d\n ", pixelFormat,frameWidth,frameHeight);
|
||||
if (strncmp(pixelFormat, "Mono8",NULL)==0) {
|
||||
grayframe = cvCreateImage(cvSize((int)frameWidth, (int)frameHeight), IPL_DEPTH_8U, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user