IBasicVideo Interface

 
Microsoft DirectShow 9.0

IBasicVideo Interface

The IBasicVideo interface sets video properties such as the destination and source rectangles. The Video Renderer filter and Video Mixing Renderer filters implement this interface, but the interface is exposed to applications through the Filter Graph Manager. Applications should always retrieve this interface from the Filter Graph Manager. 

The IBasicVideo interface manipulates the following rectangles associated with the video image:

  • The source rectangle is the portion of the original image that gets displayed.
  • The destination rectangle is the portion of the video window the receives the source rectangle.
  • The video rectangle is the original video image.

In other words, the video renderer crops the image to the source rectangle, and then stretches or shrinks the cropped image to the destination rectangle. All rectangle dimensions are given in pixels.

Properties set on the Video Renderer persist between successive connections and disconnections.

Error codes: If the video renderer filter is not connected to another filter, all methods return the error code VFW_E_NOT_CONNECTED. For the Filter Graph Manager's implementation, if the graph does not contain a video renderer filter, all methods return E_NOINTERFACE. Note that the Filter Graph Manager exposes the interface even when the graph does not contain a video renderer, so an application can query for the interface before it builds the graph.

In addition to the methods inherited from IDispatch, the IBasicVideo interface exposes the following methods.

Method Description
get_AvgTimePerFrame Retrieves the average time between successive frames.
get_BitErrorRate Retrieves the approximate bit error rate of the video stream.
get_BitRate Retrieves the approximate bit rate of the video stream.
get_DestinationHeight Retrieves the height of the destination rectangle.
get_DestinationLeft Retrieves the x-coordinate of the destination rectangle.
get_DestinationTop Retrieves the y-coordinate of the destination rectangle.
get_DestinationWidth Retrieves the width of the destination rectangle.
get_SourceHeight Retrieves the height of the source rectangle.
get_SourceLeft Retrieves the x-coordinate of the source rectangle.
get_SourceTop Retrieves the y-coordinate of the source rectangle.
get_SourceWidth Retrieves the width of the source rectangle.
get_VideoHeight Retrieves the video height.
get_VideoWidth Retrieves the video width.
GetCurrentImage Returns a copy of the current image that is waiting at the renderer.
GetDestinationPosition Retrieves the destination rectangle.
GetSourcePosition Retrieves the source rectangle.
GetVideoPaletteEntries Retrieves the color palette entries required by the video.
GetVideoSize Retrieves the native video dimensions.
IsUsingDefaultDestination Queries whether the renderer is using the default destination rectangle.
IsUsingDefaultSource Queries whether the renderer is using the default source rectangle.
put_DestinationHeight Sets the height of the destination rectangle.
put_DestinationLeft Sets the x-coordinate of the destination rectangle.
put_DestinationTop Sets the y-coordinate of the destination rectangle.
put_DestinationWidth Sets the width of the destination rectangle.
put_SourceHeight Sets the height of the video rectangle.
put_SourceLeft Sets the x-coordinate of the source rectangle.
put_SourceTop Sets the y-coordinate of the source rectangle.
put_SourceWidth Sets the width of the source rectangle.
SetDefaultDestinationPosition Reverts to the default destination rectangle.
SetDefaultSourcePosition Reverts to the default source rectangle.
SetDestinationPosition Sets the destination rectangle.
SetSourcePosition Sets the source rectangle.

Requirements

Header: Declared in Control.h; include Dshow.h.

Library: Use Strmiids.lib.


Show: