MFORMATSLib Namespace > IMFWriter Interface : ReceiverFramePut Method |
Sub ReceiverFramePut( _ ByVal _pFrame As MFFrame, _ ByVal _rtMaxWait As Long, _ ByVal _bsHints As String _ )
void ReceiverFramePut( MFFrame _pFrame, long _rtMaxWait, string _bsHints )
procedure ReceiverFramePut( _pFrame: MFFrame; _rtMaxWait: Int64; _bsHints: String );
void ReceiverFramePut( MFFrame* _pFrame, long _rtMaxWait, BSTR* _bsHints )
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);