AVStream minidriver and graphedit error

I’ve tried asking this question on media foundation developer forum (msdn) but no one responds. I’m new to kernel driver dev and am trying to write a bare bones avstream encoder minidriver by stripping off unwanted parts of avshws sample from the DDK. I’ve modified it to have 2 pins, and have currently given a wildcard for the media formats in datarange structure (for both input and output).

The driver shows under graphedit, but upon trying to insert the filter, I get this error -

“The filter could not be created. Resources used by this filter may already be in use. This object can only be created as an aggregate object. (Return code: 0x80040202).”

There isn’t much help on this online. I’m trying to use ksstudio, but not sure what exactly to look for to correct this error. Right now, all I want to be able to do is be able to form a simple pipeline (say src->my_filter->sink) and just pass the data through. Any pointers?

xxxxx@gmail.com wrote:

I’ve tried asking this question on media foundation developer forum (msdn) but no one responds. I’m new to kernel driver dev and am trying to write a bare bones avstream encoder minidriver by stripping off unwanted parts of avshws sample from the DDK. I’ve modified it to have 2 pins, and have currently given a wildcard for the media formats in datarange structure (for both input and output).

Are you seeing calls to your data intersection handler or your set
format handler? Remember that you can’t really leave the output format
as a wildcard. When the input format gets set, you need to be able to
offer some concrete suggestions.

The driver shows under graphedit, but upon trying to insert the filter, I get this error -

“The filter could not be created. Resources used by this filter may already be in use. This object can only be created as an aggregate object. (Return code: 0x80040202).”

There isn’t much help on this online. I’m trying to use ksstudio, but not sure what exactly to look for to correct this error. Right now, all I want to be able to do is be able to form a simple pipeline (say src->my_filter->sink) and just pass the data through. Any pointers?

http://msdn.microsoft.com/en-us/library/ff559547.aspx

Have you implemented any of ENCAPI or CODECAPI property sets?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks Tim, and sorry for the delay in responding (I was away for a week). I am yet to check the things you’ve suggested. I am currently trying to implement ENCAPI properties using the encoder example at msdn. I’ll get back once I complete this.

Hi Tim,

I managed to solve my problem to a reasonable extent by fixing some inf file issues I had. However, I noticed that my intersect handler never gets called when I open my filter using ksstudio, and do a Validate > Validate Standard Properties … and ksstudio complains that:

SyncIoctl: DeviceIoControl failed. Last Error = 0x000006f8
KSPROPERTY_PIN_DATAINTERSECTION: (ro, mandatory) [Not Available!] // Array of KSDATAFORMAT to determine the first data format acceptable to a pin given a list of data ranges.
// This can be used by a graph builder which has no knowledge of specifics of data types to send the data range list of one pin to another pin, and have an acceptable data format returned.
cDataIntersections = Not Available // Number of data formats compatible to this pin type.

I do see the intersect handler being called if I run avshws sample or the Wd3KsProxyPlugin sample I found on OSR. I have specified the handler function in KSPIN_DESCRIPTOR_EX. Could you give me a hint what could’ve gone wrong?