1

Topic: How correctly to stop a video-flow from KsMiniFilter the driver.

Good time of days. Kick  in the correct direction. A train of thought: Application causes IMediaControl-> Run () to start to read a flow from the device. In the driver are caused : AVStrMiniPinSetDeviceState (KSSTATE_ACQUIRE, KSSTATE_RUN) - for adjustment of the beginning of an announcement of flow AVStrMiniPinProcess () - actually function in which happens output of the buffer of a flow to application. When it is required to application stops it is caused IMediaControl-> Stop (), and again went : AVStrMiniPinSetDeviceState (KSSTATE_PAUSE, KSSTATE_STOP) And so a question how correctly to organize a stop from the minifilter? Clearly that it is possible to cease to plan  AVStrMiniPinProcess () through function invocation KsPinAttemptProcessing (), but application still is able Run. Who faced prompt as to inform before application something like EC_ERRORABORT or other "correct" code from the driver? There are functions of type KsAddEvent (), but that that with the documentation very poorly. Who can kicks towards a good example?

2

Re: How correctly to stop a video-flow from KsMiniFilter the driver.

Hello, _f_b_i _, you wrote: ___> how correctly to organize a stop from the minifilter? Correctly - in any way. The driver is not "the active essence", it has no right autocratically to switch modes, and should do it exceptional on requests of clients. If in the course of flow handling there was a situation incompatible with continuation of operation, the driver should return an error on the first suitable request, but the flow should remain in state Run.

3

Re: How correctly to stop a video-flow from KsMiniFilter the driver.

Hello, Evgenie Muzychenko, you wrote: I eat> Correctly - in any way. The driver is not "the active essence", Thanks for an explanation. Simply I supposed... That on good the driver as that should notify type application: "at me for you anything is not present, because there was a failure." Well , time to system so means let will be so more visibly.

4

Re: How correctly to stop a video-flow from KsMiniFilter the driver.

Hello, _f_b_i _, you wrote: ___> I supposed... That on good the driver as that should notify type application: "at me for you anything is not present, because there was a failure." Indeed, it is simple for the driver it is not provided possibilities to notify the client immediately at error origin. First in KS it was supposed that the client continuously transfers to the driver  from a chain so it can return an error in reply to request about transmission of the next buffer. And then invented Realtime protocols in which the client generally can do without requests to the driver, reading Position Register and exchanging through the ring buffer. How in this case to return an error - it is not known. In your case it is possible to cock a flag of presence of an error, and to return it at obtaining from the client of the first request concerning a flow. Generally, I do not know more turbid area in Windows, rather than KS. Documentation or not, or muffled, some functions work not how is described, as a result there almost continuous .