MPLATFORMLib Namespace > MFactoryClass Class : MFFrameCreateFromMem Method |
Public Overridable Sub MFFrameCreateFromMem( _ ByRef _pAVProps As M_AV_PROPS, _ ByVal _lpVideo As Long, _ ByVal _lAudioSamples As Integer, _ ByVal _lpAudio As Long, _ ByRef _ppFrame As IMFFrame, _ ByVal _bsPropsList As String _ )
public virtual void MFFrameCreateFromMem( ref M_AV_PROPS _pAVProps, long _lpVideo, int _lAudioSamples, long _lpAudio, out IMFFrame _ppFrame, string _bsPropsList )
public procedure MFFrameCreateFromMem( var _pAVProps: M_AV_PROPS; _lpVideo: Int64; _lAudioSamples: Integer; _lpAudio: Int64; Out _ppFrame: IMFFrame; _bsPropsList: String ); virtual;
public: virtual void MFFrameCreateFromMem( ref M_AV_PROPS _pAVProps, long _lpVideo, int _lAudioSamples, long _lpAudio, [PARAMFLAG::Out] IMFFrame* _ppFrame, BSTR* _bsPropsList )
Here is an example of how to send a frame to a preview:
m_objPreview = new MFPreviewClass(); //Configure preview m_objPreview.PreviewWindowSet("", panelPreview.Handle.ToInt32()); m_objPreview.PreviewEnable("", 1, 1); M_AV_PROPS m_avProps = new M_AV_PROPS(); // set video format for conversion m_avProps.vidProps.eVideoFormat = eMVideoFormat.eMVF_HD1080_5994i; MFFrame pFrame = null; // Get next frame or frame by position MFFactoryClass factory = new MFFactoryClass(); MFFrame frame; factory.MFFrameCreateFromMem(ref m_avProps, pointerToVideo, _lAudioSamples, pointerToAudio, out frame); m_objPreview.ReceiverFramePut(frame, -1, ""); // show the frame on preview