SourceAVPropsGet Method (IMFSource)
media properties
Gets media properties (audio and video) of a source object
Syntax
Sub SourceAVPropsGet( _
   ByRef _pAVProps As M_AV_PROPS _
) 
void SourceAVPropsGet( 
   out M_AV_PROPS _pAVProps
)
procedure SourceAVPropsGet( 
   Out  _pAVProps: M_AV_PROPS
); 
void SourceAVPropsGet( 
   [PARAMFLAG::Out] M_AV_PROPS _pAVProps
) 

Parameters

_pAVProps
media properties
Example

Here is example of how to get media properties of a source:

m_objPreview = new MFPreviewClass();
//Configure preview
m_objPreview.PreviewWindowSet("", panelPreview.Handle.ToInt32());
m_objPreview.PreviewEnable("", 1, 1);
m_objMFReader = new MFReaderClass();
m_objMFReader.ReaderOpen(sourceFileName, "");
m_avProps = new M_AV_PROPS(); // get media properties of a source file
m_objMFReader.SourceAVPropsGet(out m_avProps);
m_avProps.vidProps.eVideoFormat = eMVideoFormat.eMVF_HD1080_5994i;
MFFrame pFrame = null;
// Get next frame
if (m_objMFReader != null)
    m_objMFReader.SourceFrameConvertedGetByTime(ref m_avProps, -1, -1, out pFrame, "");
m_objPreview.ReceiverFramePut(pFrame, -1, ""); // show the frame on preview
See Also

Reference

IMFSource Interface
IMFSource Members