提交 a419ecfd 编写于 作者: S Stefano Fabri

Return false if cannot adapt packed size with mtu max of network adapter

上级 686737e2
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册