ILMVVOvLy Interface

This is the interface for the LEAD Video Overlay Filter.

Data Types

RegionConstants

Summary

Describes a region in a layer.

Syntax

typedef [v1_enum] enum RegionConstants 
{ 
   REGION_NONE = 0, 
   REGION_RECT = 1, 
   REGION_ROUNDRECT = 2, 
   REGION_ELLIPSE = 3, 
} RegionConstants; 
Enumeration Description
REGION_NONE The layer has no region.
REGION_RECT The layer has a rectangular region.
REGION_ROUNDRECT The layer has a round rectangular region.
REGION_ELLIPSE The layer has an elliptical region.

LayerTypeConstants

Summary

Constants that define the supported layer types. These will be used to identify the layer to be acted upon in the ILMVVovly interface properties and methods.

Syntax

typedef [v1_enum] enum LayerTypeConstants 
{ 
   LAYERTYPE_BACKGROUND = 0, 
   LAYERTYPE_VIDEO1 = 1, 
   LAYERTYPE_VIDEO2 = 2, 
   LAYERTYPE_OVERLAYIMAGE = 3 
} LayerTypeConstants; 
Enumeration Description
LAYERTYPE_BACKGROUND The background layer is a solid color.
LAYERTYPE_VIDEO1 The first video layer:
The video stream connected to pin 0. This layer must exist (the first pin of the filter must be connected), in order for the filter to work.
LAYERTYPE_VIDEO2 The second video layer:
The video stream connected to pin 1.
LAYERTYPE_OVERLAYIMAGE The overlay image layer:
An ordinary bitmap, icon, or cursor.

OutputSizeTypeConstants

Summary

Constants that define the method used to specify the output size.

Syntax

typedef [v1_enum] enum OutputSizeTypeConstants 
{ 
   OUTPUTSIZETYPE_AUTO = 0, 
   OUTPUTSIZETYPE_CUSTOM = 1 
} OutputSizeTypeConstants; 
Enumeration Description
OUTPUTSIZETYPE_AUTO The output size is the same as the size of the input stream. The output width/height is the same as the input width/height of the input stream. In this case, the OutputWidth and OutputHeight properties are ignored.
OUTPUTSIZETYPE_CUSTOM The output size is indicated by the OutputWidth and OutputHeight properties.

LMVOverlay_APILEVEL

Summary

Lists the valid values for the ApiLevel parameter that can be passed to the ResetToDefaultsEx method.

Syntax

typedef [v1_enum] enum LMVOverlay_APILEVEL 
{ 
   LMVOverlay_APILEVEL_1 = 0 
} LMVOverlay_APILEVEL; 
Enumeration Description
LMVOverlay_APILEVEL_1 Use the defaults from the current version of the overlay filter.

Properties

