IWMWriterAdvanced2::SetInputSetting method

The SetInputSetting method specifies a named setting for a particular input.

Syntax

HRESULT SetInputSetting(
  DWORD             dwInputNum,
  LPCWSTR           pszName,
  WMT_ATTR_DATATYPE Type,
  const BYTE        *pValue,
  WORD              cbLength
);

Parameters

dwInputNum

DWORD containing the input number.

pszName

Pointer to a wide-character null-terminated string containing the setting name. For a list of valid settings, see Input Settings.

Type

Pointer to a value from the WMT_ATTR_DATATYPE enumeration type.

pValue

Pointer to a byte array containing the setting.

cbLength

Size of pValue, in bytes.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
NS_E_NOT_CONFIGURED
The input profile has not yet been set.
E_INVALIDARG
dwInputNum is larger than the number of existing inputs

OR

pValue or pszName is NULL.

NS_E_INVALID_REQUEST
This setting cannot be changed while the writer is running.
E_UNEXPECTED
Unspecified error.

Remarks

The encoding settings set with this method are not persisted in the output file. If you want your custom player to have access to this information, you must save the values as custom metadata attributes in the file header.

Only g_wszDeinterlaceMode, g_wszInitialPatternForInverseTelecine, g_wszInterlacedCoding, and g_wszJPEGCompressionQuality can be set after IWMWriter::BeginWriting has been called.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only],Windows Media Format 7 SDK, or later versions of the SDK
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wmsdkidl.h (include Wmsdk.h)
Library Wmvcore.lib; WMStubDRM.lib (if you use DRM)

See also

IWMWriterAdvanced2 Interface

IWMWriterAdvanced2::GetInputSetting

Input Formats, Input Settings, and Data Unit Extensions

To Set Input Settings