ILMMCommon

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.

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.

Data Types

StreamType

Summary

Lists the possible stream types that can be returned by InputPinStreamType and OutputPinStreamType methods.

Syntax

typedef enum  
{ 
   AudioStream, 
   VideoStream, 
   TextStream, 
   PrivateDataStream, 
   UnknownStream, 
} StreamType; 

Members

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.

PrivateDataStream

[3] The stream type currently used is private data.

UnknownStream

[4] The stream type currently used is unknown.

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

Methods

HRESULT CommitSettings ()

Description

Writes filter settings to the registry.

Comments

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.

Returns

Return Description
S_OK Connected.
S_FALSE Otherwise.

HRESULT ExportSettings ( BSTR FileName)

Description

Writes filter settings to a file.

Parameters

FileName

A character string containing the destination file name.

Comments

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.

Returns

Return Description
S_OK Connected.
S_FALSE Otherwise.

HRESULT ImportSettings ( BSTR FileName)

Description

Reads and sets filter settings from a file, written using the ExportSettings method.

Parameters

FileName

A character string containing the source file name.

Comments

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.

Returns

Return Description
S_OK Connected.
S_FALSE Otherwise.

HRESULT LoadFromMemory (unsigned char *pMem)

Description

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

Parameters

pMem

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

Returns

Return Description
S_OK Connected.
S_FALSE Otherwise.

HRESULT LoadSettings ()

Description

Loads filter settings from the registry.

Comments

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.

Returns

Return Description
S_OK Connected.
S_FALSE Otherwise.

HRESULT WriteToMemory (unsigned char *pMem, long *lSize)

Description

Writes filter settings to a memory buffer.

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.

Comments

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.

Returns

Return Description
S_OK Connected.
S_FALSE Otherwise.
Help Version 23.0.2024.9.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.