<!--
{
  "availability" : [
    "DriverKit: 27.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VideoDriverKit",
  "identifier" : "/documentation/VideoDriverKit/IOUserVideoDriver",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "VideoDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserVideoDriver"
  },
  "title" : "IOUserVideoDriver"
}
-->

# IOUserVideoDriver

A video driver.

```
class IOUserVideoDriver;
```

## Overview

For the CoreVideo host to match against this `IOService`, keys must be added to the driver’s plist `IOKitOPersonalities`.

```
<key>IOUserVideoDriverUserClientProperties</key>
<dict>
	<key>IOClass</key>
	<string>IOUserUserClient</string>
	<key>IOUserClass</key>
	<string>IOUserVideoDriverUserClient</string>
</dict>
```

See constants in `VideoDriverKitTypes.h`.

The VideoDriverKit framework creates the video driver user client when `NewUserClient` is called in the `IOService`.
The driver extension must have the `com.apple.developer.driverkit.allow-any-userclient-access` entitlement.

When the state of an [`IOUserVideoObject`](/documentation/VideoDriverKit/IOUserVideoObject) implemented by the driver changes, it notifies the host to update its state.
For changes to an [`IOUserVideoDevice`](/documentation/VideoDriverKit/IOUserVideoDevice) or [`IOUserVideoClockDevice`](/documentation/VideoDriverKit/IOUserVideoClockDevice) state that will affect IO or its structure,
the client should  trigger a request to the host using [`RequestDeviceConfigurationChange`](/documentation/VideoDriverKit/IOUserVideoClockDevice/RequestDeviceConfigurationChange), so the host it has an opportunity to
stop any outstanding  IO and otherwise return the device to its ground state. The host will inform the driver
that it is safe to make the change by calling [`PerformDeviceConfigurationChange`](/documentation/VideoDriverKit/IOUserVideoDevice/PerformDeviceConfigurationChange) on the object. It is only at this point that
the device can make the state change. When [`PerformDeviceConfigurationChange`](/documentation/VideoDriverKit/IOUserVideoDevice/PerformDeviceConfigurationChange) returns, the host
will figure out what changed and restart any outstanding IO.

The host is in control of IO. It tells the drivers’s [`IOUserVideoDevice`](/documentation/VideoDriverKit/IOUserVideoDevice) when to start and when to stop
the hardware. The host drives its timing using the timestamps provided by the [`IOUserVideoClockDevice`](/documentation/VideoDriverKit/IOUserVideoClockDevice)
implementation of [`UpdateCurrentZeroTimestamp`](/documentation/VideoDriverKit/IOUserVideoClockDevice/UpdateCurrentZeroTimestamp) and [`GetCurrentZeroTimestamp`](/documentation/VideoDriverKit/IOUserVideoClockDevice/GetCurrentZeroTimestamp). The series of timestamps provides a
mapping between the device’s sample time and `mach_absolute_time()`.

## Topics

### Running the driver service

[`virtual bool init();`](/documentation/VideoDriverKit/IOUserVideoDriver/init)

[`virtual kern_return_t Start(IOService *provider);`](/documentation/VideoDriverKit/IOUserVideoDriver/Start)

[`virtual kern_return_t Stop(IOService *provider);`](/documentation/VideoDriverKit/IOUserVideoDriver/Stop)

[`virtual void free();`](/documentation/VideoDriverKit/IOUserVideoDriver/free)

### Getting information about the class

[`IOUserVideoClassID GetClassID();`](/documentation/VideoDriverKit/IOUserVideoDriver/GetClassID)

Gets the class identifier of the object.

[`IOUserVideoClassID GetBaseClassID();`](/documentation/VideoDriverKit/IOUserVideoDriver/GetBaseClassID)

Gets the class identifier of the base class object.

[`enum IOUserVideoClassID : uint32_t;`](/documentation/VideoDriverKit/VideoDriverKit/IOUserVideoClassID)

Video class identifiers of an video object.

[`OSSharedPtr<IODispatchQueue> GetWorkQueue();`](/documentation/VideoDriverKit/IOUserVideoDriver/GetWorkQueue)

Gets the work queue created by the video object.

[`OSSharedPtr<OSString> GetName();`](/documentation/VideoDriverKit/IOUserVideoDriver/GetName)

Gets the name of the driver.

[`kern_return_t SetName(OSString *in_name);`](/documentation/VideoDriverKit/IOUserVideoDriver/SetName)

Sets the name of the video driver.

### Getting the driver’s video object identifier

[`constexpr const IOUserVideoObjectID kIOUserVideoObjectIDDriver;`](/documentation/VideoDriverKit/VideoDriverKit/kIOUserVideoObjectIDDriver)

