CBaseControlVideo Class
Microsoft DirectShow 9.0 |
CBaseControlVideo Class
The CBaseControlVideo 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 Microsoft Win32® programming. When no source rectangle has been set, the properties of the source rectangle return the full, native video size.
Protected Data Members
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
CBaseControlVideo | Constructs a CBaseControlVideo object. |
CopyImage | Creates a memory copy of a video image. |
GetImageSize | Retrieves video image size information. |
SetControlVideoPin | Sets the pin with which this object should synchronize. |
Overridable Member Functions
CheckSourceRect | Determines if a source rectangle is valid. |
CheckTargetRect | Determines if a target rectangle is valid. |
GetSourceRect | Retrieves the current source video rectangle (pure virtual). |
GetStaticImage | Returns the current image in a memory buffer (pure virtual). |
GetTargetRect | Retrieves the current target video rectangle (pure virtual). |
GetVideoFormat | Retrieves the VIDEOINFOHEADER structure containing the video format. |
IsDefaultSourceRect | Determines if the renderer is using the default source rectangle (pure virtual). |
IsDefaultTargetRect | Determines if the renderer is using the default target rectangle (pure virtual). |
OnUpdateRectangles | Called when the source or target rectangle changes. |
OnVideoSizeChange | Passes EC_VIDEO_SIZE_CHANGED to the application. |
SetDefaultSourceRect | Sets the default source video rectangle (pure virtual). |
SetDefaultTargetRect | Sets the default target video rectangle (pure virtual). |
SetSourceRect | Sets the current source video rectangle (pure virtual). |
SetTargetRect | Sets the current target rectangle (pure virtual). |
Implemented IBasicVideo Methods
get_AvgTimePerFrame | Retrieves an approximate average time per frame. |
get_BitErrorRate | Retrieves an approximate bit error rate. |
get_BitRate | Retrieves an approximate bit rate for the video. |
GetCurrentImage | Retrieves a memory rendering of the current image. |
get_DestinationHeight | Retrieves the current destination rectangle's height. |
get_DestinationLeft | Retrieves the current destination rectangle's left coordinate. |
GetDestinationPosition | Retrieves the current destination position. |
get_DestinationTop | Retrieves the current destination rectangle's top coordinate. |
get_DestinationWidth | Retrieves the current destination rectangle's width. |
get_SourceHeight | Retrieves the current source rectangle's height. |
get_SourceLeft | Retrieves the current source rectangle's left coordinate. |
GetSourcePosition | Retrieves the current source position. |
get_SourceTop | Retrieves the current source rectangle's top coordinate. |
get_SourceWidth | Retrieves the current source rectangle's width. |
get_VideoHeight | Retrieves the native video height. |
GetVideoPaletteEntries | Retrieves a range of palette entries for the video. |
GetVideoSize | Retrieves the width and height of the native video. |
get_VideoWidth | Retrieves the native video width. |
IsUsingDefaultDestination | Determines if the renderer is using the default destination window. |
IsUsingDefaultSource | Determines if the renderer is using the default source window. |
put_DestinationHeight | Sets the destination rectangle's height. |
put_DestinationLeft | Sets the destination rectangle's left coordinate. |
put_DestinationTop | Sets the destination rectangle's top coordinate. |
put_DestinationWidth | Sets the destination rectangle's width. |
put_SourceHeight | Sets the source rectangle's height. |
put_SourceLeft | Sets the source rectangle's left coordinate. |
put_SourceTop | Sets the source rectangle's top coordinate. |
put_SourceWidth | Sets the source rectangle's width. |
SetDefaultDestinationPosition | Sets the default destination position again. |
SetDefaultSourcePosition | Sets the default source position again. |
SetDestinationPosition | Sets the destination rectangle position. |
SetSourcePosition | Sets the source rectangle position. |