File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed
SerialPrograms/Source/CommonFramework/VideoPipeline Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ void VideoSession::set_source(const std::shared_ptr<VideoSourceDescriptor>& devi
123123 m_logger.log (" Changing video..." , COLOR_GREEN);
124124 dispatch_to_main_thread ([this , device]{
125125 std::lock_guard<std::mutex> lg0 (m_reset_lock);
126- if (*m_descriptor == *device){
126+ if (*m_descriptor == *device && !m_descriptor-> should_reload () ){
127127 return ;
128128 }
129129
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ class VideoSourceDescriptor{
3838 virtual ~VideoSourceDescriptor () = default ;
3939
4040public:
41+ virtual bool should_reload () const { return false ; }
4142 virtual bool operator ==(const VideoSourceDescriptor& x) const = 0 ;
4243 virtual std::string display_name () const = 0;
4344
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class VideoSourceDescriptor_StillImage : public VideoSourceDescriptor{
3636 // Otherwise, return 0.
3737 size_t source_image_height () const {return m_source_image_height;}
3838
39+ virtual bool should_reload () const override { return true ; }
3940 virtual bool operator ==(const VideoSourceDescriptor& x) const override ;
4041 virtual std::string display_name () const override {
4142 return " Display Image" ;
You can’t perform that action at this time.
0 commit comments