WriterSet Method (IMFWriter)
target path for encoding
indicates whether previous configuration will be reset
configuration for encoding
Sets target path and configuration for encoding. Also turns on writer's object to be ready to receive frames.
Syntax

Parameters

_bsTargetPath
target path for encoding
_bResetOption
indicates whether previous configuration will be reset
_bsOptionsList
configuration for encoding
Example

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);
See Also

Reference

IMFWriter Interface
IMFWriter Members