IBasicVideo interface (control.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

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.

Inheritance

The IBasicVideo interface inherits from the IDispatch interface. IBasicVideo also has these types of members:

Methods

The IBasicVideo interface has these methods.

 
IBasicVideo::get_AvgTimePerFrame

The get_AvgTimePerFrame method retrieves the average time between successive frames.
IBasicVideo::get_BitErrorRate

The get_BitErrorRate method retrieves the approximate bit error rate of the video stream.
IBasicVideo::get_BitRate

The get_BitRate method retrieves the approximate bit rate of the video stream.
IBasicVideo::get_DestinationHeight

The get_DestinationHeight method retrieves the height of the destination rectangle.
IBasicVideo::get_DestinationLeft

The get_DestinationLeft method retrieves the x-coordinate of the destination rectangle.
IBasicVideo::get_DestinationTop

The get_DestinationTop method retrieves the y-coordinate of the destination rectangle.
IBasicVideo::get_DestinationWidth

The get_DestinationWidth method retrieves the width of the destination rectangle.
IBasicVideo::get_SourceHeight

The get_SourceHeight method retrieves the height of the source rectangle.
IBasicVideo::get_SourceLeft

The get_SourceLeft method retrieves the x-coordinate of the source rectangle.
IBasicVideo::get_SourceTop

The get_SourceTop method retrieves the y-coordinate of the source rectangle.
IBasicVideo::get_SourceWidth

The get_SourceWidth method retrieves the width of the source rectangle.
IBasicVideo::get_VideoHeight

The get_VideoHeight method retrieves the native height of the video.
IBasicVideo::get_VideoWidth

The get_VideoWidth method retrieves the native width of the video.
IBasicVideo::GetCurrentImage

The GetCurrentImage method retrieves the current image waiting at the renderer.
IBasicVideo::GetDestinationPosition

The GetDestinationPosition method retrieves the position of the destination rectangle.
IBasicVideo::GetSourcePosition

The GetSourcePosition method retrieves the position of the source rectangle.
IBasicVideo::GetVideoPaletteEntries

The GetVideoPaletteEntries method retrieves the palette colors for the video.
IBasicVideo::GetVideoSize

The GetVideoSize method retrieves the native video dimensions.
IBasicVideo::IsUsingDefaultDestination

The IsUsingDefaultDestination method queries whether the renderer is using the default destination rectangle.
IBasicVideo::IsUsingDefaultSource

The IsUsingDefaultSource method queries whether the renderer is using the default source rectangle.
IBasicVideo::put_DestinationHeight

The put_DestinationHeight method sets the height of the destination rectangle.
IBasicVideo::put_DestinationLeft

The put_DestinationLeft method sets the x-coordinate of the destination rectangle.
IBasicVideo::put_DestinationTop

The put_DestinationTop method sets the y-coordinate of the destination rectangle.
IBasicVideo::put_DestinationWidth

The put_DestinationWidth method sets the width of the destination rectangle.
IBasicVideo::put_SourceHeight

The put_SourceHeight method sets the height of the source rectangle.
IBasicVideo::put_SourceLeft

The put_SourceLeft method sets the x-coordinate of the source rectangle.
IBasicVideo::put_SourceTop

The put_SourceTop method sets the y-coordinate of the source rectangle.
IBasicVideo::put_SourceWidth

The put_SourceWidth method sets the width of the source rectangle.
IBasicVideo::SetDefaultDestinationPosition

The SetDefaultDestinationPosition method reverts to the default destination rectangle. After this method is called, the video renderer uses the entire window for playback.
IBasicVideo::SetDefaultSourcePosition

The SetDefaultSourcePosition method reverts to the default source rectangle. After this method is called, the video renderer uses the entire video image, without cropping.
IBasicVideo::SetDestinationPosition

The SetDestinationPosition method sets the destination rectangle.
IBasicVideo::SetSourcePosition

The SetSourcePosition method sets the source rectangle.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header control.h (include Dshow.h)

See also

IDispatch