Merge pull request #1129 from vpisarev:revert_bad_qtkit_patch
This commit is contained in:
commit
77fe7f479c
@ -277,8 +277,11 @@ bool CvCaptureCAM::grabFrame(double timeOut) {
|
||||
double sleepTime = 0.005;
|
||||
double total = 0;
|
||||
|
||||
while (![capture updateImage] && (total += sleepTime)<=timeOut)
|
||||
usleep((int)(sleepTime*1000));
|
||||
NSDate *loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime];
|
||||
while (![capture updateImage] && (total += sleepTime)<=timeOut &&
|
||||
[[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode
|
||||
beforeDate:loopUntil])
|
||||
loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime];
|
||||
|
||||
[localpool drain];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user