add a config dialog.

This commit is contained in:
Tiny 2018-12-19 18:14:05 +08:00
parent cf79c71c1d
commit 2f5860bcb0

View File

@ -252,7 +252,7 @@ struct device : public AVfoundationCamera{
return _product_id; return _product_id;
} }
std::string get_video_name() const { std::string get_video_name() const {
return std::string("video name is not supported on osx."); return std::string("[video name is not supported on osx]");
} }
void setup_camera() { void setup_camera() {
@ -302,6 +302,7 @@ struct device : public AVfoundationCamera{
return; return;
} }
start_capture(); start_capture();
showSettingsDialog(false);
thread = std::thread([this]() { thread = std::thread([this]() {
while (!stop) while (!stop)
poll(); poll();
@ -317,6 +318,13 @@ struct device : public AVfoundationCamera{
stop_capture(); stop_capture();
} }
} }
// void reset_options_to_default() {
// setCameraSetting(BRIGHTNESS, 120);
// setCameraSetting(CONTRAST, 127);
// setCameraSetting(GAIN, 24);
// setCameraSetting(SATURATION, 192);
// }
}; };
std::vector <struct device*> device::s_devices; std::vector <struct device*> device::s_devices;