In This Topic ▼

ILMSsfWrt Interface

This is the interface for the LEAD SSF Writer.

Data Types

eLMSSFWRT_MODE

typedef enum 
{ 
   LMSSFWRT_MODE_CBR_1PASS 
} eLMSSFWRT_MODE; 
Enumeration Description
LMSSFWRT_MODE_CBR_1PASS Constant bitrate 1 pass mode.

eLMSSFWRT_QUALITY

typedef enum 
{ 
   LMSSFWRT_QUALITY_FASTEST, 
   LMSSFWRT_QUALITY_BALANCED, 
   LMSSFWRT_QUALITY_BEST 
} eLMSSFWRT_QUALITY; 
Enumeration Description
LMSSFWRT_QUALITY_FASTEST Fastest, at the expense of quality.
LMSSFWRT_QUALITY_BALANCED Quality and speed are balanced.
LMSSFWRT_QUALITY_BEST Best quality.

eLMSSFWRT_VF

typedef enum 
{ 
   LMSSFWRT_VF_VC1, 
   LMSSFWRT_VF_H264_MAIN, 
   LMSSFWRT_VF_H264_BASELINE, 
   LMSSFWRT_VF_LEAD_H264_MAIN, 
   LMSSFWRT_VF_LEAD_H264_BASELINE 
} eLMSSFWRT_VF; 
Enumeration Description
LMSSFWRT_VF_VC1 VC-1 Compression.
LMSSFWRT_VF_H264_MAIN Microsoft H.264 compression using Main profile.
LMSSFWRT_VF_H264_BASELINE Microsoft H.264 compression using Baseline profile.
LMSSFWRT_VF_LEAD_H264_MAIN LEAD H.264 compression using Main profile.
LMSSFWRT_VF_LEAD_H264_BASELINE LEAD H.264 compression using Baseline profile.

eLMSSFWRT_AF

typedef enum 
{ 
   LMSSFWRT_AF_WMA, 
   LMSSFWRT_AF_WMA_PRO, 
   LMSSFWRT_AF_AAC, 
   LMSSFWRT_AF_LEAD_AAC 
} eLMSSFWRT_AF; 
Enumeration Description
LMSSFWRT_AF_WMA Windows Media Audio.
LMSSFWRT_AF_WMA_PRO Windows Media Audio Professional.
LMSSFWRT_AF_AAC Microsoft AAC Audio compression.
LMSSFWRT_AF_LEAD_AAC LEAD AAC Audio compression.

eLMSSFWRT_APILEVEL

typedef enum 
{ 
   LMSSFWRT_APILEVEL_1 = 0, 
} eLMSSFWRT_APILEVEL; 
Enumeration Description
LMSSFWRT_APILEVEL_1 Use the defaults from the current version of the resize filter.

Properties

Type Name Description
eLMSSFWRT_QUALITY Quality Gets or sets the quality factor used to create video.
long VideoFormatSupportedCount (Read-only) Gets the current count of video formats supported.
eLMSSFWRT_VF VideoFormat Gets or sets the video format for the underlying video stream.
long VideoModeSupportedCount (Read-only) Gets the current count of video modes supported.
eLMSSFWRT_MODE VideoMode Gets or sets the video mode for the underlying video stream.
double VideoBufferWindow Gets or sets the desired buffer time for video data.
double VideoKeyFrameInterval Gets or sets the time per key frame in seconds.
long VideoStreamCount (Read-only) Gets the current video stream count.
long AudioFormatSupportedCount (Read-only) Gets the current audio format supported count.
eLMSSFWRT_AF AudioFormat Gets or sets the current audio format.
long AudioModeSupportedCount (Read-only) Gets the audio modes supported count.
eLMSSFWRT_MODE AudioMode Gets or sets the video mode for the underlying audio stream.
ILMSsfWrtAudioStream * AudioStream (Read-only) Gets the ILMSsfWrtAudioStream interface pointer.
Note: After using ILMSsfWrtAudioStream interface, the caller should release the object.

Methods

HRESULT ResetToDefaults(eLMSSFWRT_APILEVEL level)

Description

Resets the SSF Writer to default values.

Parameters

ApiLevel

The eLMSSFWRT_APILEVEL value indicating the API level used to reset defaults. Current applications should set ApiLevel to LMSSFWRT_APILEVEL_1 = 0.

Comments

The Writer might change in the future and have different properties or default behavior. Calling this method ensures the filter will have the same default values as they were at the time you developed your application.

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

This method does the following:

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT EnterEdit()

Description

Enters settings edit mode.

Comments

This method pushes the current settings onto a saved settings stack. Any settings changes can be discarded later by calling LeaveEdit and passing the value VARIANT_TRUE for the discard parameter.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT LeaveEdit(VARIANT_BOOL discard)

Description

Leaves settings edit mode.

Parameters

discard

A Boolean value that indicates whether to discard (TRUE) or not (FALSE) any changed settings values since the last call to EnterEdit.

Comments

This method pops the top entry from the saved settings stack and optionally reverts the settings to the values held before the EnterEdit method was called. To discard settings changes pass the value VARIANT_TRUE for the discard parameter.

Returns

Return Description
S_OK Successful.
E_UNEXPECTED EnterEdit was not called prior to LeaveEdit.

HRESULT RealizeSettings()

Description

Validates all settings changes and clears any edit dirty flags.

Comments

The RealizeSettings method validates settings changes to Quality, as well as, all Video and Audio Stream property settings. The following property constraints are applied:

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.

HRESULT CommitSettings()

Description

Commits the SSF filter settings to the registry.

Comments

The CommitSettings method calls RealizeSettings to validate the SSF interface settings and then saves the settings to the registry.

Returns

Return Description
S_OK Successful.
E_FAIL Failure.

