ros-drivers / video_stream_opencv

A package to open video streams and publish them in ROS using the opencv videocapture mechanism
227 stars 159 forks source link

framesQueue.pull(_drop_frame) never returns #19

Closed BourgeoisLab closed 3 years ago

BourgeoisLab commented 6 years ago

Hi, I experienced a strange thing when setting buffer_queue_size=1. After some time (less than 1min) the call of framesQueue.pull(_drop_frame) in do_capture() doesn't return. So I don't get any new frame.

This happens only on the Jetson TX2. Setting buffer_queue_size=2 seems to work.

Also maybe you could use boost::lockfree::spsc_queue. But I think you can't have a variable length of the queue though.

Cheers

awesomebytes commented 6 years ago

That must be some race condition... But it should not hang forever, I think. I'm glad it worked with queue_size=2 tho!