From 960c5f0825e968b40ee5aa160300b415a5bfa354 Mon Sep 17 00:00:00 2001 From: Xinyu Li Date: Fri, 4 Oct 2024 11:23:46 -0700 Subject: [PATCH 1/3] add --- src/bb/image-io/rt_u3v.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bb/image-io/rt_u3v.h b/src/bb/image-io/rt_u3v.h index 6bc1c73f..ff83fff0 100644 --- a/src/bb/image-io/rt_u3v.h +++ b/src/bb/image-io/rt_u3v.h @@ -657,6 +657,9 @@ class U3V { log::error(err_->message); err_ = nullptr; } else { +#ifdef _WIN32 + order_filp_ = false; +#else if (strcmp(device_vender_name, "Sony Semiconductor Solutions Corporation") == 0) { const char *device_model_name; device_model_name = arv_device_get_string_feature_value(devices_[index_on_opened_device].device_, "DeviceModelName", &err_); @@ -676,7 +679,7 @@ class U3V { } } } - +#endif log::info("\tDevice/USB {}::{} : {}", index_on_opened_device, "frame_count method is ", frame_count_method_ == FrameCountMethod::TIMESTAMP ? "Timestamp" : frame_count_method_ == FrameCountMethod::TYPESPECIFIC3 ? "TypeSpecific" : From c77ccdc1ca73857cfe58cff81ac3f7a03adf78ba Mon Sep 17 00:00:00 2001 From: Xinyu Li Date: Fri, 4 Oct 2024 13:45:28 -0700 Subject: [PATCH 2/3] update --- src/bb/image-io/rt_u3v.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/bb/image-io/rt_u3v.h b/src/bb/image-io/rt_u3v.h index ff83fff0..285fa4dd 100644 --- a/src/bb/image-io/rt_u3v.h +++ b/src/bb/image-io/rt_u3v.h @@ -656,28 +656,28 @@ class U3V { if (err_) { log::error(err_->message); err_ = nullptr; - } else { + device_vender_name = ""; + } #ifdef _WIN32 order_filp_ = false; #else - if (strcmp(device_vender_name, "Sony Semiconductor Solutions Corporation") == 0) { - const char *device_model_name; - device_model_name = arv_device_get_string_feature_value(devices_[index_on_opened_device].device_, "DeviceModelName", &err_); - if (err_) { - log::error(err_->message); - err_ = nullptr; - } else { - if (strcmp(device_model_name, " ") == 0) { - is_param_integer_ = true; - frame_count_method_ = FrameCountMethod::TIMESTAMP; - arv_uv_device_set_usb_mode(devices_[index_on_opened_device].device_, ARV_UV_USB_MODE_SYNC); // hotfix for v1.0 - } - } - if (is_gendc_) { - frame_count_method_ = FrameCountMethod::TYPESPECIFIC3; - order_filp_ = true; + if (strcmp(device_vender_name, "Sony Semiconductor Solutions Corporation") == 0) { + const char *device_model_name; + device_model_name = arv_device_get_string_feature_value(devices_[index_on_opened_device].device_, "DeviceModelName", &err_); + if (err_) { + log::error(err_->message); + err_ = nullptr; + } else { + if (strcmp(device_model_name, " ") == 0) { + is_param_integer_ = true; + frame_count_method_ = FrameCountMethod::TIMESTAMP; + arv_uv_device_set_usb_mode(devices_[index_on_opened_device].device_, ARV_UV_USB_MODE_SYNC); // hotfix for v1.0 } } + if (is_gendc_) { + frame_count_method_ = FrameCountMethod::TYPESPECIFIC3; + order_filp_ = true; + } } #endif log::info("\tDevice/USB {}::{} : {}", index_on_opened_device, "frame_count method is ", From d1fee9a9f7c3db90805fdf28aefd6ffdc10882fd Mon Sep 17 00:00:00 2001 From: Xinyu Li Date: Thu, 10 Oct 2024 11:45:32 -0700 Subject: [PATCH 3/3] fix --- src/bb/image-io/rt_u3v.h | 41 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/bb/image-io/rt_u3v.h b/src/bb/image-io/rt_u3v.h index 285fa4dd..8e4a3cfb 100644 --- a/src/bb/image-io/rt_u3v.h +++ b/src/bb/image-io/rt_u3v.h @@ -656,30 +656,29 @@ class U3V { if (err_) { log::error(err_->message); err_ = nullptr; - device_vender_name = ""; - } -#ifdef _WIN32 - order_filp_ = false; -#else - if (strcmp(device_vender_name, "Sony Semiconductor Solutions Corporation") == 0) { - const char *device_model_name; - device_model_name = arv_device_get_string_feature_value(devices_[index_on_opened_device].device_, "DeviceModelName", &err_); - if (err_) { - log::error(err_->message); - err_ = nullptr; - } else { - if (strcmp(device_model_name, " ") == 0) { - is_param_integer_ = true; - frame_count_method_ = FrameCountMethod::TIMESTAMP; - arv_uv_device_set_usb_mode(devices_[index_on_opened_device].device_, ARV_UV_USB_MODE_SYNC); // hotfix for v1.0 + } else { + if (strcmp(device_vender_name, "Sony Semiconductor Solutions Corporation") == 0) { + const char *device_model_name; + device_model_name = arv_device_get_string_feature_value(devices_[index_on_opened_device].device_, "DeviceModelName", &err_); + if (err_) { + log::error(err_->message); + err_ = nullptr; + } else { + if (strcmp(device_model_name, " ") == 0) { + is_param_integer_ = true; + frame_count_method_ = FrameCountMethod::TIMESTAMP; + arv_uv_device_set_usb_mode(devices_[index_on_opened_device].device_, ARV_UV_USB_MODE_SYNC); // hotfix for v1.0 + } + } + if (is_gendc_) { + frame_count_method_ = FrameCountMethod::TYPESPECIFIC3; +#ifndef _WIN32 + order_filp_ = true; +#endif } - } - if (is_gendc_) { - frame_count_method_ = FrameCountMethod::TYPESPECIFIC3; - order_filp_ = true; } } -#endif + log::info("\tDevice/USB {}::{} : {}", index_on_opened_device, "frame_count method is ", frame_count_method_ == FrameCountMethod::TIMESTAMP ? "Timestamp" : frame_count_method_ == FrameCountMethod::TYPESPECIFIC3 ? "TypeSpecific" :