HRESULT GetVideoFormatSupported(long index, eLMSSFWRT_VF *pVal)

Description

Gets the supported video format for the index specified.

Parameters

index

A long value that indicates which video format to retrieve.

pVal

A pointer to an eLMSSFWRT_VF enumeration type to receive the video format.

Returns

Return Description
S_OK Successful.
E_POINTER pVal pointer is NULL.
E_INVALIDARG The index specified exceeds the current video formats count (see VideoFormatSupportedCount property above).

HRESULT IsVideoFormatSupported(eLMSSFWRT_VF format, VARIANT_BOOL *pVal)

Description

Checks whether the specified video format is supported.

Parameters

format

A eLMSSFWRT_VF enumeration type indicating which video format to check.

pVal

A pointer to a VARIANT_BOOL type to receive the supported state.

Returns

Return Description
S_OK Successful; *pVal equals VARIANT_TRUE if the format is supported, else VARIANT_FALSE.
E_POINTER pVal pointer is NULL.

HRESULT GetVideoModeSupported(long index, eLMSSFWRT_MODE *pVal)

Description

Gets the supported video mode for the index specified.

Parameters

index

A long value that indicates which video mode to retrieve.

pVal

A pointer to an eLMSSFWRT_MODE enumeration type to receive the video mode.

Returns

Return Description
S_OK Successful; *pVal equals VARIANT_TRUE if the format is supported, else VARIANT_FALSE.
E_POINTER pVal pointer is NULL.
E_INVALIDARG The index specified exceeds the current video modes count (see VideoModeSupportedCount property above).

HRESULT IsVideoModeSupported(eLMSSFWRT_MODE mode, VARIANT_BOOL *pVal)

Description

Checks whether or not the specified video mode is supported.

Parameters

format

A eLMSSFWRT_MODE enumeration type indicating which video mode to check.

*pVal

A pointer to a VARIANT_BOOL type to receive the supported state.

Returns

Return Description
S_OK Successful; *pVal equals VARIANT_TRUE if the format is supported, else VARIANT_FALSE.
E_POINTER pVal pointer is NULL.

HRESULT GetVideoStream(long index, ILMSsfWrtVideoStream **pVal)

Description

Gets an ILMSsfWrtVideoStream interface pointer for the video stream indicated by index value.

Parameters

index

A long value indicating for which video stream to retrieve the ILMSsfWrtVideoStream interface.

pVal

A pointer to pointer to an ILMSsfWrtVideoStream type to receive the interface pointer.

The ILMSsfWrtVideoStream interface is used to set the bitrate, width and height of the video stream.

Note: After using ILMSsfWrtVideoStream interface, the caller should release the object.

Returns

Return Description
S_OK Successful; pVal holds the interface pointer.
E_POINTER pVal pointer is NULL.
E_INVALIDARG The index is out of range.

HRESULT AddVideoStream()

Description

Adds a new video stream.

Comments

This method creates a new video stream object and adds it to the current video stream list. If successful, the VideoStreamCount property will be incremented by one. To retrieve the interface for the newly added video stream, call GetVideoStream, passing the index of VideoStreamCount-1.

Returns

Return Description
S_OK Successful.
S_FALSE Otherwise.
E_INVALIDARG The current VideoStreamCount is equal to 16 (the maximum number of allowed video streams).

HRESULT DeleteVideoStream(long index)

Description

Deletes an existing video stream indicated by index value.

Parameters

index

A long value indicating which video stream to be deleted.

Returns

Return Description
S_OK Successful.
E_INVALIDARG The index is out of range OR there is only 1 video stream.

HRESULT GetAudioFormatSupported(long index, eLMSSFWRT_AF *pVal)

Description

Gets the supported audio format for the index specified.

Parameters

index

A long value that indicates which audio format to retrieve.

pVal

A pointer to an eLMSSFWRT_AF enumeration type to receive the audio format.

Returns

Return Description
S_OK Successful.
E_POINTER pVal pointer is NULL.
E_INVALIDARG The index specified exceeds the current audio formats count (see AudioFormatSupportedCount property above).

HRESULT IsAudioFormatSupported(eLMSSFWRT_AF format, VARIANT_BOOL *pVal)

Description

Checks whether or not the specified audio format is supported.

Parameters

format

A eLMSSFWRT_AF enumeration type indicating which audio format to check.

pVal

A pointer to a VARIANT_BOOL type to receive the supported state.

Returns

Return Description
S_OK Successful; *pVal equals VARIANT_TRUE if the format is supported, else VARIANT_FALSE.
E_POINTER pVal pointer is NULL.

HRESULT GetAudioModeSupported(long index, eLMSSFWRT_MODE *pVal)

Description

Gets the supported audio mode for the index specified.

Parameters

index

A long value that indicates which audio mode to retrieve.

pVal

A pointer to an eLMSSFWRT_MODE enumeration type to receive the audio mode.

Returns

Return Description
S_OK Successful; *pVal equals VARIANT_TRUE if the format is supported, else VARIANT_FALSE.
E_POINTER pVal pointer is NULL.
E_INVALIDARG The index specified exceeds the current audio modes count (see AudioModeSupportedCount property above).

HRESULT IsAudioModeSupported(eLMSSFWRT_MODE mode, VARIANT_BOOL *pVal)

Description

Checks whether or not the specified audio mode is supported.

Parameters

format

A eLMSSFWRT_MODE enumeration type indicating which audio mode to check.

pVal

A pointer to a VARIANT_BOOL type to receive the supported state.

Returns

Return Description
S_OK Successful; *pVal equals VARIANT_TRUE if the mode is supported, else VARIANT_FALSE.
E_POINTER pVal pointer is NULL.
Help Version 22.0.2022.6.24
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.