IBasicVideo2 Interface

The IBasicVideo2 interface derives from IBasicVideo and supports the video properties of a generic video window. Generally, this is a video renderer that draws video into a window on the display. See IBasicVideo for more detailed information.

The video renderer filter supplied with Microsoft® DirectShow® implements this interface. It is also implemented by the filter graph manager (through a plug-in distributor) to pass method calls from the application to the video renderer filter's implementation of the interface. Implement this interface if you are writing a replacement video renderer filter or a replacement DirectShow plug-in distributor. You can use the CBaseBasicVideo class, which handles the IDispatch implementation for Automation, to help implement this interface.

When the filter graph manager exposes this interface, it is used by applications that must control the properties of the video renderer filter.

Methods in Vtable Order

IUnknown methodsDescription
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IBasicVideo2 methodDescription
GetPreferredAspectRatio Retrieves the movie's preferred aspect ratio.

IBasicVideo2::GetPreferredAspectRatio

IBasicVideo2 Interface

Retrieves a pair of dimensionless values whose ratio defines the movie's preferred aspect ratio.

Syntax

HRESULT GetPreferredAspectRatio (
    long *plAspectX,
    long *plAspectY
    );

Parameters

plAspectX
[out] Pointer to a value that indicates the movie's x-axis aspect ratio.
plAspectY
[out] Pointer to a value that indicates the movie's y-axis aspect ratio.

Return Value

Returns an HRESULT value that depends on the implementation of the interface.

The current DirectShow implementation return values include the following:
S_OKSuccess.
E_INVALIDARGOne or both of the parameters are invalid.
E_NOINTERFACEThe renderer does not implement IBasicVideo2.

Remarks

See the VIDEOINFOHEADER2 structure documentation for more information on movie aspect ratios.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.