FormatVideoGetCount Method (MFLiveClass)
format type
number of available formats
Gets a number of available video formats of selected type.
Syntax
Public Overridable Sub FormatVideoGetCount( _
   ByVal _eFormatType As eMFormatType, _
   ByRef _pnCount As Integer _
) 
public virtual void FormatVideoGetCount( 
   eMFormatType _eFormatType,
   out int _pnCount
)
public procedure FormatVideoGetCount( 
    _eFormatType: eMFormatType;
   Out  _pnCount: Integer
); virtual; 
public: virtual void FormatVideoGetCount( 
   eMFormatType _eFormatType,
   [PARAMFLAG::Out] int _pnCount
) 

Parameters

_eFormatType
format type
_pnCount
number of available formats
Example

Here is an example of how to fill a combobox with all available input video formats for a live source and select a current format:

M_VID_PROPS vidProps;
int fCount;
m_objLive.FormatVideoGetCount(eMFormatType.eMFT_Input, out fCount);
if (fCount > 0)
{
    for (int i = 0; i < fCount; i++)
    {
        string name;
        m_objLive.FormatVideoGetByIndex(eMFormatType.eMFT_Input, i, out vidProps, out name);
        comboBoxVF.Items.Add(name);
    }
    // Get current format
    int nCurrent = 0;
    try
    {
        string strName;
        M_VID_PROPS _vidProps;
        m_objLive.FormatVideoGet(eMFormatType.eMFT_Input, out _vidProps, out nCurrent, out strName);
    }
    catch (System.Exception) { }
    // Select a current format
    comboBoxVF.SelectedIndex = nCurrent;
}
See Also

Reference

MFLiveClass Class
MFLiveClass Members