I am working on a VideoServer for my company, and in making the cgi files for the Web interface, I came across the following error:
" invalid conversion from ‘int’ to ‘VideoOutputMode‘ "
This was from line 4 of the below code, in the WebInterface file:
form_iterator vout_mode = formData.getElement("DisplaySettingsVOutMode");
if(!vout_mode->isEmpty() && vout_mode != (*formData).end())
{
display.setMode(atoi((**vout_mode).c_str()));
}
display.saveConfiguration();
}
The header file contains the following definition inside the class DisplaySettings:
void setMode(VideoOutputMode mode) { mode_ = mode; };
The enumeration VideoOutputMode, also in the header file, is defined as follows:
enum VideoOutputMode
{
VO_MODE_LOCAL = 0,
VO_MODE_REMOTE = 1,
VO_MODE_PIP = 2,
VO_MODE_FULLSCREEN = 5
};
How do I get the function setmode to properly take the enumeration values? Thanks.