MFVideoGetBytes Method (IMFFrame)
size of video data
pointer to a video data
Gets frame's video data pointer
Syntax
Sub MFVideoGetBytes( _
   ByRef _pcbSize As Integer, _
   ByRef _ppbVideo As Long _
) 
void MFVideoGetBytes( 
   out int _pcbSize,
   out long _ppbVideo
)
procedure MFVideoGetBytes( 
   Out  _pcbSize: Integer;
   Out  _ppbVideo: Int64
); 
void MFVideoGetBytes( 
   [PARAMFLAG::Out] int _pcbSize,
   [PARAMFLAG::Out] long _ppbVideo
) 

Parameters

_pcbSize
size of video data
_ppbVideo
pointer to a video data
Example

Here is an example of how to get a frame and get video data's size and pointer:

                
m_objMFReader = new MFReaderClass();
m_objMFReader.ReaderOpen(sourceFileName, "");
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
if (m_objMFReader != null)
    m_objMFReader.SourceFrameConvertedGetByTime(ref m_avProps, -1, -1, out pFrame, "");
int videoSize;
long videoPointer;
pFrame.MFVideoGetBytes(out videoSize, out videoPointer);
See Also

Reference

IMFFrame Interface
IMFFrame Members