feat: replace OBDownSampleConfig with OBHardwareDecimationConfig

This commit is contained in:
ob-yalian
2026-01-13 17:23:09 +08:00
parent 5ebab41cd0
commit 21dd600302
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -1386,22 +1386,22 @@ void OBCameraNode::setupProfiles() {
selected_profile = profiles->getProfile(0)->as<ob::VideoStreamProfile>(); selected_profile = profiles->getProfile(0)->as<ob::VideoStreamProfile>();
} else { } else {
if (pid == GEMINI_305_PID && elem == DEPTH) { if (pid == GEMINI_305_PID && elem == DEPTH) {
OBDownSampleConfig conf; OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem]; conf.originWidth = width_[elem];
conf.originHeight = height_[elem]; conf.originHeight = height_[elem];
conf.scaleFactor = depth_downscale_; conf.decimationFactor = depth_downscale_;
selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]); selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]);
} else if (pid == GEMINI_305_PID && elem == INFRA1) { } else if (pid == GEMINI_305_PID && elem == INFRA1) {
OBDownSampleConfig conf; OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem]; conf.originWidth = width_[elem];
conf.originHeight = height_[elem]; conf.originHeight = height_[elem];
conf.scaleFactor = left_ir_downscale_; conf.decimationFactor = left_ir_downscale_;
selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]); selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]);
} else if (pid == GEMINI_305_PID && elem == INFRA2) { } else if (pid == GEMINI_305_PID && elem == INFRA2) {
OBDownSampleConfig conf; OBHardwareDecimationConfig conf;
conf.originWidth = width_[elem]; conf.originWidth = width_[elem];
conf.originHeight = height_[elem]; conf.originHeight = height_[elem];
conf.scaleFactor = right_ir_downscale_; conf.decimationFactor = right_ir_downscale_;
selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]); selected_profile = profiles->getVideoStreamProfile(conf, format_[elem], fps_[elem]);
} else { } else {
selected_profile = profiles->getVideoStreamProfile(width_[elem], height_[elem], selected_profile = profiles->getVideoStreamProfile(width_[elem], height_[elem],
+1 -1
View File
@@ -34,7 +34,7 @@ void listSensorProfiles(const std::shared_ptr<ob::Device>& device) {
<< magic_enum::enum_name(profile->getFormat()) << magic_enum::enum_name(profile->getFormat())
<< " | Weight: " << profile->getDownSampleConfig().originWidth << " | Weight: " << profile->getDownSampleConfig().originWidth
<< " Height: " << profile->getDownSampleConfig().originHeight << " Height: " << profile->getDownSampleConfig().originHeight
<< " downscale:" << profile->getDownSampleConfig().scaleFactor << std::endl; << " downscale:" << profile->getDownSampleConfig().decimationFactor << std::endl;
} else if (sensor->getType() == OB_SENSOR_COLOR || sensor->getType() == OB_SENSOR_DEPTH || } else if (sensor->getType() == OB_SENSOR_COLOR || sensor->getType() == OB_SENSOR_DEPTH ||
sensor->getType() == OB_SENSOR_IR || sensor->getType() == OB_SENSOR_IR_LEFT || sensor->getType() == OB_SENSOR_IR || sensor->getType() == OB_SENSOR_IR_LEFT ||
sensor->getType() == OB_SENSOR_IR_RIGHT) { sensor->getType() == OB_SENSOR_IR_RIGHT) {