dh
2007-06-28 21:36:04 UTC
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!
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!