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

use variable config instead of class properties #49

Closed furushchev closed 5 years ago

furushchev commented 5 years ago

In the original code, setting configuration directly to VideoCapture object in the callback function of dynamic_reconfigure, where setting parameters may fail if the object is not initialized or opened. (e.g. https://github.com/ros-drivers/video_stream_opencv/blob/master/src/video_stream.cpp#L364 ) This PR changes to let the callback function just update internal variables of the parameters and the subscribe function set all the parameters instead. The internal variables are also replaced with VideoStreamConfig object to make tracking the change of the parameters easier.

furushchev commented 5 years ago

@awesomebytes Could you briefly review this PR when you have time? :)

furushchev commented 5 years ago

@awesomebytes I now merge this PR for now. Please let me know if you have any problem with this.