The video object identifier of the driver.

### Starting and stopping the driver

[`virtual kern_return_t StartDevice(IOUserVideoObjectID in_object_id, IOUserVideoStartStopFlags in_flags);`](/documentation/VideoDriverKit/IOUserVideoDriver/StartDevice)

Tells the driver to start IO on an video device.

[`virtual kern_return_t StopDevice(IOUserVideoObjectID in_object_id, IOUserVideoStartStopFlags in_flags);`](/documentation/VideoDriverKit/IOUserVideoDriver/StopDevice)

Tells the driver to stop IO on an video device.

[`typedef uint32_t IOUserVideoObjectID;`](/documentation/VideoDriverKit/VideoDriverKit/IOUserVideoObjectID)

A handle for a a specific video object.

[`enum IOUserVideoStartStopFlags : uint64_t;`](/documentation/VideoDriverKit/VideoDriverKit/IOUserVideoStartStopFlags)

Flags used to indicate how I/O is starting or stopping.

### Creating a new client

[`virtual kern_return_t NewUserClient(uint32_t in_type, IOUserClient **out_user_client);`](/documentation/VideoDriverKit/IOUserVideoDriver/NewUserClient)

### Working with transport types

[`IOUserVideoTransportType GetTransportType();`](/documentation/VideoDriverKit/IOUserVideoDriver/GetTransportType)

Gets the transport type of the driver.

[`kern_return_t SetTransportType(IOUserVideoTransportType in_transport_type);`](/documentation/VideoDriverKit/IOUserVideoDriver/SetTransportType)

Sets the transport type of the video driver.

[`enum IOUserVideoTransportType : uint32_t;`](/documentation/VideoDriverKit/VideoDriverKit/IOUserVideoTransportType)

The transport type of a video stream.

### Working with video objects

[`kern_return_t AddObject(IOUserVideoObject *in_object);`](/documentation/VideoDriverKit/IOUserVideoDriver/AddObject)

Adds a video object to the driver.

[`kern_return_t RemoveObject(IOUserVideoObject *in_object);`](/documentation/VideoDriverKit/IOUserVideoDriver/RemoveObject)

Removes a video object from the driver.

[`class IOUserVideoObject;`](/documentation/VideoDriverKit/IOUserVideoObject)

The base class for all video objects.

[`OSSharedPtr<IOUserVideoObject> GetVideoObjectForObjectID(IOUserVideoObjectID in_object_id);`](/documentation/VideoDriverKit/IOUserVideoDriver/GetVideoObjectForObjectID)

Gets the video object that corresponds to a video object identifier.

### Communicating with the host

[`kern_return_t PropertiesChanged(IOUserVideoObjectID in_object_id, IOUserVideoObjectPropertySelector *in_properties, uint32_t in_num_properties);`](/documentation/VideoDriverKit/IOUserVideoDriver/PropertiesChanged)

This method informs the host when the state of an driver’s object changes.

[`typedef uint32_t IOUserVideoObjectID;`](/documentation/VideoDriverKit/VideoDriverKit/IOUserVideoObjectID)

A handle for a a specific video object.

[`typedef uint32_t IOUserVideoObjectPropertySelector;`](/documentation/VideoDriverKit/VideoDriverKit/IOUserVideoObjectPropertySelector)

A four character code which, along with the scope and element, specifies a
specific piece of information about a video object.

### Working with custom properties

[`kern_return_t AddCustomProperty(IOUserVideoCustomProperty *in_custom_property);`](/documentation/VideoDriverKit/IOUserVideoDriver/AddCustomProperty)

Adds a custom property object to the video driver.

[`kern_return_t RemoveCustomProperty(IOUserVideoCustomProperty *in_custom_property);`](/documentation/VideoDriverKit/IOUserVideoDriver/RemoveCustomProperty)

Removes a custom property object from the video driver.

[`class IOUserVideoCustomProperty;`](/documentation/VideoDriverKit/IOUserVideoCustomProperty)

A custom property object that can be added to or associated with video objects.

### Working with buffers

[`kern_return_t OutputBufferNotification(IOUserVideoObjectID in_device_id, uint64_t in_change_action, IOUserVideoObjectID in_stream_id);`](/documentation/VideoDriverKit/IOUserVideoDriver/OutputBufferNotification)

[`kern_return_t BufferQueueChange(IOUserVideoObjectID in_device_id, uint64_t in_change_action, IOUserVideoObjectID in_stream_id);`](/documentation/VideoDriverKit/IOUserVideoDriver/BufferQueueChange)

## Relationships

### Inherits From

[`IOService`](/documentation/DriverKit/IOService)

---

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)