ILMVIOvLy Interface

This is the interface for the LEAD Video Image Overlay Filter.

Data types

RegionConstants

typedef [v1_enum] enum RegionConstants 
{ 
   REGION_NONE = 0, 
   REGION_RECT = 1, 
   REGION_ROUNDRECT = 2, 
   REGION_ELLIPSE = 3, 
} RegionConstants; 

Describes a region in a layer.

Member

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

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

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.

Member

Description

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

typedef [v1_enum] enum OutputSizeTypeConstants 
{ 
   OUTPUTSIZETYPE_AUTO = 0, 
   OUTPUTSIZETYPE_CUSTOM = 1 
} OutputSizeTypeConstants; 

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

Member

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

typedef [v1_enum] enum LMVOverlay_APILEVEL 
{ 
   LMVOverlay_APILEVEL_1 = 0, 
} LMVOverlay_APILEVEL; 

Constants that specify which defaults should be used by ResetToDefaultsEx.

Member

Description

LMVOverlay_APILEVEL_1

Use the defaults from the current version of the overlay filter.

Interface 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.

Interface Methods

HRESULT ResetToDefaultsEx(LMVOverlay_APILEVEL ApiLevel)

Parameters

ApiLevel

Indicates which defaults should be used

Description

Resets the filter to default values. The ApiLevel determines which default values to use. Current applications should set ApiLevel to LMVOverlay_APILEVEL_1 = 0.

The overlay filter might change in the future and have different properties or default behaviour. 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

S_OK if successful, E_INVALIDARG otherwise.

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

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.

Description

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

Returns

S_OK if successful, S_FALSE otherwise.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Filters C API Help