ILMMCommon Interface

This interface is exposed by the majority of LEAD filters. The interface provides basic functionality and information common to all filters that expose it.

This interface can be obtained using a direct QueryInterface call on the filter object.

When "getting" a BSTR property, the memory containing the string is allocated with SysAllocString. When this string is no longer needed, free this memory by calling SysFreeString if you are working in an environment such as C or C++ that does not automatically delete the memory. VB automatically deletes the memory, so VB programmers do not need to free the memory themselves.

The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it.

Also known as a decoder, this is a module or algorithm to decompress data.

Interface Properties:

Type Name Parameter Description Description
BSTR FilterName   Contains the friendly name of the filter.
long FilterState  

Indicates the current filter state. Possible values are:

0

The filter is stopped.

1

The filter is paused.

2

The filter is running.

long InputPinsCount   Contains the number of input pins on the filter.
long OutputPinsCount   Contains the number of output pins on the filter.
BSTR InputPinName (long nPinIndex) The zero based index of the input pin to retrieve its name. Contains the name of the input pin at the specified index.
BSTR OutputPinName (long nPinIndex) The zero based index of the output pin to retrieve its name. Contains the name of the output pin at the specified index.
BOOL IsLEADInputPinConnected (long nPinIndex) The zero based index of the input pin to check its connection state. Indicates whether the input pin at the specified index is connected to another pin.
BOOL IsLEADOutputPinConnected (long nPinIndex) The zero based index of the output pin to check its connection state. Indicates whether the output pin at the specified index is connected to another pin.
long InputPinStreamType (long nPinIndex) The zero based index of the input pin to retrieve its stream type.

Contains the stream type of the input pin at the specified index. Possible values are:

AudioStream

[0] The stream type currently used is audio.

VideoStream

[1] The stream type currently used is video.

TextStream

[2] The stream type currently used is text.

long OutputPinStreamType (long nPinIndex) The zero based index of the output pin to retrieve its stream type.

Indicates the stream type of the output pin at the specified index. Possible values are:

 

AudioStream

[0] The stream type currently used is audio.

VideoStream

[1] The stream type currently used is video.

TextStream

[2] The stream type currently used is text.

long InWidth (long nPinIndex) The zero based index of the input pin to retrieve its connected video width. Indicates the video width for the input pin at the specified index. (Applicable for video streams only).
long InHeight (long nPinIndex) The zero based index of the input pin to retrieve its connected video height. Indicates the video height for the input pin at the specified index. (Applicable for video streams only).
long OutWidth (long nPinIndex) The zero based index of the output pin to retrieve its connected video width. Indicates the video width for the output pin at the specified index. (Applicable for video streams only).
long OutHeight (long nPinIndex) The zero based index of the output pin to retrieve its connected video height. Indicates the video height for the output pin at the specified index. (Applicable for video streams only).
long InBits (long nPinIndex) The zero based index of the input pin to retrieve its connected video bits per pixel. Indicates the bits per pixel value of the video stream for the input pin at the specified index. (Applicable for video streams only).
long OutBits (long nPinIndex) The zero based index of the output pin to retrieve its connected video bits per pixel. Indicates the bits per pixel value of the video stream for the output pin at the specified index. (Applicable for video streams only).
long InChannels (long nPinIndex) The zero based index of the input pin to retrieve the number of channels for the connected audio stream. Indicates the number of channels for the input pin at the specified index (Applicable for audio streams only).
long OutChannels (long nPinIndex) The zero based index of the output pin to retrieve the number of channels for the connected audio stream. Indicates the number of channels for the output pin at the specified index (Applicable for audio streams only).
long InBitsPerSample (long nPinIndex) The zero based index of the input pin to retrieve the bits per sample value for the connected audio stream. Indicates the bits per sample value for the input pin at the specified index. (Applicable for audio streams only).
long OutBitsPerSample (long nPinIndex) The zero based index of the output pin to retrieve the bits per sample value for the connected audio stream. Indicates the bits per sample value for the output pin at the specified index. (Applicable for audio streams only).
long InSamplesPerSec (long nPinIndex) The zero based index of the input pin to retrieve the bits per sample value for the connected audio stream. Indicates the samples per second (frequency) value for the input pin at the specified index. (Applicable for audio streams only).
long OutSamplesPerSec (long nPinIndex) The zero based index of the output pin to retrieve the bits per sample value for the connected audio stream. Indicates the samples per second (frequency) value for the output pin at the specified index. (Applicable for audio streams only).
long InputAspectRatioX (long nPinIndex) The zero based index of the input pin for which to retrieve the X part of the aspect ratio for the connected video stream. Indicates the X (width) part of the aspect ratio of the video stream at the specified index. (Applicable for video streams only).
long InputAspectRatioY (long nPinIndex) The zero based index of the input pin for which to retrieve the Y part of the aspect ratio for the connected video stream. Indicates the Y (height) part of the aspect ratio of the video stream at the specified index. (Applicable for video streams only).
BSTR InputPinStreamSubType (long nPinIndex) The zero based index of the input pin to retrieve its stream sub type string. Contains the stream sub type CLSID as a string.

Interface Methods:

HRESULT CommitSettings ()

Description

Writes filter settings to the registry. The Multimedia filters save their settings to the registry only at filter destruction. This method will force the filter to save its settings to the registry before it is released. If the filter has no settings to write to the registry, E_NOTIMPL is returned.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT ExportSettings (BSTR FileName)

Parameters

FileName

character string containing the destination file name.

Description

Writes filter settings to a file. The destination file can have one or more filters settings, where every filter is identified by its own section as follows:

[Filter 1]

Setting1=value

&

Setting(n)=value

&

[Filter m]

Setting1=value

&

Setting(n)=value

The file format is the same as windows INI.

If the filter has no settings to expose, E_NOTIMPL is returned.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT ImportSettings (BSTR FileName)

Parameters

FileName

character string containing the source file name.

Description

Reads and sets filter settings from a file, written using the ExportSettings method. The ExportSettings method insures that the file is formatted correctly and the right values are written. If the filter has no settings to set, E_NOTIMPL is returned.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT LoadFromMemory (char * pMem)

Parameters

pMem

pointer to a character string containing the filter settings to load.

Description

Reads filter settings from a memory buffer. The passed buffer must be filled using the WriteToMemory method.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT LoadSettings ()

Description

Loads filter settings from the registry. The Multimedia filters import the settings from the registry only at creation time. This method will force the filter to re-load its settings from the registry. If the filter has no settings to load from the registry, E_NOTIMPL is returned.

Return

S_OK if connected, S_FALSE otherwise.

HRESULT WriteToMemory (char * pMem, long *lSize)

Parameters

pMem

pointer to a character string to be updated with the filter settings.

lSize

pointer to a variable to be updated with the size of the written settings, in bytes.

Description

Writes filter settings to a memory buffer. The filter settings will be written in binary format. Do not try to read individual settings from the buffer. The output buffer can only be used with the LoadFromMemory method.

Return

S_OK if connected, 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