Skip to content
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

Merged
merged 3 commits into from
Nov 4, 2020

Conversation

ev-mp
Copy link
Collaborator

@ev-mp ev-mp commented Nov 1, 2020

Reenable Webcam streaming, with YUYV/2 and MJPEG formats
Present USB type field.
Extract UVC Header timestamp (metadata) when applicable.

ev-mp and others added 3 commits October 27, 2020 14:45
@ev-mp ev-mp requested a review from aangerma November 2, 2020 16:09
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))),
Copy link
Contributor

@aangerma aangerma Nov 2, 2020

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?

Copy link
Collaborator Author

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();
Copy link
Contributor

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.

Copy link
Collaborator Author

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); });
Copy link
Contributor

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?

Copy link
Collaborator Author

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

@ev-mp ev-mp merged commit 11f5886 into IntelRealSense:development Nov 4, 2020
@ev-mp ev-mp deleted the Platform_camera_fix branch November 4, 2020 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants