mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-13 03:30:18 +08:00
fix: resolve stream profile merge build errors
This commit is contained in:
@@ -3642,9 +3642,10 @@ bool OBCameraNode::validateStreamProfileRequest(
|
||||
try {
|
||||
auto selected_profile = selectVideoStreamProfile(
|
||||
*stream_index, requested_width, requested_height, requested_fps, requested_format);
|
||||
has_changes = has_changes || selected_profile->getWidth() != width_[*stream_index] ||
|
||||
selected_profile->getHeight() != height_[*stream_index] ||
|
||||
selected_profile->getFps() != fps_[*stream_index] ||
|
||||
has_changes = has_changes ||
|
||||
static_cast<int>(selected_profile->getWidth()) != width_[*stream_index] ||
|
||||
static_cast<int>(selected_profile->getHeight()) != height_[*stream_index] ||
|
||||
static_cast<int>(selected_profile->getFps()) != fps_[*stream_index] ||
|
||||
selected_profile->getFormat() != format_[*stream_index];
|
||||
pending_profiles.push_back(
|
||||
{*stream_index, requested_width, requested_height, requested_fps, selected_profile});
|
||||
|
||||
@@ -357,6 +357,7 @@ void OBCameraNode::setupCameraCtrlServices() {
|
||||
"set_image_registration_mode", [this](const std::shared_ptr<SetString::Request> request,
|
||||
std::shared_ptr<SetString::Response> response) {
|
||||
setImageRegistrationModeCallback(request, response);
|
||||
});
|
||||
set_stream_profile_srv_ = node_->create_service<SetStreamProfile>(
|
||||
"set_stream_profile", [this](const std::shared_ptr<SetStreamProfile::Request> request,
|
||||
std::shared_ptr<SetStreamProfile::Response> response) {
|
||||
@@ -750,6 +751,9 @@ void OBCameraNode::setImageRegistrationModeCallback(
|
||||
rollback_after_error(e.what());
|
||||
} catch (...) {
|
||||
rollback_after_error("unknown error");
|
||||
}
|
||||
}
|
||||
|
||||
void OBCameraNode::setStreamProfileCallback(
|
||||
const std::shared_ptr<SetStreamProfile::Request>& request,
|
||||
std::shared_ptr<SetStreamProfile::Response>& response) {
|
||||
|
||||
Reference in New Issue
Block a user