Wednesday, July 25, 2007

Identify the unreleased COM objects in Directshow Filter

- Identified the unreleased objects in a filter by calling Directshow fn...
DbgDumpObjectRegister();
-what I observed...
Using this fn, I got the debug information in a DebugView...
So I am looking it with BDL Video Overlay Filter.
In the BDL overlay filter, All the pin and filter objects are released properly. whereas in BDL VideoQuality Filter,
I got the debug information as VideoQuality Filter and its input output pins objects are not released...
So I added NonDelegatingAddRef() and NonDelegatingRelease() fn in the video quality Filter.
So This caused the program. There I incremented the m_cRef which is a counter for the number of objects created in a system.
Before Debug information , VideoQuality::NonDelegatingQueryInterface() fn is called...
So the Filter and Pin objects are in use. So i Cut the code
VideoQuality::NonDelegatingAddRef()
VideoQuality::NonDelegatingRelease() fn ...
Now it is working...

How can we dump the COM objects that are not released...
For this one, I called the
DbgDumpObjectRegister() as the ending line of the filter's destructor.( VideoQuality::~VideoQuality() fn)

No comments: