Articles Technology Blog News Forum Company
Scanning for interfaces
DirectShow is based on COM where each object may be accessed via different COM interfaces, requested by their GUID. By right clicking any filter or pin in GraphEditPlus you can ask it to scan interfaces of this filter/pin, then GraphEditPlus will use QueryInterface() with a big set of known DirectShow interfaces to see what interfaces this filter or pin supports. Found interfaces will be diplayed in a separate window. Each item there can be expanded to show what methods this interface includes. Methods starting with "Get" or "get" are usually harmless to call and GraphEditPlus will happily call them for you and show what they return. This way you can query your filters for some information without writing any code. For example, on the screenshot below DirectShound Device filter was scanned for interfaces, we've found it supports IMediaPosition interface that can be requested for its stream duration via get_Duration() and get_StopTime() methods, both of them returned 257.28 seconds, this is 4:17.28 - same duration reported by whole graph and shown at the top of the graph window.