I’m writing an AVStream driver for a BDA device.
I have set the following flags in the KSPIN_DESCRIPTOR for the output pin of my device filter:
KSPIN_FLAG_FIXED_FORMAT | KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING
This, from my understanding of ddk documentation, means that the process dispatch will not be called. This corresponds to what I’ve observed as well.
In my data callback, triggered from the ISR, I retrieve the leading edge pointer, lock it and write out the data into the frames, advancing frames as required. When I’m done I unlock it. I’m not updating any of the stream header fields. Also this is a deviation from the cloning method used in the ddk samples.
For a couple of minutes the video plays fine. Then I see the advance call failing while moving to the new frame. For some subsequent callbacks, the leading edge pointer fails to lock. This is possibly because I have run out of frames. This happens in spurts, in between proper data transfer without either advance/lock failures. Of course the video becomes shaky where I see failures, presumably because of data being dropped.
However, what is strange is that the sporadic failures stop after a while, but the video goes from jittery to frozen and stays there. I’m unable to explain/fix this.
- I have tried increasing the frame size and number of outstanding frames but to no avail. The video stop inevitably happens. current value: 188 * 312 and 8 frames.
- I have tried with a couple of different decoders, again no difference.
I’m not updating any fields of the Stream Header.
Also, this is a deviation from the sample-type cloning method.
I’d appreciate any pointers/suggestions as to what can cause the behavior I’m seeing.
thanks,
-Lakshmi