DirectShow Animated Header -- IAMVfwCompressDialogs Interface DirectShow Animated Header -- IAMVfwCompressDialogs Interface* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: IAMVfwCaptureDialogs Interface
*Next Topic: IAMVideoCompression Interface

IAMVfwCompressDialogs Interface


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.

When to Implement

Microsoft's video compression manager (VCM) compressor filter (AVI Compressor) implements this interface. Other filters should not need to implement it.

When to Use

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 ICM codec.
SendDriverMessage Sends a driver-specific message.


IAMVfwCompressDialogs::GetState

IAMVfwCompressDialogs Interface

Retrieves the current configuration settings for the VCM codec currently being used.

HRESULT GetState(
  LPVOID pState,
  int *pcbState

Parameters
pState
[out] State of the VCM codec.
pcbState
[in, out] Size of the state.
Return Values

Return value varies depending on the implementation within each driver.

Remarks

This method calls the COM ICGetState macro.


IAMVfwCompressDialogs::SendDriverMessage

IAMVfwCompressDialogs Interface

Sends a driver-specific message.

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 Values

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.


IAMVfwCompressDialogs::SetState

IAMVfwCompressDialogs Interface

Sets configuration for the VCM codec.

HRESULT SetState(
  LPVOID pState,
  int cbState );

Parameters
pState
[in] State of the VCM codec.
cbState
[in] Size of the state.
Return Values

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.


IAMVfwCompressDialogs::ShowDialog

IAMVfwCompressDialogs Interface

Displays the specified dialog box.

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 Values

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 should then call ShowDialog again with the value VfwCompressDialog_Config or VfwCompressDialog_About to bring up the dialog.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page