<!--
{
  "availability" : [
    "DriverKit: 19.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USBDriverKit",
  "identifier" : "/documentation/USBDriverKit/IOUSBGetEndpointMaxStreamsEncoded",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "USBDriverKit"
    ],
    "preciseIdentifier" : "c:@F@IOUSBGetEndpointMaxStreamsEncoded"
  },
  "title" : "IOUSBGetEndpointMaxStreamsEncoded"
}
-->

# IOUSBGetEndpointMaxStreamsEncoded

Extracts the number of streams an endpoint supports.

```
uint32_t IOUSBGetEndpointMaxStreamsEncoded(uint32_t usbDeviceSpeed, const IOUSBEndpointDescriptor *descriptor, const IOUSBSuperSpeedEndpointCompanionDescriptor *companionDescriptor);
```

## Parameters

`usbDeviceSpeed`

The operational speed of the device.

`descriptor`

The endpoint descriptor to parse.

`companionDescriptor`

The companion descriptor to parse.

## Return Value

The encoded number of streams.

## Discussion

This method parses endpoint descriptors and returns the number of streams supported as `n` in `(2^n)`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)