Filter connection

Started by
1 comment, last by butterpuff 17 years, 6 months ago
Hi, I am connecting my colorspace converter output pin with vmr9 input pin by using: hr = pGraph->Connect(OutPin, InPin); I am checking all the possible values of hr. But the problem is that during runtime, I get the error "Unhandeled Exception. Access Violation". When I debug the program, the cause of problem is the above-mentioned statement. But the problem gets worse by the fact that hr doesn't even happen to get any value. The function Connect is causing some error due to which the program halts at this point and exits and hr doesn't get any value. In simple words, before assigning any value to hr, the program gives the error and halts. What can be the problem? Does anyone know? Thanks.
Advertisement
You aren't really giving enough information to help out much, but I would guess (and I do mean guess) that your pGraph variable isn't initialized, or properly assigned, or something like that. Take a look at the value of pGraph in the debugger when the access violation occurs.
I have debugged my program and the variable pGraph is a valid pointer. Actually it is such a strange problem that I can't perceive what is the reason behind it. Basically, I have made a program in which I am taking realtime data from the webcam using the following filtergraph:

source filter --> colorspace converter --> VMR9 filter

It works fine and I get the desired result. In the second program I have made a custom allocator-presenter to play a precaptured video which also works fine. In the 3rd program which is causing problem, I am mixing both the functionalities i.e. using custom allocator-presenter to render my realtime video. So I am using my custom allocator-presenter instead of that of using VMR9's and the same code of filter connection in this program. In this program, I get error at the statement where I am connecting my VMR9 with colorspace converter.

hr = pGraph->Connect(OutPin, InPin);

The format of both the colorspace converter and the VMR9 is ARGB32. Had there any problem in the connection of output pin of colorspace converter and the input pin of VMR9 filter, "hr" would get a value indicating that these pins can't be connected. But before "hr" gets any value, the program terminates by giving the error: "Unhandeled exception, Access violation".

Can anyone plz help?

Thanks

This topic is closed to new replies.

Advertisement