MCPcopy Create free account
hub / github.com/danielpaulus/quicktime_video_hack / findInterfaceForSubclass

Function findInterfaceForSubclass

screencapture/discovery.go:208–220  ·  view source on GitHub ↗
(confDesc gousb.ConfigDesc, subClass gousb.Class)

Source from the content-addressed store, hash-verified

206}
207
208func findInterfaceForSubclass(confDesc gousb.ConfigDesc, subClass gousb.Class) (bool, int) {
209 for _, iface := range confDesc.Interfaces {
210 for _, alt := range iface.AltSettings {
211 isVendorClass := alt.Class == gousb.ClassVendorSpec
212 isCorrectSubClass := alt.SubClass == subClass
213 log.Debugf("iface:%v altsettings:%d isvendor:%t isub:%t", iface, len(iface.AltSettings), isVendorClass, isCorrectSubClass)
214 if isVendorClass && isCorrectSubClass {
215 return true, iface.Number
216 }
217 }
218 }
219 return false, -1
220}
221
222//IsActivated returns a boolean that is true when this device was enabled for screen mirroring and false otherwise.
223func (d *IosDevice) IsActivated() bool {

Callers 3

isQtConfigFunction · 0.85
isMuxConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected