Unique Identification of a particular device type - webcam

Win32_PnPEntity class has so many properties but I want to know that is there any property which identifies the type of device uniquely . For example I have a fingerprint scanner device and its device id is something like this "USB\VID_0A86" but as per my understanding it will be different for a device with different vendor.
I want to know the property whose value is same for all type of fingerprint scanners. Similarly same scenario for all webcams.

I found the solution myself, it is the ClassGuid :
>>>>>check it here<<<<<

Related

How to change Wear OS complication type programmatically

I'm working on a watch face for Wear OS based on this example: https://github.com/android/wear-os-samples/tree/main/WatchFaceKotlin.
Samsung Heart Rate complication has a MONOCHROMATIC_IMAGE type and it doesn't provide heart rate value.
I already know how to get this value form SHealth. I'd like to change this complication type to SHORT_TEXT and set HR value programmatically.
Is it possible?
Also I know how to make my own complication data provider, but it's a separate service that appears in the list of all available complication providers.
Yes. Modify the type of complications in ComplicationUtils.kt.
Note:The top type which you declare is the top preference. You want SHORT_TEXT, put the SHORT_TEXT on the top of the list
https://github.com/android/wear-os-samples/blob/a49c45cecd01d169f7e863b3f99f2f74aea02fec/WatchFaceKotlin/app/src/main/java/com/example/android/wearable/alpha/utils/ComplicationUtils.kt#L56-L64
object Left : ComplicationConfig(
LEFT_COMPLICATION_ID,
listOf(
ComplicationType.RANGED_VALUE,
ComplicationType.MONOCHROMATIC_IMAGE,
ComplicationType.SHORT_TEXT,
ComplicationType.SMALL_IMAGE
)
)

Determining gnuradio block input and output types directly from block

I know that from their input and output signatures, it's possible to determine the size of a gnuradio block's input and output items. I am wondering whether it's also possible to directly determine input and output type (float vs complex etc) from a block.
Within the GNU Radio runtime, only the size is stored. Type information only exists in the source code, and in GNU Radio Companion if you are using that.
So, no, you cannot get type information from a block object that already exists — except by imperfect outside-information strategies like looking up the block's name in the installed GRC data files to guess what the type is.
Because there are no types but only sizes, items can be reinterpreted if they are the same size, which may occasionally be useful; for example, you can connect a block producing "complex" to one expecting "vector of 2 floats" and get a useful result since a complex is represented as two floats.

How can I test the equality of two MediaStreams?

I'm wondering if there is a way to determine if two MediaStreams are equal.
What do you mean by "equal"?
I'd like to determine if the two streams are using the same hardware sources (Same microphone and camera are being used).
Acquiring streamB with the exact same constraints as streamA would mean they are equal.
Here is what I've tried so far:
comparing via the MediaStream id e.g.: streamA.id == streamB.id
This falls away since according to the spec:
When a MediaStream object is created, the User Agent must generate an identifier string, and must initialize the object's id attribute to that string. A good practice is to use a UUID [rfc4122], which is 36 characters long in its canonical form. To avoid fingerprinting, implementations should use the forms in section 4.4 or 4.5 of RFC 4122 when generating UUIDs.
Compare the id's of the MediaStreamTracks - same story, a UUID is generated per track.
Compare the tracks labels, which in the current Chrome contain names/identifiers of the hardware. This is very close to what I'm looking for, however (emphasis mine):
User Agents may label audio and video sources (e.g., "Internal microphone" or "External USB Webcam"). The label attribute must return the label of the object's corresponding source, if any. If the corresponding source has or had no label, the attribute must instead return the empty string
Is there a different approach I could take? Should I never end up in a situation where I compare two media streams? Would you say I can trust the label attribute?
Thanks for your time.
groupId together with kind is probably the closest thing you will get. Until you get multiple mics/cams on the same device...

How to identify Drive ID?

The new Google Drive Android API has 2 types of string IDs available, the 'resource' ID and the 'encoded' ID.
'encoded' id from DriveId.encodeToString()
"DriveId:CAESHDBCMW1RVVcyYUZKZmRhakIzMDBVbXMYjAUgssy8yYFRTTNKRU55"
'resource' id from DriveId.getResourceId()
"UW2aFJfdajB3M3JENy00Ums0B1mQ"
In the process I end-up with a string that can contain any one of them (result of some timing issues). My question is:
If I need to 'parse' the string in order to identify the type, is there a characteristic I can rely on? For instance:
'encoded' id will always start with 'DriveId:' substring
'resource' id will have some length limit
can I abuse error return from 'decodeFromString()'?
or should I form (pre-pend) the string container with my own tag? What could be the minimal 'safe' tag (i.e. what will never appear in the beginning of these ids) ?
Please point me in the right direction so I don't have to re-do it with the next release.
I have run into yet another issue that should be mentioned here so others don't waste time falling into the same pit. The 'resourceID' can be ported and will remain unique for the object it identifies, where 'encodedID' has only 'device' scope. Means that you CAN'T transfer 'encodedID' to another device (with the same account) and try to retrieve file/folder with it. So I assume it is unique to a Google Play Services instance.
Please do not rely on any formatting of either ID type. This are subject to change without notice.
If you need to use both, and track the differences between them you should have your own method of doing so within your app.
Really, you should probably always just store the encoded ID since this one is always guaranteed to present, and if it contains a resourceId, its easy to get back out.

Incorrect domain name in objective-c for mac machine

I am trying to get the domain name of my macbook pro using following method.
NSString *name = [[NSHost currentHost] name];
It returns me the name like 'The-Special-MBP.local' but this is not consistent, It returns me some other string sometimes.
I am not getting why is this happening, the same function call returns two different values at different times.
Basically I need to indicate the different machines in network with some unique id or string hence I am reading the name from NSHost class but it gives different values for same machine.
Any help is appreciated.
If you want a unique id for your MAC, you may refer the following:
https://stackoverflow.com/a/5868967/1987246
It depends on your ethernet connection. Please you are connected in same network