* Flush the stack, allowing the user to make sure s/he gets the most * up to date image. Delete all images in the stack. */
| 111 | * up to date image. Delete all images in the stack. |
| 112 | */ |
| 113 | void CaptureThread::Flush() |
| 114 | { |
| 115 | CaptureStatus oldCap = capturing; |
| 116 | |
| 117 | capturing = IDLE; |
| 118 | |
| 119 | while (imageQueue.size() > 0) |
| 120 | { |
| 121 | imageQueue.pop(); |
| 122 | |
| 123 | // since you should never release an image gotten by cvRetrieveFrame, |
| 124 | // we don't need to release images here. |
| 125 | } |
| 126 | |
| 127 | capturing = oldCap; |
| 128 | } |
| 129 | |
| 130 | // Display the given image on the frame |
| 131 | // Copies the image so it is safe to change it after the function call |
no outgoing calls
no test coverage detected