MFORMATSLib Namespace > IMFWriter Interface : WriterOptionSetByIndex Method |
Sub WriterOptionSetByIndex( _ ByVal _eType As eMFWriterOption, _ ByVal _nIndex As Integer, _ ByRef _ppProps As IMFProps _ )
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