ILMVIOvLy Interface

This is the interface for the LEAD Video Image 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; 

Members

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 ILMVIovly interface properties and methods.

Syntax

typedef [v1_enum] enum LayerTypeConstants 
{ 
   LAYERTYPE_BACKGROUND = 0, 
   LAYERTYPE_VIDEO = 1, 
   LAYERTYPE_OVERLAYIMAGE = 2 
} LayerTypeConstants; 

Members

LAYERTYPE_BACKGROUND

The background layer is a solid color.

LAYERTYPE_VIDEO

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_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; 

Members

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; 

Members

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) LayerTypeConstants value that indicates the layer to test. Determines whether the specified layer is active.
long LayerOrder (LayerTypeConstants LayerType) LayerTypeConstants value that 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.
OutputSizeTypeConstants OutputSizeType None Specifies the method used to control the output size. The default is OUTPUTSIZETYPE_AUTO.
long OutputWidth None 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 None 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.
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.
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) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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.
VARIANT_BOOL IsMaskImageLoaded(LayerTypeConstants LayerType) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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) LayerTypeConstants value that 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 rectangular region in the specified layer.
long RgnRoundRectEllipseHeight(LayerTypeConstants LayerType) LayerTypeConstants value that 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 rectangular region in the specified layer.

Methods

HRESULT ResetToDefaultsEx(LMVOverlay_APILEVEL ApiLevel)

Description

Resets the filter to default values.

Parameters

ApiLevel

Indicates which defaults should be used. Current applications should set ApiLevel to LMVOverlay_APILEVEL_1 = 0.

Comments

The overlay filter might change in the future and have different properties or default behavior. Calling this method ensures the filter will have the same default values it had when you developed your application.

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

Returns

Return Description
S_OK Successful.
E_INVALIDARG Otherwise.

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

Description

Gets information for the specified layer.

Parameters

LayerType

LayerTypeConstants value that 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.
Help Version 22.0.2022.8.23
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2022 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help

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