MFORMATSLib Namespace > IMFWriter Interface : WriterSet Method |
Sub WriterSet( _ ByVal _bsTargetPath As String, _ ByVal _bResetOption As Integer, _ ByVal _bsOptionsList As String _ )
void WriterSet( string _bsTargetPath, int _bResetOption, string _bsOptionsList )
procedure WriterSet( _bsTargetPath: String; _bResetOption: Integer; _bsOptionsList: String );
void WriterSet( BSTR* _bsTargetPath, int _bResetOption, BSTR* _bsOptionsList )
Here is example of how set writer's configuration and encode a received frame:
MFWriterClass m_objWriter = new MFWriterClass(); // Configure writer m_objWriter.WriterSet(targetPath, 1, "format='mp4' play_while_rec='true' video::codec='mpeg4' audio::codec='aac'"); // Get frame from source MFFrame pFrame = null; m_objLive.SourceFrameGet(-1, out pFrame, ""); // Encode the frame m_objWriter.ReceiverFramePut(pFrame, -1, ""); // Release frame from memory Marshal.ReleaseComObject(pFrame);