-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Platform Camera streaming and controls #7693
Conversation
Log USB type field. Extract UVC Header timestamp when applicable
auto raw_color_ep = std::make_shared<uvc_sensor>("Raw RGB Camera", | ||
std::make_shared<platform::multi_pins_uvc_device>(devs), | ||
std::unique_ptr<ds5_timestamp_reader>(new ds5_timestamp_reader(environment::get_instance().get_time_service())), | ||
std::unique_ptr<frame_timestamp_reader>(new ds5_timestamp_reader_from_metadata(std::move(host_timestamp_reader_backup))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you want to read metadata from platform_camera?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Picking up HW timestamps - useful in tests
} | ||
|
||
// Check getter only due to options coupling (e.g. Exposure<->AutoExposure) | ||
auto val = option->query(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think its good idea to call here to query , if the query will fail we wont see this option at all,
while it can be temporary failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows for dynamic controls discovery, and actually allows to remove/mark degenerated controls before they reach user level.
In general this should be replaced with built-in API calls, at least for PUs, but it will be a long-term shot.
raw_color_ep->try_register_pu(RS2_OPTION_WHITE_BALANCE); | ||
raw_color_ep->try_register_pu(RS2_OPTION_ENABLE_AUTO_EXPOSURE); | ||
raw_color_ep->try_register_pu(RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE); | ||
color_ep->register_processing_block({ {RS2_FORMAT_MJPEG} }, { {RS2_FORMAT_RGB8, RS2_STREAM_COLOR} }, []() { return std::make_shared<mjpeg_converter>(RS2_FORMAT_RGB8); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what will happened if the device doesn't support MJPEG?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be skipped in profiles enumeration ,as with the previous case of UYUV
Reenable Webcam streaming, with YUYV/2 and MJPEG formats
Present USB type field.
Extract UVC Header timestamp (metadata) when applicable.