The filter graph manager exposes the IBasicVideo object, which 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 video renderer must be connected to use IBasicVideo object methods. If it isn't connected, all methods return run-time error 521. Properties set on a video renderer generally 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 object controls. IBasicVideo allows the source rectangle to be set and retrieved. All IBasicVideo rectangles have top, left, width, and height properties. When no source rectangle has been set, the properties of the source rectangle return the full, native video size.
Properties
Name | Description |
AvgTimePerFrame | Retrieves the average time between successive frames in 100-nanosecond units. |
BitErrorRate | Retrieves an approximate bit error rate for the video stream. |
BitRate | Retrieves an approximate bit rate for the video stream. |
DestinationLeft | Sets or retrieves the x-axis coordinate for the destination video rectangle. |
DestinationHeight | Sets or retrieves the height of the destination video rectangle. |
DestinationTop | Sets or retrieves the y-axis coordinate for the destination video rectangle. |
DestinationWidth | Sets or retrieves the width of the destination video rectangle. |
SourceHeight | Sets or retrieves the height of the source video rectangle. |
SourceLeft | Sets or retrieves the x-axis coordinate for the source video rectangle. |
SourceTop | Sets or retrieves the y-axis coordinate for the source video rectangle. |
SourceWidth | Sets or retrieves the width of the source video rectangle. |
VideoHeight | Retrieves the current video height. |
VideoWidth | Retrieves the current video width. |
Methods
Name | Description |
GetCurrentImage | Returns a copy of the image that is currently waiting at the renderer. |
GetDestinationPosition | Retrieves the destination rectangle for the window. |
GetSourcePosition | Retrieves the source video rectangle. |
GetVideoPaletteEntries | Retrieves the color palette entries required by the video. |
GetVideoSize | Retrieves the native video dimensions. |
IsUsingDefaultSource | Indicates whether the default source is being used. |
SetDefaultDestinationPosition | Sets the default destination position for the window. |
SetDefaultSourcePosition | Informs the renderer to use the default source rectangle. |
SetDestinationPosition | Sets the destination rectangle for the window. |
SetSourcePosition | Sets the source video rectangle. |
Retrieves the average time between successive frames in 100-nanosecond units.
objVideo.AvgTimePerFrame
Retrieves a bit error rate for the video stream (one error for approximately this many bits).
objVideo.BitErrorRate
Retrieves an approximate bit rate for the video stream (in bits per second).
objVideo.BitRate
Retrieves or sets the height of the destination rectangle.
objVideo.DestinationHeight [= lValue]
Setting this coordinate does not affect the destination rectangle y-axis origin.
Retrieves or sets the destination x-axis origin coordinate.
objVideo.DestinationLeft [= lValue]
Setting this coordinate does not affect the destination rectangle width.
Retrieves or sets the destination y-axis origin coordinate.
objVideo.DestinationTop [= lValue]
Setting this coordinate does not affect the destination rectangle height.
Retrieves or sets the width of the destination rectangle.
objVideo.DestinationWidth [= lValue]
Setting this coordinate does not affect the destination rectangle x-axis origin.
Retrieves the image currently waiting at the renderer.
objVideo.GetCurrentImage BufferSize, DIBImage
Pause the video renderer before calling this method; calling this method in any other state returns run-time error 549. Depending on what data the source filter has available, the video renderer is not guaranteed to service this request.
An application can use this method to get a copy of the current image the video renderer holds when paused by calling the method with DIBImage set to Nothing.
Retrieves the position of the destination rectangle in window coordinates.
objVideo.GetDestinationPosition Left, Top, Width, Height
This method has the same effect as individually retrieving the DestinationLeft, DestinationTop, DestinationWidth, and DestinationHeight properties.
Retrieves the source position that is clipped to the available video.
objVideo.GetSourcePosition Left, Top, Width, Height
This method has the same effect as retrieving the values of the SourceLeft, SourceTop, SourceWidth, and SourceHeight properties.
Retrieves the palette colors for the video.
objVideo.GetVideoPaletteEntries StartIndex, Entries, Retrieved, Palette
Retrieves the native video dimensions.
objVideo.GetVideoSize Width, Height
Retrieves the native video width and height, disregarding any source rectangle that might have been set. ActiveX™ Controls or other applications can use this information to negotiate space in compound documents.
Retrieves whether or not this object is using the default source.
objVideo.IsUsingDefaultSource
True indicates that the IBasicVideo object is using the default source; False indicates that it is not.
Sets the default destination position of the video window so that the renderer uses the entire window for playback.
objVideo.SetDefaultDestinationPosition
Informs the renderer to use the default source rectangle.
objVideo.SetDefaultSourcePosition
Sets the destination rectangle in window coordinates.
objVideo.SetDestinationPosition Left, Top, Width, Height
This method has the same effect as setting the DestinationLeft, DestinationTop, DestinationWidth, and DestinationHeight properties individually.
Sets the source rectangle and is clipped against the available video.
objVideo.SetSourcePosition Left, Top, Width, Height
This method has the same effect as setting the SourceLeft, SourceTop, SourceWidth, and SourceHeight properties individually.
Retrieves or sets the height of the source rectangle.
objVideo.SourceHeight [= lValue]
Setting the height of the source rectangle has no effect on the width and other source values.
Retrieves or sets the source rectangle's x-coordinate.
objVideo.SourceLeft [= lValue]
Changes to this property do not affect the width and other source values.
Retrieves or sets the source rectangle y-axis origin coordinate.
objVideo.SourceTop [= lValue]
Setting this method has no effect on the source rectangle height.
Retrieves or sets the source rectangle width.
objVideo.SourceWidth [= lValue]
This method has no effect on the source rectangle x-axis coordinate.
Retrieves the native height of the video.
objVideo.VideoHeight
This method returns the actual height of the video supplied to the renderer. It does not address any set source rectangle, but simply returns the native vertical dimension. It can be used by applications to negotiate size requirements with in-place OLE documents.
Retrieves the native width of the video.
objVideo.VideoWidth
This method returns the actual width of the video supplied to the renderer. It does not address any set source rectangle, but simply returns the native horizontal dimension. It can be used by applications to negotiate size requirements with in-place OLE documents.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.