WriterOptionSetByIndex Method (MFWriterClass)
option's type (format, video or audio codec)
option's index
properties of the option (attributes for configuration)
Sets writer's option by its index
Syntax
Public Overridable Sub WriterOptionSetByIndex( _
   ByVal _eType As eMFWriterOption, _
   ByVal _nIndex As Integer, _
   ByRef _ppProps As IMFProps _
) 
public virtual void WriterOptionSetByIndex( 
   eMFWriterOption _eType,
   int _nIndex,
   out IMFProps _ppProps
)
public procedure WriterOptionSetByIndex( 
    _eType: eMFWriterOption;
    _nIndex: Integer;
   Out  _ppProps: IMFProps
); virtual; 
public: virtual void WriterOptionSetByIndex( 
   eMFWriterOption _eType,
   int _nIndex,
   [PARAMFLAG::Out] IMFProps* _ppProps
) 

Parameters

_eType
option's type (format, video or audio codec)
_nIndex
option's index
_ppProps
properties of the option (attributes for configuration)
Example

Here is example of how set audio codec by selected index:

IMFProps props;
m_objWriter.WriterOptionSetByIndex(eMFWriterOption.eMFWO_AudioCodec, audiocodec.SelectedIndex, out props);
Marshal.ReleaseComObject(props); // release props if you don't need to use it
See Also

Reference

MFWriterClass Class
MFWriterClass Members