I am using DirectShowLib and SampleGrabber to capture video frames of an AVI file. I am accomplishing this by using graph builder and couple of filters. Everything was working fine, I was able to initialize graph and filters.
I then added code to get some video information like Dimension, Frame rate e.t.c. For this I used to IMediaDet. But when I try to initialize it:
Type t = Type.GetTypeFromCLSID(new Guid("65BD0710-24D2-4ff7-9324-ED2E5D3ABAFA"));
IMediaDet mediaDet = (IMediaDet)Activator.CreateInstance(t);
The Activator.CreateInstance(t)
throw an exception:
Retrieving the COM class factory for component with CLSID {65BD0710-24D2-4FF7-9324-ED2E5D3ABAFA} failed due to the following error: 80040154.
I don't think its the problem with the build as the filters and graph builder are initializing fine. Any one has any idea, or is there any other API I can use to gather AVI file information like Dimensions, Frame rate, Video Length?