| 51 | } |
| 52 | |
| 53 | size_t FrameQuery::ForEachConsume(ProcessTracker& tracker, BlobContainer& blobs, std::function<void(const uint8_t*)> frameHandler) |
| 54 | { |
| 55 | size_t nFramesProcessed = 0; |
| 56 | do { |
| 57 | Consume(tracker, blobs); |
| 58 | const auto nPopulated = blobs.GetNumBlobsPopulated(); |
| 59 | for (uint32_t i = 0; i < nPopulated; i++) { |
| 60 | frameHandler(blobs[i]); |
| 61 | } |
| 62 | nFramesProcessed += nPopulated; |
| 63 | } while (blobs.AllBlobsPopulated()); |
| 64 | return nFramesProcessed; |
| 65 | } |
| 66 | |
| 67 | BlobContainer FrameQuery::MakeBlobContainer(uint32_t nBlobs) const |
| 68 | { |