Skip to content

Fix Platform Camera streaming and controls - #7693

Merged
ev-mp merged 3 commits into
realsenseai:developmentfrom
ev-mp:Platform_camera_fix
Nov 4, 2020
Merged

ev-mp merged 3 commits into
realsenseai:developmentfrom
ev-mp:Platform_camera_fix

Conversation

@ev-mp

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

Copy link
Copy Markdown
Contributor

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

Evgeni Raikhel and others added 3 commits October 27, 2020 14:45
@ev-mp
ev-mp requested a review from aangerma November 2, 2020 16:09
Comment thread src/context.cpp
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))),

@aangerma aangerma Nov 2, 2020 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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

Comment thread src/sensor.cpp
}

// Check getter only due to options coupling (e.g. Exposure<->AutoExposure)
auto val = option->query();

Copy link
Copy Markdown
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
Copy Markdown
Contributor 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.

Comment thread src/context.cpp
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
Copy Markdown
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
Copy Markdown
Contributor 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 realsenseai: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