Compartir a través de


IBasicVideo Interface (Compact 2013)

3/26/2014

This interface supports the video properties of a generic video window. Generally, this is a video renderer that draws video into a window on the display.

The IBasicVideo interface supports properties and methods.

Properties are more easily accessible from many Automation controllers (such as the Microsoft® Visual Basic® programming system). However, some operations require several properties to be changed simultaneously. For this reason, methods are provided that allow a number of related properties to be changed.

The IBasicVideo interface methods require that the video renderer be connected. If it is not connected, all interface methods return VFW_E_NOT_CONNECTED.

Properties set on a video renderer persist between successive connections and disconnections. All applications should ensure that they reset the renderer properties before starting a presentation.

When working with video, the application can select a portion of the video to use. This portion is the source rectangle that the IBasicVideo interface controls.

IBasicVideo allows the source rectangle to be set and retrieved.

All rectangles that IBasicVideo uses employ top, left, width, and height rather than top, left, right, and bottom, which is favored in Win32 programming.

When no source rectangle is set, the properties of the source rectangle return the full, native video size.

When to Implement

The video renderer filter supplied with 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 to Use

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

The following tables show the methods that appear in the Vtable beneath the standard COM methods inherited from IUnknown.

IDispatch method

Description

GetTypeInfoCount

Determines whether there is type information available for this dispinterface.

GetTypeInfo

Retrieves the type information for this dispinterface if GetTypeInfoCount returned successfully.

GetIDsOfNames

Converts text names of properties and methods (including arguments) to their corresponding DISPIDs.

Invoke

Calls a method or accesses a property in this dispinterface if given a DISPID and any other necessary parameters.

IBasicVideo method

Description

get_AvgTimePerFrame

Retrieves the average time between successive frames in 100-nanosecond units.

get_BitRate

Retrieves an approximate bit rate for the video stream.

get_BitErrorRate

Retrieves an approximate bit error rate for the video stream.

get_VideoWidth

Retrieves the current video width.

get_VideoHeight

Retrieves the current video height.

put_SourceLeft

Sets the x-axis coordinate for the source video rectangle.

get_SourceLeft

Retrieves the x-axis coordinate for the source video rectangle.

put_SourceWidth

Sets the width of the source video rectangle.

get_SourceWidth

Retrieves the width of the source video rectangle.

put_SourceTop

Sets the y-axis coordinate for the source video rectangle.

get_SourceTop

Retrieves the y-axis coordinate for the source video rectangle.

put_SourceHeight

Sets the height of the source video rectangle.

get_SourceHeight

Retrieves the height of the source video rectangle.

put_DestinationLeft

Sets the x-axis coordinate for the destination video rectangle.

get_DestinationLeft

Retrieves the x-axis coordinate for the destination video rectangle.

put_DestinationWidth

Sets the width of the destination video rectangle.

get_DestinationWidth

Retrieves the width of the destination video rectangle.

put_DestinationTop

Sets the y-axis coordinate for the destination video rectangle.

get_DestinationTop

Retrieves the y-axis coordinate for the destination video rectangle.

put_DestinationHeight

Sets the height of the destination video rectangle.

get_DestinationHeight

Retrieves the height of the destination video rectangle.

SetSourcePosition

Sets the source video rectangle.

GetSourcePosition

Retrieves the source video rectangle.

SetDefaultSourcePosition

Informs the renderer to use the default source rectangle.

SetDestinationPosition

Sets the destination rectangle for the window.

GetDestinationPosition

Retrieves the destination video rectangle for the window.

SetDefaultDestinationPosition

Sets the default destination position for the window.

GetVideoSize

Retrieves the native video dimensions.

GetVideoPaletteEntries

Retrieves the color palette entries required by the video.

GetCurrentImage

Returns a copy of the current image that is waiting at the renderer.

IsUsingDefaultSource

Determines if the renderer is using the default source rectangle.

IsUsingDefaultDestination

Determines if the renderer is using the default destination rectangle.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

DirectShow Interfaces