I just want to query the number of streams in a file. But an unimaginable difficulty has emerged from this simple task.
It seems the query involves using IMediaObject.I have searched IMediaObject documentation in DirectShow. It only lists out its functions but it has no samples and description on how to use it.
I have also searched Windows 7 SDK. The only demonstration is in dmoenum The initiation is incapsulated in ShowSelectedDMOInfo(const GUID *pCLSID)
what types can pCLSID be? Any samples are out there to illustrate how to use IMediaObject?
IMediaObjectis not of any help. It only returns number of streams it is designed to accept on the input and deliver on the output, according to its design. Typical DMO has one input and one output stream, completely irrelevant to file streams.In DirectShow you can query streams from demultiplexing filter for the respective file format. These are rarely (if ever) packaged as DMOs.