Closed Jendker closed 3 years ago
@Jendker I'll close this PR as I reimplemented it in this other one: https://github.com/ros-drivers/video_stream_opencv/pull/95
The intention of the parameter to have a minimum of 1 is to have literally one image in the buffer, and as you found out, we could have two this way. Thanks for reporting!
We should allow buffer_queue_size = 0 to add an option to publish only the latest image. According to https://github.com/ros-drivers/video_stream_opencv/blob/68cde068bed55488a9d452ee12a9158838843589/src/video_stream.cpp#L159 it will still work The frame will be kept in the queue even with queue size = 0 because pop is before the push instruction.