revert patch from PR 1074, since it break capturing on MacOSX

pull/1129/head
Vadim Pisarevsky 12 years ago
parent 886c009da6
commit be040ff513
  1. 7
      modules/highgui/src/cap_qtkit.mm

@ -277,8 +277,11 @@ bool CvCaptureCAM::grabFrame(double timeOut) {
double sleepTime = 0.005; double sleepTime = 0.005;
double total = 0; double total = 0;
while (![capture updateImage] && (total += sleepTime)<=timeOut) NSDate *loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime];
usleep((int)(sleepTime*1000)); while (![capture updateImage] && (total += sleepTime)<=timeOut &&
[[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode
beforeDate:loopUntil])
loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime];
[localpool drain]; [localpool drain];

Loading…
Cancel
Save