The IAMVfwCompressDialogs interface enables an application to display a Video for Windows codec (compressor/decompressor) Configure or About dialog box and to set and retrieve compressor status.
Microsoft's video compression manager (VCM) compressor filter (AVI Compressor) implements this interface. Other filters should not need to implement it.
An application should use this interface when it must enable the user to change compression settings in an VCM compressor's Configure dialog box or to view the compressor's About dialog box. Applications also use this interface to set and retrieve compressor status.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IAMVfwCompressDialogs methods Description ShowDialog Displays the specified dialog box. GetState Retrieves the current configuration settings for the VCM codec currently being used. SetState Sets configuration for the VCM codec. SendDriverMessage Sends a driver-specific message.
Retrieves the current configuration settings for the VCM codec currently being used.
Syntax
HRESULT GetState(
LPVOID pState,
int *pcbState
Parameters
- pState
- [out] State of the VCM codec.
- pcbState
- [in, out] Pointer to the size of the state.
Return Value
Return value varies depending on the implementation within each driver.
Remarks
This method calls the COM ICGetState macro.
Sends a driver-specific message.
Syntax
HRESULT SendDriverMessage(
int uMsg,
long dw1,
long dw2 );
Parameters
- uMsg
- [in] Message to send to the driver.
- dw1
- [in] Message data.
- dw2
- [in] Message data.
Return Value
Return value varies depending on the implementation within each driver.
Remarks
You should never need to use this method. This method can send any private message to the video compressor (codec). Behavior might be undetermined in response to arbitrary messages; use this method at your own risk.
This method calls the Video for Windows video compression manager (VCM) ICSendMessage function to send the message.
Sets configuration for the VCM codec.
Syntax
HRESULT SetState(
LPVOID pState,
int cbState );
Parameters
- pState
- [in] State of the VCM codec.
- cbState
- [in] Size of the state.
Return Value
Return value varies depending on the implementation within each driver.
Remarks
This method calls the COM ICSetState macro, which notifies a video compression driver to set the state of the compressor.
Displays the specified dialog box.
Syntax
HRESULT ShowDialog(
int iDialog,
long hwnd );
Parameters
- iDialog
- [in] Dialog box to display. This is a member of the VfwCompressDialogs enumerated data type.
- hwnd
- [in] Handle of the dialog box's parent window.
Return Value
Returns an HRESULT value that depends on the implementation of the interface.
Remarks
This method returns an error when asked to display a dialog box while the driver is streaming or displaying another dialog box. While the driver displays the dialog box you can't stream (pause or run) the filter.
IAMVfwCompressDialogs::ShowDialog calls the Video for Windows video compression manager (VCM) functions ICConfigure, ICAbout, ICQueryConfigure, and ICQueryAbout to display the appropriate dialog box or determine if one exists.
The VfwCompressDialog_QueryConfig and VfwCompressDialog_QueryAbout members of the VfwCompressDialogs enumerated data type tell you whether or not the configure dialog or about dialog is available. If passed one of these flags, the filter will return S_OK if the dialog exists, and S_FALSE if it does not. If a dialog is available, you call ShowDialog with the value VfwCompressDialog_Config or VfwCompressDialog_About to bring up the dialog.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.