Skip to content

Commit

Permalink
Suppress a redundant call to querying camera list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mysticial committed Sep 28, 2023
1 parent 3dbe9f5 commit 39bc426
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#include "CommonFramework/GlobalSettingsPanel.h"
#include "CameraImplementations.h"

//#include <iostream>
//using std::cout;
//using std::endl;

#if QT_VERSION_MAJOR == 5
#include "VideoToolsQt5.h"
#include "CameraWidgetQt5.h"
Expand Down Expand Up @@ -105,7 +109,10 @@ VideoBackendOption::VideoBackendOption()
std::vector<CameraInfo> get_all_cameras(){
size_t index = GlobalSettings::instance().VIDEO_BACKEND.current_value();
const CameraBackend& backend = *CameraBackends::instance().m_backends[index].backend;
return backend.get_all_cameras();
// cout << "Querying camera list..." << endl;
std::vector<CameraInfo> ret = backend.get_all_cameras();
// cout << "Done querying camera list..." << endl;
return ret;
}
std::string get_camera_name(const CameraInfo& info){
size_t index = GlobalSettings::instance().VIDEO_BACKEND.current_value();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CameraSelectorWidget::CameraSelectorWidget(

m_camera_box = new NoWheelComboBox(this);
camera_row->addWidget(m_camera_box, 5);
update_camera_list();
// update_camera_list();
camera_row->addSpacing(5);

m_resolution_box = new NoWheelComboBox(this);
Expand Down

0 comments on commit 39bc426

Please sign in to comment.