Is it possible to send asynchronous notification from a camera driver to userspace?

I have read and implemented properties to camera driver. Thanks to mr. Paklin for inspiration.

One of property is called “trigger”. This property could be pooled from userspace fine. Property contains logical level on a wire.

It has been told to me that pooling is not sufficient enough and that they want to have asynchronous notifications faster than one frame after trigger change.
Does there exist any mechanism in Windows kernel DirectShow streaming that allows this to implement?

I know only one way to have mutex in userspace to be unblocked from kernel when some event occurs. Passing this quirk through ks.lib might be quite hard.

Thank you very much.

The AVStream method of doing this is to use a KSEVENT. This ends up being implemented as an inverted call. https://docs.microsoft.com/en-us/windows-hardware/drivers/stream/ks-events

It is, of course, also possible for you to use a KSPROPERTY to send a user-mode event handle into the driver, and use a plain old KeSetEvent to fire the event.

What’s the point of this? Camera drivers work in units of frames, so you can’t really do anything faster than a frame.

Thank you very much for response. I will study link you sent me.

I do not actually understand a customer point too much, may be that he needs to evaluate exact moment when some event occurred. May be that event occurred several milisecond after frame shipped. Or he needs to catch narrow signal peak. I personally recommended that some specialised DAQ device might do a better job than overloading camera driver with this functionality. I see no benefit of combined camera device in comparison with another PCIe/USB separate device. But they request this functionality anyway.