Discussion:
How to check on a source filter or its pins regarding media (sub)t
(too old to reply)
dh
2007-06-28 21:36:04 UTC
Permalink
I tried the following steps, using DirectshowLib.Net:

1. Get handle to Source Filter object.
2. Enum all the output pins.
3. Convert the IPin interface to IAMStreamConfig, like: IAMStreamConfig
streamConfig = (IAMStreamConfig)pin[0];
4. hr = streamConfig.GetFormat(out mediaType);

Step 3 threw an exception:

"DirectShowException: No such interface supported --->
System.InvalidCastException: Unable to cast COM object of type
'System.__ComObject' to interface type 'DirectShowLib.IAMStreamConfig'. This
operation failed because the QueryInterface call on the COM component for the
interface with IID '{C6E13340-30AC-11D0-18C-00A0C9118956}' failed due to the
following error: No such interface supported (Exception from HRESULT:
0x80004002 (E_NOINTERFACE))."

Any idea?

Thanks!
Michel Roujansky - DirectShow Consultant and Trainer
2007-06-29 11:56:26 UTC
Permalink
Post by dh
1. Get handle to Source Filter object.
2. Enum all the output pins.
3. Convert the IPin interface to IAMStreamConfig, like: IAMStreamConfig
streamConfig = (IAMStreamConfig)pin[0];
4. hr = streamConfig.GetFormat(out mediaType);
"DirectShowException: No such interface supported --->
System.InvalidCastException: Unable to cast COM object of type
'System.__ComObject' to interface type 'DirectShowLib.IAMStreamConfig'. This
operation failed because the QueryInterface call on the COM component for the
interface with IID '{C6E13340-30AC-11D0-18C-00A0C9118956}' failed due to the
0x80004002 (E_NOINTERFACE))."
Any idea?
Thanks!
Why not enumerate the mediatypes on the pin?

Loading...