IVPBaseConfig enables a video port (VP) or overlay mixer filter to communicate with a VP driver (decoder), to set and retrieve configuration information. This interface assumes that the mixer filter creates the video port. The IVPConfig interface derives from this interface. See also IVPBaseNotify and IVPNotify.
When to Implement
The Windows Driver Model (WDM) Ksproxy filter implements this interface so you won't need to implement it in most cases. Implement this interface when you need this functionality on a platform that does not support WDM, or when you need to alter the default behavior.
When to Use
The Overlay Mixer filter uses this interface so you won't need to use it in most cases. Use this interface when you implement your own overlay mixer filter.
Methods in Vtable Order
| IUnknown methods | Description |
| QueryInterface | Retrieves pointers to supported interfaces. |
| AddRef | Increments the reference count. |
| Release | Decrements the reference count. |
| IVPBaseConfig methods | Description |
| GetConnectInfo | Retrieves connection information structures. |
| SetConnectInfo | Sets the index for the current video port connection information. |
| GetVPDataInfo | Retrieves the current video port data information. |
| GetMaxPixelRate | Retrieves the maximum pixels per second rate for a given width and height. |
| InformVPInputFormats | Informs the device what video formats the video port supports. |
| GetVideoFormats | Retrieves the video formats the decoder supports. |
| SetVideoFormat | Sets the format that the video will use. |
| SetInvertPolarity | Reverses the current polarity the decoder uses. |
| GetOverlaySurface | Determines whether the overlay mixer should use the driver's overlay surface and if so retrieves a pointer to the surface. |
| SetDirectDrawKernelHandle | Sets the DirectDraw® kernel handle for the decoder's minidriver to use. |
| SetVideoPortID | Sets the port ID that the video will use. |
| SetDDSurfaceKernelHandle | Sets the kernel handle that the DirectDraw surface will use. |
| SetSurfaceParameters | Tells the capture driver about the surface created on its behalf by the Overlay Mixer or VBI surface filter. |
Retrieves connection information structures.
HRESULT GetConnectInfo(
LPDWORD pdwNumConnectInfo,
LPDDVIDEOPORTCONNECT pddVPConnectInfo
);
Returns NOERROR if the count or structures were retrieved, or a driver error.
This method retrieves the various connection information structures such as GUID and port width structures, in an array of structures specified by pddVPConnectInfo. The callee must allocate the correct amount of space for the number of structures requested.
Set the index for connection information by using the IVPBaseConfig::SetConnectInfo method.
Retrieves the maximum pixels per second rate for a given width and height.
HRESULT GetMaxPixelRate(
LPAMVPSIZE pamvpSize,
LPDWORD pdwMaxPixelsPerSecond
);
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
| Value | Meaning |
| E_FAIL | Failure. |
| E_POINTER | NULL pointer argument. |
| E_INVALIDARG | Invalid argument. |
| NOERROR | The maximum pixel rate was retrieved. |
This method retrieves the maximum pixels per second rate expected for a given format and a given scaling factor. If the decoder does not support those scaling factors, then it returns the rate and the nearest scaling factors it supports.
Determines whether the overlay mixer should use the driver's overlay surface and if so retrieves a pointer to the surface.
HRESULT GetOverlaySurface(
LPDIRECTDRAWSURFACE *ppddOverlaySurface
);
Returns NOERROR if the overlay surface object was returned. (Default implementation sets the surface to NULL and returns NOERROR.)
The Overlay Mixer uses this function to determine if the driver requires the Overlay Mixer to use its overlay surface and if so to get a pointer to it. If this function returns NULL, then the Overlay Mixer allocates its own surface.
Retrieves the video formats the decoder supports.
HRESULT GetVideoFormats(
LPDWORD pdwNumFormats,
LPDDPIXELFORMAT pddPixelFormats
);
Returns NOERROR if the count or structures were returned, or a driver error otherwise.
This method queries for either the number of DDPIXELFORMAT structures supported by the driver, or retrieves as many structures as can fit into the provided buffer space.
The callee must allocate the correct amount of space for the number of structures requested.
Set the video format by using IVPBaseConfig::SetVideoFormat.
Retrieves the current video port data information.
HRESULT GetVPDataInfo(
LPAMVPDATAINFO pamvpDataInfo
);
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
| Value | Meaning |
| E_FAIL | Failure. |
| E_POINTER | NULL pointer argument. |
| E_INVALIDARG | Invalid argument. |
| NOERROR | The video port data information was retrieved. |
Informs the device what video formats the video port supports.
HRESULT InformVPInputFormats(
DWORD dwNumFormats,
LPDDPIXELFORMAT pDDPixelFormats
);
Returns S_FALSE if failure, or NOERROR otherwise.
The supplied array of supported video port formats might determine what formats the device, in turn, proposes.
Sets the index for the current video port connection information.
HRESULT SetConnectInfo(
DWORD dwChosenEntry
);
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
| Value | Meaning |
| E_FAIL | Failure. |
| E_INVALIDARG | Invalid argument. |
| NOERROR | The video port connect information was set. |
Retrieve connection information by using IVPBaseConfig::GetConnectInfo.
Sets the kernel handle to be used by the DirectDraw surface.
HRESULT SetDDSurfaceKernelHandle(
DWORD dwDDKernelHandle
);
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
| Value | Meaning |
| E_FAIL | Failure. |
| E_INVALIDARG | Invalid argument. |
| NOERROR | The specified handle is set successfully. |
This method sets the DirectDraw handle on the mini driver to enable it to communicate with the video port directly.
Sets the DirectDraw® kernel handle for the decoder's minidriver to use.
HRESULT SetDirectDrawKernelHandle(
DWORD dwDDKernelHandle
);
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
| Value | Meaning |
| E_FAIL | Failure. |
| E_INVALIDARG | Invalid argument. |
| NOERROR | The specified handle was set successfully. |
Sets the DirectDraw kernel level handle on the minidriver to enable it to communicate with DirectDraw directly.
Reverses the current polarity the decoder uses.
HRESULT SetInvertPolarity(void);
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
| Value | Meaning |
| E_FAIL | Failure. |
| NOERROR | The polarity was reversed. |
Reversing polarity means asking the decoder to treat even fields like odd fields and vice versa.
Tells the capture driver about the surface created on its behalf by the Overlay Mixer or VBI surface filter.
HRESULT SetSurfaceParameters(
DWORD dwPitch,
DWORD dwXOrigin,
DWORD dwYOrigin ) PURE;
Returns an HRESULT value that depends on the implementation of the interface. The current default implementation returns NOERROR if the call completed successfully, or E_NOTIMPL if the method is not implemented.
Sets the format to be used by the video.
HRESULT SetVideoFormat(
DWORD dwChosenEntry
);
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
| Value | Meaning |
| E_FAIL | Failure. |
| E_INVALIDARG | Invalid argument. |
| NOERROR | The new video format was set. |
Retrieve the video formats by using IVPBaseConfig::GetVideoFormats.
Sets the port ID which the video will use.
HRESULT SetVideoPortID (
DWORD dwVideoPortID
);
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
| Value | Meaning |
| E_FAIL | Failure. |
| E_INVALIDARG | Invalid argument. |
| NOERROR | The specified port ID is set successfully. |
This method sets the DirectDraw video port ID on the mini driver to enable it to communicate with the video port directly.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.