private void Config() { WMUtils.WMCreateWriter(IntPtr.Zero, out m_pWriter); m_pWriter.SetProfileByID(g); m_pWriter.BeginWriting(); m_preproc = m_pWriter as IWMWriterPreprocess; }
public void SetPreprocessingPasses(uint inputNum) { IWMWriterPreprocess writerPreprocess = (IWMWriterPreprocess)_writer; writerPreprocess.GetMaxPreprocessingPasses(inputNum, 0, out _preprocessPasses[inputNum]); // // NOTE: if this value is 1, the codec supports two-pass encoding; the final pass is not counted // Logger.WriteLogMessage("Found [" + _preprocessPasses[inputNum] + "] preprocessing passes for writer input [" + inputNum + "]."); if (_preprocessPasses[inputNum] != 0) { writerPreprocess.SetNumPreprocessingPasses(inputNum, 0, _preprocessPasses[inputNum]); writerPreprocess.BeginPreprocessingPass(inputNum, 0); Logger.WriteLogMessage("Began preprocessing pass, writer input [" + inputNum + "]."); } }
public void FinishPreprocessPass() { IWMWriterPreprocess writerPreprocess = (IWMWriterPreprocess)_writer; for (uint i = 0; i < _writerInputCount; i++) { if (_preprocessPasses[i] > 0) { _preprocessPasses[i]--; Logger.WriteLogMessage("Decremented preprocessing passes [" + _preprocessPasses[i] + "], writer input [" + i + "]."); if (_preprocessPasses[i] == 0) { writerPreprocess.EndPreprocessingPass(i, 0); Logger.WriteLogMessage("Ended preprocessing pass, writer input [" + i + "]."); } } } }