This is the interface for the LEAD SSF Writer.
Specifies the type of the video/audio mode.
typedef enum
{
LMSSFWRT_MODE_CBR_1PASS
} eLMSSFWRT_MODE;
Constant bitrate 1 pass mode.
Specifies the quality factor used to create video.
typedef enum
{
LMSSFWRT_QUALITY_FASTEST,
LMSSFWRT_QUALITY_BALANCED,
LMSSFWRT_QUALITY_BEST
} eLMSSFWRT_QUALITY;
Fastest, at the expense of quality.
Quality and speed are balanced.
Best quality.
Specifies the video format for the underlying video stream.
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;
VC-1 Compression.
Microsoft H.264 compression using Main profile.
Microsoft H.264 compression using Baseline profile.
LEAD H.264 compression using Main profile.
LEAD H.264 compression using Baseline profile.
Specifies the audio format.
typedef enum
{
LMSSFWRT_AF_WMA,
LMSSFWRT_AF_WMA_PRO,
LMSSFWRT_AF_AAC,
LMSSFWRT_AF_LEAD_AAC
} eLMSSFWRT_AF;
Windows Media Audio.
Windows Media Audio Professional.
Microsoft AAC Audio compression.
LEAD AAC Audio compression.
Lists the valid values for the ApiLevel parameter that can be passed to the ResetToDefaults method.
typedef enum
{
LMSSFWRT_APILEVEL_1 = 0,
} eLMSSFWRT_APILEVEL;
Use the defaults from the current version of the resize filter.
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. |
Resets the SSF Writer to default values.
The eLMSSFWRT_APILEVEL value indicating the API level used to reset defaults. Current applications should set ApiLevel to LMSSFWRT_APILEVEL_1 = 0.
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:
Sets the Quality property to LMSSFWRT_QUALITY_BALANCED
Sets the VideoFormat property to LMSSFWRT_VF_VC1
Sets the VideoMode property to LMSSFWRT_MODE_CBR_1PASS
Sets the VideoBufferWindow property to 4.0
Sets the VideoKeyFrameInterval property to 2.0
Sets the VideoStreamCount property to 1
Sets the VideoStreamCount property to 1, with the video stream having the following property values:
BitRate property: 1644
Width property: 852
Height property: 480
Sets the AudioFormat property to LMSSFWRT_AF_WMA_PRO
Sets the AudioMode property to LMSSFWRT_MODE_CBR_1PASS
Sets the audio stream properties to the following property values:
BitRate property: 128
Channels property: 2
SampleRate property: 44100
Return | Description |
---|---|
S_OK | Successful. |
S_FALSE | Otherwise. |
Enters settings edit mode.
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.
Return | Description |
---|---|
S_OK | Successful. |
S_FALSE | Otherwise. |
Leaves settings edit mode.
A Boolean value that indicates whether to discard (TRUE) or not (FALSE) any changed settings values since the last call to EnterEdit.
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.
Return | Description |
---|---|
S_OK | Successful. |
E_UNEXPECTED | EnterEdit was not called prior to LeaveEdit. |
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:
Quality property: A valid eLMSSFWRT_QUALITY enumeration value
VideoFormat property: A valid eLMSSFWRT_VF enumeration value
VideoMode property: A valid eLMSSFWRT_MODE enumeration value
VideoBufferWindow property: A valid value from .01 to 100
VideoKeyFrameInterval property: A valid value from .01 to 100
Constrains each video stream's property values for:
BitRate property: A valid value from 4 to 135000
Width property: A valid value from 64 to 4096
Width property: A valid value from 64 to 4096
AudioFormat property: A valid eLMSSFWRT_AF enumeration value
AudioMode property: A valid eLMSSFWRT_MODE enumeration value
Constrains the audio stream property values for: BitRate, Channels, SampleRate and BitsPerSample to valid values depending on those allowed by the format.
Return | Description |
---|---|
S_OK | Successful. |
S_FALSE | Otherwise. |
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.
Return | Description |
---|---|
S_OK | Successful. |
E_FAIL | Failure. |
Gets the supported video format for the index specified.
A long value that indicates which video format to retrieve.
A pointer to an eLMSSFWRT_VF enumeration type to receive the video format.
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). |
Checks whether the specified video format is supported.
A eLMSSFWRT_VF enumeration type indicating which video format to check.
A pointer to a VARIANT_BOOL type to receive the supported state.
Return | Description |
---|---|
S_OK | Successful; *pVal equals VARIANT_TRUE if the format is supported, else VARIANT_FALSE. |
E_POINTER | pVal pointer is NULL. |
Gets the supported video mode for the index specified.
A long value that indicates which video mode to retrieve.
A pointer to an eLMSSFWRT_MODE enumeration type to receive the video mode.
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). |
Checks whether or not the specified video mode is supported.
A eLMSSFWRT_MODE enumeration type indicating which video mode to check.
A pointer to a VARIANT_BOOL type to receive the supported state.
Return | Description |
---|---|
S_OK | Successful; *pVal equals VARIANT_TRUE if the format is supported, else VARIANT_FALSE. |
E_POINTER | pVal pointer is NULL. |
Gets an ILMSsfWrtVideoStream interface pointer for the video stream indicated by index value.
A long value indicating for which video stream to retrieve the ILMSsfWrtVideoStream interface.
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.
Return | Description |
---|---|
S_OK | Successful; pVal holds the interface pointer. |
E_POINTER | pVal pointer is NULL. |
E_INVALIDARG | The index is out of range. |
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.
Return | Description |
---|---|
S_OK | Successful. |
S_FALSE | Otherwise. |
E_INVALIDARG | The current VideoStreamCount is equal to 16 (the maximum number of allowed video streams). |
Deletes an existing video stream indicated by index value.
A long value indicating which video stream to be deleted.
Return | Description |
---|---|
S_OK | Successful. |
E_INVALIDARG | The index is out of range OR there is only 1 video stream. |
Gets the supported audio format for the index specified.
A long value that indicates which audio format to retrieve.
A pointer to an eLMSSFWRT_AF enumeration type to receive the audio format.
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). |
Checks whether or not the specified audio format is supported.
A eLMSSFWRT_AF enumeration type indicating which audio format to check.
A pointer to a VARIANT_BOOL type to receive the supported state.
Return | Description |
---|---|
S_OK | Successful; *pVal equals VARIANT_TRUE if the format is supported, else VARIANT_FALSE. |
E_POINTER | pVal pointer is NULL. |
Gets the supported audio mode for the index specified.
A long value that indicates which audio mode to retrieve.
A pointer to an eLMSSFWRT_MODE enumeration type to receive the audio mode.
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). |
Checks whether or not the specified audio mode is supported.
A eLMSSFWRT_MODE enumeration type indicating which audio mode to check.
A pointer to a VARIANT_BOOL type to receive the supported state.
Return | Description |
---|---|
S_OK | Successful; *pVal equals VARIANT_TRUE if the mode is supported, else VARIANT_FALSE. |
E_POINTER | pVal pointer is NULL. |