ILMSsfWrt Interface

This is the interface for the LEAD SSF Writer.

Data Types:

eLMSSFWRT_MODE

typedef enum 
{ 
   LMSSFWRT_MODE_CBR_1PASS 
} eLMSSFWRT_MODE; 

Constant

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; 

Constant

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; 

Constant

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; 

Constant

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; 

Constant

Description

LMSSFWRT_APILEVEL_1

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

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

Interface Methods:

HRESULT ResetToDefaults(eLMSSFWRT_APILEVEL level)

Parameters

ApiLevel

The eLMSSFWRT_APILEVEL value indicating the API level used to reset defaults.

Description

Resets the SSF Writer to default values. The ApiLevel determines which default values to use. Current applications should set ApiLevel to LMSSFWRT_APILEVEL_1 = 0.

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

S_OK if successful, S_FALSE otherwise.

HRESULT EnterEdit()

Description

Enters settings edit mode.

The EnterEdit 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

S_OK if successful, S_FALSE otherwise.

HRESULT LeaveEdit(VARIANT_BOOL discard)

Parameters

discard

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

Description

Leaves settings edit mode.

The LeaveEdit 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

S_OK if successful, E_UNEXPECTED if EnterEdit was not called prior to LeaveEdit.

HRESULT RealizeSettings()

Description

Validates all settings changes and clears any edit dirty flags.

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

S_OK if successful, S_FALSE otherwise.

HRESULT CommitSettings()

Description

Commits the SSF filter settings to the registry.

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

Returns

S_OK if successful, E_FAIL on failure.

HRESULT GetVideoFormatSupported(long index, eLMSSFWRT_VF *pVal)

Parameters

index

A long value that indicates which video format to retrieve.

*pVal

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

Description

Gets the supported video format for the index specified.

Returns

S_OK if successful

E_POINTER if the return eLMSSFWRT_VF pointer is NULL.

E_INVALIDARG if the index specified exceeds the current video formats count (see VideoFormatSupportedCount property above).

HRESULT IsVideoFormatSupported(eLMSSFWRT_VF format, VARIANT_BOOL *pVal)

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.

Description

Checks whether or not the specified video format is supported.

Returns

S_OK if successful; *pVal equals VARIANT_TRUE if the format is supported, else VARIANT_FALSE

E_POINTER if the return VARIANT_BOOL pointer is NULL.

HRESULT GetVideoModeSupported(long index, eLMSSFWRT_MODE *pVal)

Parameters

index

A long value that indicates which video mode to retrieve.

*pVal

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

Description

Gets the supported video mode for the index specified.

Returns

S_OK if successful

E_POINTER if the return eLMSSFWRT_MODE pointer is NULL.

E_INVALIDARG if the index specified exceeds the current video modes count (see VideoModeSupportedCount property above).

HRESULT IsVideoModeSupported(eLMSSFWRT_MODE mode, VARIANT_BOOL *pVal)

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.

Description

Checks whether or not the specified video mode is supported.

Returns

S_OK if successful; *pVal equals VARIANT_TRUE if the mode is supported, else VARIANT_FALSE

E_POINTER if the return VARIANT_BOOL pointer is NULL.

HRESULT GetVideoStream(long index, ILMSsfWrtVideoStream **pVal)

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.

Description

Gets an ILMSsfWrtVideoStream interface pointer for the video stream indicated by index value.  This interface is used to set the bitrate, width and height of the video stream.  See ILMSsfWrtVideoStream for more information.

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

Returns

S_OK if successful; pVal holds the interface pointer

E_INVALIDARG if the index is out of range.

E_POINTER if the ILMSsfWrtVideoStream pointer is NULL.

HRESULT AddVideoStream()

Description

Adds a new video stream.

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

S_OK if successful, S_FALSE otherwise.

E_INVALIDARG if the current VideoStreamCount is equal to 16 (the maximum number of allowed video streams).

HRESULT DeleteVideoStream(long index)

Parameters

index

A long value indicating which video stream to be deleted.

Description

Deletes an existing video stream indicated by index value.

Returns

S_OK if successful

E_INVALIDARG if the index is out of range OR there is only 1 video stream.

HRESULT GetAudioFormatSupported(long index, eLMSSFWRT_AF *pVal)

Parameters

index

A long value that indicates which audio format to retrieve.

*pVal

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

Description

Gets the supported audio format for the index specified.

Returns

S_OK if successful

E_POINTER if the return eLMSSFWRT_AF pointer is NULL.

E_INVALIDARG if the index specified exceeds the current audio formats count (see AudioFormatSupportedCount property above).

HRESULT IsAudioFormatSupported(eLMSSFWRT_AF format, VARIANT_BOOL *pVal)

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.

Description

Checks whether or not the specified audio format is supported.

Returns

S_OK if successful; *pVal equals VARIANT_TRUE if the format is supported, else VARIANT_FALSE

E_POINTER if the return VARIANT_BOOL pointer is NULL.

HRESULT GetAudioModeSupported(long index, eLMSSFWRT_MODE *pVal)

Parameters

index

A long value that indicates which audio mode to retrieve.

*pVal

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

Description

Gets the supported audio mode for the index specified.

Returns

S_OK if successful

E_POINTER if the return eLMSSFWRT_MODE pointer is NULL.

E_INVALIDARG if the index specified exceeds the current audio modes count (see AudioModeSupportedCount property above).

HRESULT IsAudioModeSupported(eLMSSFWRT_MODE mode, VARIANT_BOOL *pVal)

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.

Description

Checks whether or not the specified audio mode is supported.

Returns

S_OK if successful; *pVal equals VARIANT_TRUE if the mode is supported, else VARIANT_FALSE

E_POINTER if the return VARIANT_BOOL pointer is NULL.

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help