We are using multiple aravissrc elements as inmput for out Gstreamer pipeline containing multiple models run using Deepstream SDK.
The cameras used are IDS-GV-51FxFA-C cameras with the attached features.
IDS-GV-51FxFA-C-4108842253_features.txt (94.7 KB)
I want to control the Whitebalance color gain values represented as features in lines 701-707 of the features.txt:
Enumeration : 'GainSelector' * Gain EnumEntry : 'DigitalBlue' EnumEntry : 'DigitalGreen' EnumEntry : 'DigitalRed' EnumEntry : 'DigitalAll' EnumEntry : 'AnalogAll'
My question:
How can i set these values over the feature property in C++ using g_lib.
My current code looks like this, and it does not work, since the feature is an EnumEntry and cant be accessed directly.
const std::string& AravisSrcWrapper::build_aravis_features(const ConfigData::CameraConfig& camera_config) {
std::ostringstream features;
features << "BrightnessAutoTarget=" << camera_config.auto_brightness_target << " "
<< "BrightnessAutoPercentile=" << camera_config.auto_brightness_percentile << " "
<< "BalanceWhiteAuto=" << (camera_config.auto_white_balance ? "Once" : "Off") << " "
<< "PixelFormat="
<< "BayerRG8"
<< " "
<< "AcquisitionFrameRate=" << camera_config.fps << " "
<< "DigitalRed=" << camera_config.gain_red << " "
<< "DigitalGreen=" << camera_config.gain_green << " "
<< "DigitalBlue=" << camera_config.gain_blue;
m_features_string = features.str();
return m_features_string;
}
const Config& AravisSrcWrapper::configure_aravissrc_element(const Config& new_config) {
assert(new_config.data().camera_configs.find(m_name) != new_config.data().camera_configs.end());
ConfigData::CameraConfig camera_config = new_config.data().camera_configs.at(m_name);
const std::string& features_string = build_aravis_features(camera_config);
g_object_set(G_OBJECT(mp_aravissrc_element), "exposure", static_cast<float>(camera_config.exposure), "exposure-auto",
(camera_config.auto_exposure ? "Once" : "Off"), "gain", static_cast<float>(camera_config.analog_gain), "gain-auto",
(camera_config.auto_gain ? "Once" : "Off"), "offset-x", camera_config.x_offset, "offset-y",
camera_config.y_offset, "features", features_string.c_str(), NULL);
return mp_config;
}
Is there any special format the feature string has to be in or is setting such entries not supported yet?