void playback_sensor::register_sensor_infos(const device_serializer::sensor_snapshot& sensor_snapshot) { auto info_snapshot = sensor_snapshot.get_sensor_extensions_snapshots().find(RS2_EXTENSION_INFO); if (info_snapshot == nullptr) { LOG_WARNING("Recorded file does not contain sensor information"); return; } auto info_api = As<info_interface>(info_snapshot); if (info_api == nullptr) { throw invalid_value_exception("Failed to get info interface from sensor snapshots"); } for (int i = 0; i < RS2_CAMERA_INFO_COUNT; ++i) { rs2_camera_info info = static_cast<rs2_camera_info>(i); if (info_api->supports_info(info)) { const std::string& str = info_api->get_info(info); register_info(info, str); LOG_DEBUG("Registered " << info << " for sensor " << m_sensor_id << " with value: " << str); } } }
platform_camera(const std::shared_ptr<context>& ctx, const std::vector<platform::uvc_device_info>& uvc_infos, const platform::backend_device_group& group, bool register_device_notifications) : device(ctx, group, register_device_notifications) { std::vector<std::shared_ptr<platform::uvc_device>> devs; for (auto&& info : uvc_infos) devs.push_back(ctx->get_backend().create_uvc_device(info)); auto color_ep = std::make_shared<platform_camera_sensor>(ctx, this, 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()))); add_sensor(color_ep); register_info(RS2_CAMERA_INFO_NAME, "Platform Camera"); std::string pid_str(to_string() << std::setfill('0') << std::setw(4) << std::hex << uvc_infos.front().pid); std::transform(pid_str.begin(), pid_str.end(), pid_str.begin(), ::toupper); register_info(RS2_CAMERA_INFO_SERIAL_NUMBER, uvc_infos.front().unique_id); register_info(RS2_CAMERA_INFO_PHYSICAL_PORT, uvc_infos.front().device_path); register_info(RS2_CAMERA_INFO_PRODUCT_ID, pid_str); color_ep->register_pixel_format(pf_yuy2); color_ep->register_pixel_format(pf_yuyv); color_ep->try_register_pu(RS2_OPTION_BACKLIGHT_COMPENSATION); color_ep->try_register_pu(RS2_OPTION_BRIGHTNESS); color_ep->try_register_pu(RS2_OPTION_CONTRAST); color_ep->try_register_pu(RS2_OPTION_EXPOSURE); color_ep->try_register_pu(RS2_OPTION_GAMMA); color_ep->try_register_pu(RS2_OPTION_HUE); color_ep->try_register_pu(RS2_OPTION_SATURATION); color_ep->try_register_pu(RS2_OPTION_SHARPNESS); color_ep->try_register_pu(RS2_OPTION_WHITE_BALANCE); color_ep->try_register_pu(RS2_OPTION_ENABLE_AUTO_EXPOSURE); color_ep->try_register_pu(RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE); }
void info(int to, void *to_arg) { erts_memory(&to, to_arg, NULL, THE_NON_VALUE); atom_info(to, to_arg); module_info(to, to_arg); export_info(to, to_arg); register_info(to, to_arg); erts_fun_info(to, to_arg); erts_node_table_info(to, to_arg); erts_dist_table_info(to, to_arg); erts_allocated_areas(&to, to_arg, NULL); erts_allocator_info(to, to_arg); }
software_device::software_device() : device(std::make_shared<context>(backend_type::standard), {}) { register_info(RS2_CAMERA_INFO_NAME, "Software-Device"); }