CBaseControlVideo Class
A version of this page is also available for
4/8/2010
This class implements the IBasicVideo dual interface and controls the video properties of a generic video window.
Generally, a CBaseControlVideo object is a video renderer that draws video into a window on the display.
The CBaseControlVideo class supports both properties and methods. Properties are more easily accessible from many Automation controllers (such as the Microsoft Visual BasicĀ® programming system). However, some operations require applications to be able to change several properties simultaneously; for this reason, methods are provided that enable a number of related properties to be changed.
Many CBaseControlVideo member functions require only that the video renderer be connected to a filter graph. If it is not connected, member functions will 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 CBaseControlVideo object controls.
CBaseControlVideo enables your application to set and retrieve the source rectangle. All the rectangles that CBaseControlVideo uses employ top, left, width, and height rather than top, left, right, and bottom, which is favored in Win32 programming.
When no source rectangle has been set, the properties of the source rectangle return the full, native video size.
Protected Data Members
Member | Description |
---|---|
m_pFilter |
Pointer to an owning media filter. |
m_pInterfaceLock |
Externally defined critical section. |
m_pPin |
Control of the media types for connection. |
Member Functions
Member function | Description |
---|---|
Constructs a CBaseControlVideo object. |
|
Creates a memory copy of a video image. |
|
Retrieves video image size information. |
|
Sets the pin with which this object should synchronize. |
Overrideable Member Functions
Member function | Description |
---|---|
Determines if a source rectangle is valid. |
|
Determines if a target rectangle is valid. |
|
Retrieves the current source video rectangle as a pure virtual function. |
|
Returns the current image in a memory buffer as a pure virtual function. |
|
Retrieves the current target video rectangle as a pure virtual function. |
|
Retrieves the VIDEOINFOHEADER structure containing the video format. |
|
Determines if the renderer is using the default source rectangle as a pure virtual function. |
|
Determines if the renderer is using the default target rectangle as a pure virtual function. |
|
Called when the source or target rectangle changes. |
|
Passes EC_VIDEO_SIZE_CHANGED to the application. |
|
Sets the default source video rectangle as a pure virtual function. |
|
Sets the default target video rectangle as a pure virtual function. |
|
Sets the current source video rectangle as a pure virtual function. |
|
Sets the current target rectangle as a pure virtual function. |
Implemented IBasicVideo Methods
Method | Description |
---|---|
Retrieves an approximate average time per frame. |
|
Retrieves an approximate bit error rate. |
|
Retrieves an approximate bit rate for the video. |
|
Retrieves a memory rendering of the current image. |
|
Retrieves the current destination rectangle's height. |
|
Retrieves the current destination rectangle's left coordinate. |
|
Retrieves the current destination position. |
|
Retrieves the current destination rectangle's top coordinate. |
|
Retrieves the current destination rectangle's width. |
|
Retrieves the current source rectangle's height. |
|
Retrieves the current source rectangle's left coordinate. |
|
Retrieves the current source position. |
|
Retrieves the current source rectangle's top coordinate. |
|
Retrieves the current source rectangle's width. |
|
Retrieves the native video height. |
|
Retrieves a range of palette entries for the video. |
|
Retrieves the width and height of the native video. |
|
Retrieves the native video width. |
|
Determines if the renderer is using the default destination window. |
|
Determines if the renderer is using the default source window. |
|
Sets the destination rectangle's height. |
|
Sets the destination rectangle's left coordinate. |
|
Sets the destination rectangle's top coordinate. |
|
Sets the destination rectangle's width. |
|
Sets the source rectangle's height. |
|
Sets the source rectangle's left coordinate. |
|
Sets the source rectangle's top coordinate. |
|
Sets the source rectangle's width. |
|
Sets the default destination position again. |
|
Sets the default source position again. |
|
Sets the destination rectangle position. |
|
Sets the source rectangle position. |
Requirements
Windows Embedded CE | Windows CE 2.12 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
Note | Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements For more information, see Setting Up the Build Environment |