Operates a frame's creation
Methods
MFFrameClone
Gets a clone of the frame. See eMFrameClone for more information about clone types. If _fccPixelFormat is not eMFCC_Default and not the original, then the video will be copied even for reference frames. Note: If the frame is out-of-process, the clone ALSO out-of-process. You should call MFFrameMakeLocal() for such frames.
Syntax
void MFFrameClone( object _pMFFrame, out MFFrame _ppFrameClone, eMFrameClone _eCloneType, eMFCC _fccPixelFormat )
Parameters
_pMFFrame - source frame object
_ppFrameClone - result frame
_eCloneType - clone's type
_fccPixelFormat - pixel's format
MFFrameCreateFromFile
Creates a frame from a file
Syntax
void MFFrameCreateFromFile( string _bsFileName, out MFFrame _ppFrame, string _bsPropsList )
Parameters
_bsFileName - path to a source file (JPEG, PNG, BMP or TIFF image)
_ppFrame - result frame
_bsPropsList - additional properties
MFFrameCreateFromHBITMAP
Creates a frame from an HBitmap object
Syntax
void MFFrameCreateFromHBITMAP( long _hBitmap, out MFFrame _ppFrame, string _bsPropsList )
Parameters
_hBitmap - bitmap handle object
_ppFrame - result frame
_bsPropsList - additional properties
MFFrameCreateFromMem
Creates a frame from memory
Syntax
void MFFrameCreateFromMem( ref M_AV_PROPS _pAVProps, long _lpVideo, int _lAudioSamples, long _lpAudio, out MFFrame _ppFrame, string _bsPropsList )
Parameters
_pAVProps - media properties for a frame
_lpVideo - pointer to video data
_lAudioSamples - number of audio samples
_lpAudio - pointer to audio data
_ppFrame - result frame
_bsPropsList - additional properties
MFFrameCreateFromMemEx
Extended method to create a frame (MFFrame object) from memory
Syntax
void MFFrameCreateFromMemEx( ref M_AV_PROPS _pAVProps, ref MF_VID_PTR _pVideoPtr, int _lAudioSamples, long _lpAudio, out MFFrame _ppFrame, string _bsPropsList )
Parameters
_pAVProps - media properties
_pVideoPtr - a structure of video pointer
_lAudioSamples - the amount of audio samples
_lpAudio - a pointer to audio data
_ppFrame - result MFFrame object
_bsPropsList - additional properties
MFFrameCreateFromTexture
Creates an MFFrame object from D3D texture
Syntax
void MFFrameCreateFromTexture( ref M_AV_PROPS _pAVProps, object _pD3DTexture2D, int _lAudioSamples, long _lpAudio, out MFFrame _ppFrame, string _bsPropsList )
Parameters
_pAVProps - media properties
_pD3DTexture2D - D3D texture object
_lAudioSamples - the amount of audio samples
_lpAudio - a pointer to audio data
_ppFrame - result MFFrame object
_bsPropsList - additional properties
MFFrameCreatePlain
Creates a plain (empty) frame
Syntax
void MFFrameCreatePlain( int _cbVideoSize, out MFFrame _ppFrame )
Parameters
_cbVideoSize - video data size (for empty frame set it to 0)
_ppFrame - result frame object
MFFrameCreateWrapper
Creates frame from the object (e.g. WICBitmapLock, D3D9Surface, MediaSample, NSSBuffer - etc) - just keep a reference to the external object and use memory pointer.
Syntax
void MFFrameCreateWrapper( ref M_VID_PROPS _pVidProps, uint _cbVideo, long _lpVideo, object _pObject, out MFFrame _ppFrame )
Parameters
_pVidProps - video properties
_cbVideo - video data size
_lpVideo - video data pointer in memory
_pObject - wrapper object
_ppFrame - output frame
MFFrameMakeLocal
Makes a local copy of the external frame. For interprocess communication. Before using a frame from another process make sure that you call this method.
Syntax
void MFFrameMakeLocal( object _pMFFrame, out MFFrame _ppFrameLocal, int _bAlwaysClone )
Parameters
_pMFFrame - source frame object
_ppFrameLocal - result frame
_bAlwaysClone - indicates whether will be a frame's clone created