This is the interface for the LEAD SSF Writer.
typedef enum
{
LMSSFWRT_MODE_CBR_1PASS
} eLMSSFWRT_MODE;
Constant |
Description |
LMSSFWRT_MODE_CBR_1PASS |
Constant bitrate 1 pass mode. |
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. |
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. |
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. |
typedef enum
{
LMSSFWRT_APILEVEL_1 = 0,
} eLMSSFWRT_APILEVEL;
Constant |
Description |
LMSSFWRT_APILEVEL_1 |
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. |
ApiLevel |
The eLMSSFWRT_APILEVEL value indicating the API level used to reset defaults. |
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:
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
S_OK if successful, S_FALSE otherwise.
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.
S_OK if successful, S_FALSE otherwise.
discard |
A Boolean value that indicates whether to discard (TRUE) or not (FALSE) any changed settings values since the last call to EnterEdit. |
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.
S_OK if successful, E_UNEXPECTED if 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.
S_OK if 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.
S_OK if successful, E_FAIL on failure.
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. |
Gets the supported video format for the index specified.
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).
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. |
Checks whether or not the specified video format is supported.
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.
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. |
Gets the supported video mode for the index specified.
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).
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. |
Checks whether or not the specified video mode is supported.
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.
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. |
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.
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.
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.
S_OK if successful, S_FALSE otherwise.
E_INVALIDARG if the current VideoStreamCount is equal to 16 (the maximum number of allowed video streams).
index |
A long value indicating which video stream to be deleted. |
Deletes an existing video stream indicated by index value.
S_OK if successful
E_INVALIDARG if the index is out of range OR there is only 1 video stream.
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. |
Gets the supported audio format for the index specified.
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).
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. |
Checks whether or not the specified audio format is supported.
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.
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. |
Gets the supported audio mode for the index specified.
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).
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. |
Checks whether or not the specified audio mode is supported.
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.