Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor II
52 Views

Getting list of available RealSense devices

Hi,

In my application I have some code borrowed from the RawStreams sample which retrieves a list of RealSense devices currently available so if a user has an F200 and an R200 installed and attached, for example, they can choose which one they want to use. However, the code doesn't only get RealSense devices, it also returns any other cameras currently attached, so if it's running on a laptop or tablet it'll return the device webcam(s) too.

Is there any way to determine whether a device is RealSense-capable or not? I don't want to do anything like "if device.name.contains("realsense")" because what if it gets rebranded etc? I notice that in the deviceInfo, the DUID for my R200 is some long number whereas the same for my device webcam is 0. Will it always be the case that a non-realsense device will have a DUID of 0? Or is there a more robust marker? I don't want to have to change my code each time a new device comes out.

Thanks,

James

0 Kudos
2 Replies
Highlighted
Employee
52 Views

James, you can use QueryDeviceInfo API and check model field.

0 Kudos
Highlighted
Valued Contributor II
52 Views

Thanks both, looks to be working well.

0 Kudos