cap_qtkit does not work when the capture is run outside of the main thread. If the capture is launched in a separate thread, then [NSRunLoop currentRunLoop] is not the same as in the main thread, and has no timer. see https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/F oundation/Classes/nsrunloop_Class/Reference/Reference.html "If no input sources or timers are attached to the run loop, this method exits immediately" Using usleep() (which I previously proposed, and was reverted) is not a good alternative, because it may block the GUI. Here is the new proposed solution: - create a dummy timer so that runUntilDate does not exit immediately - simplify the loop by using runUntilDate instead of runMode:beforeDate - fix potential memory leaks (pointed out by Xcode's static analysis) - fix init to follow Objective-C guidelines - fax warnings about conversions from size_t to int |
||
|---|---|---|
| 3rdparty | ||
| apps | ||
| cmake | ||
| data | ||
| doc | ||
| include | ||
| modules | ||
| platforms | ||
| samples | ||
| .gitattributes | ||
| .gitignore | ||
| CMakeLists.txt | ||
| index.rst | ||
| README | ||
OpenCV: open source computer vision library Homepage: http://opencv.org Online docs: http://docs.opencv.org Q&A forum: http://answers.opencv.org Dev zone: http://code.opencv.org Please read before starting work on a pull request: http://code.opencv.org/projects/opencv/wiki/How_to_contribute Summary of guidelines: * One pull request per issue; * Choose the right base branch; * Include tests and documentation; * Clean up "oops" commits before submitting; * Follow the coding style guide.