IVPConfig enables a video port (VP) 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.
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 (Overlay Mixer) 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. |
IVPConfig 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 video format. |
SetInvertPolarity | Reverses the current polarity. |
GetOverlaySurface | Given the context, retrieves an overlay surface object to be used as an allocator. |
IsVPDecimationAllowed | Given the context (Video/VBI), retrieves whether scaling at the video port is allowed. |
SetScalingFactors | Sets the factors by which the decoder should scale the video stream. |
SetDirectDrawKernelHandle | Sets the DirectDraw® kernel handle. |
SetVideoPortID | Sets the video port ID. |
SetDDSurfaceKernelHandle | Sets the DirectDraw surface kernel handle. |
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 (guid, port width) in an array of structures (pddVPConnectInfo). It is the callee's responsibility to allocate the correct amount of space for the number of structures requested.
Set the index for connection information by using the IVPConfig::SetConnectInfo method.
Retrieves the maximum pixels per second rate for a given width and height.
HRESULT GetMaxPixelRate(
LPAMVPSIZE pamvpSize,
LPDWORD pdwMaxPixelsPerSecond
);
Returns NOERROR if 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.
Given the context, retrieves an overlay surface object to use as an allocator.
HRESULT GetOverlaySurface(
AMVP_CONTEXT amvpContext,
LPDIRECTDRAWSURFACE *ppddOverlaySurface
);
Returns NOERROR if the overlay surface object was returned. (Default implementation sets the surface to NULL and returns NOERROR.)
The VP mixer uses this function to determine if the driver wants the VP mixer to use its overlay surface and if so to get a pointer to it. If this function returns NULL, then the VP 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.
It is the callee's responsibility to allocate the correct amount of space for the number of structures requested.
Set the video format using IVPConfig::SetVideoFormat.
Retrieves the current video port data information.
HRESULT GetVPDataInfo(
LPAMVPDATAINFO pamvpDataInfo
);
Returns NOERROR if 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.
Given the context (Video/VBI), retrieves whether scaling at the video port is allowed.
HRESULT IsVPDecimationAllowed(
AMVP_CONTEXT amvpContext,
LPBOOL pbIsDecimationAllowed
);
Returns NOERROR if this method returned the decimation capability.
The VP mixer uses this function to determine whether the driver wants the mixer to decimate video data at its own discretion. This function can be especially useful in a capture with preview situation in which you would not want the VP mixer filter to perform any scaling at the video port.
Sets the index for the current video port connection information.
HRESULT SetConnectInfo(
DWORD dwChosenEntry
);
Returns NOERROR if the video port connect information was set.
Retrieve connection information by using IVPConfig::GetConnectInfo.
Sets the DirectDraw kernel handle.
HRESULT SetDirectDrawKernelHandle(
DWORD dwDDKernelHandle
);
Returns NOERROR if the specified handle was set successfully.
Sets the DirectDraw kernel level handle on the mini driver to enable it to talk to DirectDraw directly.
Sets the DirectDraw surface kernel handle.
HRESULT SetDDSurfaceKernelHandle(
DWORD dwDDKernelHandle
);
Returns NOERROR if the specified handle is set successfully.
This method sets the DirectDraw handle on the mini driver to enable it to talk to the video port directly.
Reverses the current polarity.
HRESULT SetInvertPolarity(void);
Returns NOERROR if the polarity was reversed.
Reversing polarity means asking the decoder to treat even fields like odd fields and vice versa.
Sets the factors by which the decoder should scale the video stream.
HRESULT SetScalingFactors(
LPAMVPSIZE pamvpSize
);
Returns NOERROR if the new scaling factors were set.
If the decoder does not support the specified scaling factors, then it sets the values to the nearest factors it can support.
Sets the video format.
HRESULT SetVideoFormat(
DWORD dwChosenEntry
);
Returns NOERROR if the new video format was set.
Retrieve the video formats by using IVPConfig::GetVideoFormats.
Sets the video port ID.
HRESULT SetVideoPortID (
DWORD dwVideoPortID
);
Returns NOERROR if the specified handle is set successfully.
This method sets the DirectDraw video port ID on the mini driver to enable it to talk to the video port directly.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.