PDA

View Full Version : DeBayerTransform crashes



Learner99
February 20, 2009, 19:35:45
I notice that the filter crashes repeatably when I cover my active window with another application, move the active window to a new monitor, drag the window around quickly, or minimize the window.

I notice that graphedit does not exhibit this behavior, and so i'm guessing that there is something weird in the way that C# is interacting with the filter. Perhaps there are some events that the C# code can pass to the filter to let it know what is happening to it?

It is easy to repeat the steps I took. In the DirectShowNet (http://directshownet.sourceforge.net/) PlayCap example, ensure that the DebayerTransform is used by putting the following code in the FindCaptureDevice() function, and then shake the video around a lot:



if (0 == device.Name.CompareTo("DFx 21BF04-Z2"))
{

IPin capture_pin = DsFindPin.ByDirection((IBaseFilter)source, PinDirection.Output, 0);

if (capture_pin != null)
{
IAMStreamConfig stream_config = (IAMStreamConfig)capture_pin;
if (stream_config != null)
{
int num_caps = 0;
int size = 0;
int hr1 = stream_config.GetNumberOfCapabilities(out num_caps, out size);
DsError.ThrowExceptionForHR(hr1);

IntPtr scc = Marshal.AllocCoTaskMem(num_caps * size);
for (int i = 0; i < num_caps; i++)
{
AMMediaType mt;

hr1 = stream_config.GetStreamCaps(i, out mt, scc);

if (mt.subType == MediaSubType.BY8)
{
hr1 = stream_config.SetFormat(mt);
DsError.ThrowExceptionForHR(hr1);
}
}
Marshal.FreeCoTaskMem(scc);
}
Marshal.ReleaseComObject(capture_pin);
}
}


Here is my debug printout (it's the same for all of those causes):

DeBayerTransform.dll!0e8d2abd()
[Frames below may be incorrect and/or missing, no symbols loaded for DeBayerTransform.dll]
ole32.dll!774fd01c()
DeBayerTransform.dll!0e8ebefa()
quartz.dll!74827e7c()
quartz.dll!74826db8()
DeBayerTransform.dll!0e8e4d10()
DeBayerTransform.dll!0e8e4b40()
DeBayerTransform.dll!0e8e60ee()
qcap.dll!75819f22()
qcap.dll!7581a1db()
kernel32.dll!7c80b713()


Thanks again for all of your help!

Stefan Geissler
February 23, 2009, 08:43:27
Hi,

you are right, there is a problem, if the video renderer provided an invalid pointer to memory. Please download the new Debayertransform.dll and copy it into your Windows\system32 directory. I guess, it fixes the error caused by the video renderer, but I am not sure about this.

Learner99
February 23, 2009, 16:16:33
This seems to solve all my problems. Thanks!