FormatVideoGetCount Method (MPlaylistClass)
type of the format
number of video formats
Gets the count of video formats.
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
type of the format
_pnCount
number of video formats
Example

Here is example of how to set standard format to the playlist:

Dim myPlaylist As New MPlaylistClass()
Dim vidProps As New M_VID_PROPS()
Dim strFormat As String
Dim nCount As Integer
myPlaylist.FormatVideoGetCount(nCount)
myPlaylist.FormatVideoGetByIndex(eMFormatType.eMFT_Convert, nCount - 1, vidProps, strFormat)
myPlaylist.FormatVideoSet(eMFormatType.eMFT_Convert, vidProps)
MPlaylistClass myPlaylist = new MPlaylistClass();
M_VID_PROPS vidProps = new M_VID_PROPS();
string strFormat;
int nCount;
myPlaylist.FormatVideoGetCount(out nCount);
myPlaylist.FormatVideoGetByIndex(eMFormatType.eMFT_Convert, nCount - 1, out vidProps, out strFormat);
myPlaylist.FormatVideoSet(eMFormatType.eMFT_Convert, ref vidProps);
var
myPlaylist: MPlaylist;
myFormat: IMFormat;
nCount: integer;
vidProps: M_VID_PROPS;
strFormat: string;
begin
myPlaylist:= CreateComObject(CLASS_MPlaylist) as MPlaylist;
myFormat := myPlaylist as IMFormat;
myFormat.FormatVideoGetCount(nCount);
myFormat.FormatVideoGetByIndex(eMFT_Convert, nCount-2, vidProps, strFormat);
myFormat.FormatVideoSet(eMFT_Convert, vidProps);
end;
See Also

Reference

MPlaylistClass Class
MPlaylistClass Members