Hello,
I use Metavision::camera for reading from a file or a camera, and GenericProducerAlgorithm to get events (in the same way as in the metavision_player example)
Now I want to close the application when all events was read from a file and processed by GenericProducerAlgorithm.
camera::is_running() works as I expects, but not all events are processed at the time of camera::is_running() become false.
I would expect, that GenericProducerAlgorithm::is_done() or GenericProducerAlgorithm::is_source_done() would chage status some time after camera::is_running(), because events could be in the queue of the producer.
However, both functions are never become true.
Am I using the GenericProducerAlgorithm wrong?
there is the parameters of GenericProducerAlgorithm: I have the first 3 to make sure no events will be skipped when reading from file, and the last one, I think, responsible for
latest_event_timestamp_available() become -1 after around 20 seconds of the end of file. allow_drop_when_overfilled": false,
max_duration_stored_ms": 100'000'000,
max_evps": 15'000'000,
"timeout_ms": 20'000,
there is a log of processing file around 300 seconds:
startup |
camera_.is_running() |
genericProducer_->is_done() |
genericProducer_->is_source_done() |
genericProducer_->latest_event_timestamp_available(); |
280 |
1 |
0 |
0 |
279582864 |
290 |
1 |
0 |
0 |
289584041 |
300 |
1 |
0 |
0 |
299587656 |
310 |
0 |
0 |
0 |
300127454 |
320 |
0 |
0 |
0 |
300127454 |
330 |
0 |
0 |
0 |
-1 |
340 |
0 |
0 |
0 |
-1 |