This document introduces two different methods for setting Metadata, explaining their advantages, disadvantages, and precautions.
To get device timestamps through UVC protocol, users need to modify the registry and complete registration first, because Windows system has default limitations.
- Connect the device and confirm that the device is online;
- Open powershell with administrator privileges, then
cd
command to enter thescripts
directory; - Execute the
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
command, and enterY
as prompted to confirm; - Execute
.\obsensor_metadata_win10.ps1 -op install_all
to complete the registration.
Notes
Users need to run this script every time a new device is connected. This process can be cumbersome and easy to forget, leading to an inability to obtain the device's Metadata.
The purpose of the WindowsMetaDataHelper code(Script\WindowsMetaDataHelper) is to demonstrate how to programmatically register Metadata on the Windows platform.
Notes
- The code must be run with administrator privileges, and the PID and VID passed into the code must be in decimal format.
- If multiple different types of device(different PID) are used, the registration code must be called for the PID of each device.
Advantages
Devices of the same type (same PID) only need to be registered once, and new devices can be recognized for Metadata without additional registration.