Type Name Parameter Description Description
long ActiveLayersCount None Gets the number of active layers. An active layer is an available layer.
VARIANT_BOOL IsLayerActive (LayerTypeConstants LayerType) Indicates the layer to test. Determines whether the specified layer is active.
long LayerOrder (LayerTypeConstants LayerType) Indicates the layer for which to get the order. Gets or sets a value that indicates the specified layer's order. The order range is from 0 to 3, where 0 indicates most distant position.
BSTR OverlayImageFileName None Gets or sets the name of the image file used as the overlay image layer. The image should be a 24-bpp Windows BMP file or an Icon file. Pass NULL to free the loaded image.
long OverlayImageDIBPointer None Sets a pointer to a device independent bitmap to be used as the overlay image layer. This overlay image handle pointer can be obtained using the LoadImage API; it is actually a bitmap handle, HBITMAP.
LONGLONG OverlayImageDIBPointer64 None Sets a pointer to a device independent bitmap to be used as the overlay image layer. This overlay image handle pointer can be obtained using the LoadImage API; it is actually a bitmap handle, HBITMAP.
NOTE: This property is for use in x64 applications.
VARIANT_BOOL IsOverlayImageLoaded None Gets or sets a value that indicates whether the image used as the overlay image layer is loaded.
long BkLayerColor None Gets or sets the color of the background layer.
VARIANT_BOOL EnableMaskBitmap (LayerTypeConstants LayerType) Indicates the layer for which to enable or disable the mask bitmap. Enables or disables the mask bitmap feature for the specified layer.
When the mask bitmap is used for a layer, this layers opacity and transparency properties will be ignored.
BSTR MaskImageFileName (LayerTypeConstants LayerType) Indicates the layer for which to get or set the file name of the mask bitmap. Gets or sets the file name of the mask image to be used for the specified layer. The mask image must be an 8-bpp gray scale Windows BMP file. Pass NULL to free the loaded image.
long MaskImageDIBPointer (LayerTypeConstants LayerType) Indicates the layer for which to set the DIB pointer. Sets a pointer to a device independent bitmap to be used as the mask image for the specified layer. This pointer can be obtained using the LoadImage API; it is actually a bitmap handle, HBITMAP.
LONGLONG MaskImageDIBPointer64 (LayerTypeConstants LayerType) Indicates the layer for which to set the DIB pointer. Sets a pointer to a device independent bitmap to be used as the mask image for the specified layer. This pointer can be obtained using the LoadImage API; it is actually a bitmap handle, HBITMAP.
NOTE: This property is for use in x64 applications.
VARIANT_BOOL IsMaskImageLoaded (LayerTypeConstants LayerType) Indicates the layer for which to determine whether the mask image is loaded. Gets or sets a value that indicates whether the mask image for the specified layer is loaded.
VARIANT_BOOL EnableOpacity (LayerTypeConstants LayerType) Indicates the layer for which to enable or disable opacity. Enables or disables the opacity feature of the specified layer. When the opacity feature is enabled for a layer, the transparency feature for this layer is ignored.
long Opacity (LayerTypeConstants LayerType) Indicates the layer for which to get or set the opacity. Gets or sets the opacity, as a percentage, for the specified layer.
VARIANT_BOOL EnableTransparency (LayerTypeConstants LayerType) Indicates the layer for which to enable or disable transparency. Enables or disables the transparency feature for the specified layer. When transparency is enabled for a layer, the Opacity property for this layer is ignored.
long TransparentColor (LayerTypeConstants LayerType) Indicates the layer for which to get or set the transparent color. Gets or sets the transparent color for the specified layer.
long XPos (LayerTypeConstants LayerType) Indicates the layer for which to get or set the X coordinate of the position. Gets or sets the X coordinate of the position of the specified layer. Values range from 0 to the output stream width. The output stream width is the maximum width of the 2 input videos.
long YPos (LayerTypeConstants LayerType) Indicates the layer for which to get or set the Y coordinate of the position. Gets or sets the Y coordinate of the position of the specified layer. Values range from 0 to the output stream height. The output stream height is the maximum height of the 2 input videos.
RegionConstants Region (LayerTypeConstants LayerType) Indicates the layer for which to get or set the region. Gets or sets a region for the specified layer. After setting a region for a layer, pixels inside the region will be considered part of this layer.
See RegionConstants, above, for more information on region types.
long RgnLeft (LayerTypeConstants LayerType) Indicates the layer for which to get or set the region's left boundary. Gets or sets the coordinate of the left boundary of the region in the specified layer.
This coordinate represents either the coordinate of the left boundary of a rectangular region itself, or the coordinate of the left boundary of the bounding box of the region.
long RgnTop (LayerTypeConstants LayerType) Indicates the layer for which to get or set the coordinate of the region's top boundary. Gets or sets the coordinate of the top boundary of the region in the specified layer.
This coordinate represents either the coordinate of the top boundary of a rectangular region itself, or the coordinate of the top boundary of the bounding box of the region.
long RgnRight (LayerTypeConstants LayerType) Indicates the layer for which to get or set the region's right boundary. Gets or sets the coordinate of the right boundary of the region in the specified layer.
This coordinate represents either the coordinate of the right boundary of a rectangular region itself, or the coordinate of the right boundary of the bounding box of the region.
long RgnBottom (LayerTypeConstants LayerType) Indicates the layer for which to get or set the coordinate of the region's bottom boundary. Gets or sets the coordinate of the bottom boundary of the region in the specified layer.
This coordinate represents either the coordinate of the bottom boundary of a rectangular region itself, or the coordinate of the bottom boundary of the bounding box of the region.
long RgnRoundRectEllipseWidth (LayerTypeConstants LayerType) Indicates the layer for which to get or set the width of the ellipse. Gets or sets the width of the ellipse used to draw the rounded corners of a rounded rectangle region in the specified layer.
long RgnRoundRectEllipseHeight (LayerTypeConstants LayerType) Indicates the layer for which to get or set the height of the ellipse. Gets or sets the height of the ellipse used to draw the rounded corners of a rounded rectangle region in the specified layer.
OutputSizeTypeConstants OutputSizeType Specifies the method used to control the output size. The default is OUTPUTSIZETYPE_AUTO.
long OutputWidth Specifies the output width. Used only if OutputSizeType is set to OUTPUTSIZETYPE_CUSTOM.
If set to 0, the output width is the same as the input width. In this case, the width is calculated as if OutputSizeType was set to OUTPUTSIZETYPE_AUTO.
The default is 0.
long OutputHeight Specifies the output height. Used only if OutputSizeType is set to OUTPUTSIZETYPE_CUSTOM.
If set to 0, the output height is the same as the input height. In this case, the height is calculated as if OutputSizeType was set to OUTPUTSIZETYPE_AUTO.
The default is 0.

Methods

HRESULT GetLayerInfo(LayerTypeConstants LayerType, long *pWidth, long *pHeight, long *pBitsPerPixel)

Description

Gets information for the specified layer.

Parameters

LayerType

Indicates the layer for which to get the information.

pWidth

Pointer to a variable to be updated with the width of the specified layer.

pHeight

Pointer to a variable to be updated with the height of the specified layer.

pBitsPerPixel

Pointer to a variable to be updated with the bits per pixel of the specified layer.

Comments

If the specified layer is not available, all parameters are updated with zeros.

Returns

Return Description
S_OK Successful
S_FALSE Otherwise.

HRESULT ResetToDefaultsEx(LMVOverlay_APILEVEL ApiLevel)

Description

Resets the filter to default values.

Parameters

ApiLevel

Specifies which defaults should be used by the filter. Current applications should set ApiLevel to LMVOverlay_APILEVEL_1 = 0.

Comments

The filter might change in the future and have different properties or default behavior. Calling this method ensures future versions of the filter will behave the same way as when the application was developed.

It is best to call ResetToDefaultsEx(LMVOverlay_APILEVEL_1) before you start setting properties and start calling other methods for this interface.

Returns

Return Description
S_OK Successful.
< 0 An error occurred.
E_INVALIDARG The ApiLevel parameter is invalid.
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.