* @brief Drains every pending frame without closing resources; keeps the worker reusable and * deliberately ignores the enabled flag so a just-disabled consumer still writes out its backlog. */
| 127 | * deliberately ignores the enabled flag so a just-disabled consumer still writes out its backlog. |
| 128 | */ |
| 129 | void flush() override |
| 130 | { |
| 131 | try { |
| 132 | // code-verify off: bounded queue drain; each drainBatch() consumes items or returns 0 |
| 133 | while (drainBatch() > 0) { |
| 134 | } |
| 135 | // code-verify on |
| 136 | } catch (const std::exception& e) { |
| 137 | qWarning() << "[FrameConsumer] Exception during flush:" << e.what(); |
| 138 | } catch (...) { |
| 139 | qWarning() << "[FrameConsumer] Unknown exception during flush"; |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | protected: |
| 144 | virtual void processItems(const std::vector<T>& items) = 0; |
no outgoing calls
no test coverage detected