IOUserVideoDriver
A video driver.
Declaration
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 implemented by the driver changes, it notifies the host to update its state. For changes to an IOUserVideoDevice or IOUserVideoClockDevice state that will affect IO or its structure, the client should trigger a request to the host using 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 on the object. It is only at this point that the device can make the state change. When 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 when to start and when to stop the hardware. The host drives its timing using the timestamps provided by the IOUserVideoClockDevice implementation of UpdateCurrentZeroTimestamp and GetCurrentZeroTimestamp. The series of timestamps provides a mapping between the device’s sample time and mach_absolute_time().