, binary_location(node->string_child("BinaryLocation"))
, selected(node->number_child<int>("Selected"))
, licence_server(node->string_child("LicenceServer"))
- , licence_port(node->number_child<int>("LicencePort"))
, licence(node->string_child("Licence"))
{
node->add_child("Enable")->add_child_text((enable ? "1" : "0"));
node->add_child("Selected")->add_child_text(raw_convert<string>(selected));
node->add_child("LicenceServer")->add_child_text(licence_server);
- node->add_child("LicencePort")->add_child_text(raw_convert<string>(licence_port));
node->add_child("Licence")->add_child_text(licence);
}
uint32_t fps,
uint32_t bandwidth,
const std::string server,
- uint32_t port,
const std::string license
)
{
-
std::unique_lock<std::mutex> lk(shutdownMutex_);
if (async_result_.valid()) {
return true;
init_.unlink();
}
startThreads();
- auto fullServer = server + ":" + std::to_string(port);
char cmd[4096];
snprintf(cmd, sizeof(cmd),
"./grk_compress -batch_src %s,%d,%d,%d,%d,%d -out_fmt j2k -k 1 "
"-G %d -%s %d,%d -j %s -J %s -v",
GRK_MSGR_BATCH_IMAGE.c_str(), width, stride, height, samplesPerPixel, depth,
device, is4K ? "cinema4K" : "cinema2K", fps, bandwidth,
- license.c_str(), fullServer.c_str());
+ license.c_str(), server.c_str());
return launch(cmd, dir);
}
_server = new wxTextCtrl(_panel, wxID_ANY);
table->Add(_server, 1, wxEXPAND | wxALL);
- add_label_to_sizer(table, _panel, _("Port"), false, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
- _port = new wxSpinCtrl(_panel, wxID_ANY);
- _port->SetRange(0, 65535);
- table->Add(_port);
-
add_label_to_sizer(table, _panel, _("License"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
_licence = new PasswordEntry(_panel);
table->Add(_licence->get_panel(), 1, wxEXPAND | wxALL);
_enable_gpu->bind(&GPUPage::enable_gpu_changed, this);
_binary_location->Bind(wxEVT_DIRPICKER_CHANGED, boost::bind (&GPUPage::binary_location_changed, this));
_server->Bind(wxEVT_TEXT, boost::bind(&GPUPage::server_changed, this));
- _port->Bind(wxEVT_SPINCTRL, boost::bind(&GPUPage::port_changed, this));
_licence->Changed.connect(boost::bind(&GPUPage::licence_changed, this));
setup_sensitivity();
_binary_location->Enable(grok.enable);
_gpu_list_control->Enable(grok.enable);
_server->Enable(grok.enable);
- _port->Enable(grok.enable);
_licence->get_panel()->Enable(grok.enable);
}
_gpu_list_control->update();
_gpu_list_control->set_selection(grok.selected);
checked_set(_server, grok.licence_server);
- checked_set(_port, grok.licence_port);
checked_set(_licence, grok.licence);
}
void port_changed()
{
auto grok = Config::instance()->grok().get_value_or({});
- grok.licence_port = _port->GetValue();
Config::instance()->set_grok(grok);
}
wxDirPickerCtrl* _binary_location = nullptr;
GpuList* _gpu_list_control = nullptr;
wxTextCtrl* _server = nullptr;
- wxSpinCtrl* _port = nullptr;
PasswordEntry* _licence = nullptr;
};