Hi,
I am trying to make an Upper Filter to usbvideo.sys .
It won’t do much, just simply get and transfrom incomming frames.
For example (webcaming ,skype) … User can choose this “virtual” cam, will see rgb stripes in the middle of the captured images …etc.
I’ve choosen avstream cause I read that it is a bit more simplier to implement and join to usbvideo.sys . I made sink and source pins , but when i’m trying to connect
my filter with the webcam device, KsStudio says :
“Querying sink pin for data intersection with source pin dataranges…
Failed to get DataIntersection on pin 0
…Failed.
Failed to get DataIntersection from target pin”
I use standard video formats (like in avstream pin centric sample),
my intersect handler is the same too , I’ve tried to return just
STATUS_SUCCESS in the begining, it didn’t work either.
Isn’t that enought to return STATUS_SUCCESS ?
Or can I forward this request to the direct show user or the device after my device ?
What can be the problem ?
Cause my driver will just transform incomming data , the settings are not my task, i think …
I’m not an expert in Kernel streaming (KS) .
Are there any more things I have to implement to make it work ?
Can anybody help me?
Thanks in advance.
Here are my intersect handler and pin descriptors —>
/*******************************************/
// My intersect handler
/********************************************/
NTSTATUS IN_VideoPin::IntersectHandler(
PKSFILTER Filter,
PIRP Irp,
PKSP_PIN PinInstance,
PKSDATARANGE CallerDataRange,
PKSDATARANGE DescriptorDataRange,
ULONG BufferSize,
PVOID Data,
PULONG DataSize
){
return STATUS_SUCCESS;
}
/*******************************************/
// My pin descriptors
/********************************************/
const KSPIN_DESCRIPTOR_EX PinDescriptorArray [2] = {
/**
* INPUT PIN DESCRIPTOR
*/
{
&IN_VideoCapturePinDispatch,// Dispatch table
NULL, // Automation Table
/**
* KSPIN_DESCRIPTOR structure
* See at Microsoft documentation.
*/
{
DEFINE_KSPIN_DEFAULT_INTERFACES, // Interfaces
DEFINE_KSPIN_DEFAULT_MEDIUMS,
SUPPORTED_VIDEO_FORMATS_NUM,
VideoFormatDataRanges,
KSPIN_DATAFLOW_IN,
KSPIN_COMMUNICATION_BOTH,
&KSCATEGORY_CAPTURE,
&IN_guid_StaticPinnameVidCap,
0
},
KSPIN_FLAG_DISPATCH_LEVEL_PROCESSING |
KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY |
KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING,
1, // Instances Possible
1, // Instances Necessary
&IN_VideoCapturePinAllocatorFraming, // Allocator Framing
reinterpret_cast (IN_VideoPin::IntersectHandler)
} ,
/ *
* OUTPUT PIN DESCRIPTOR
/
{
&OUT_VideoCapturePinDispatch,// Dispatch table
NULL, // Automation Table
/
* KSPIN_DESCRIPTOR structure
* See at Microsoft documentation.
*/
{
DEFINE_KSPIN_DEFAULT_INTERFACES, // Interfaces
DEFINE_KSPIN_DEFAULT_MEDIUMS,
SUPPORTED_VIDEO_FORMATS_NUM,
VideoFormatDataRanges,
KSPIN_DATAFLOW_OUT,
KSPIN_COMMUNICATION_BOTH,
&KSCATEGORY_VIDEO,
&OUT_guid_StaticPinnameVidCap,
0
},
KSPIN_FLAG_DISPATCH_LEVEL_PROCESSING |
KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY |
KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING,
1, // Instances Possible
1, // Instances Necessary
&OUT_VideoCapturePinAllocatorFraming, // Allocator Framing
reinterpret_cast (OUT_VideoPin::IntersectHandler)
}
};