REGFILTER2 structure (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The REGFILTER2 structure contains information for registering a filter.

Syntax

typedef struct REGFILTER2 {
  DWORD dwVersion;
  DWORD dwMerit;
  union {
    struct {
      ULONG               cPins;
      const REGFILTERPINS *rgPins;
    } DUMMYSTRUCTNAME;
    struct {
      ULONG                cPins2;
      const REGFILTERPINS2 *rgPins2;
    } DUMMYSTRUCTNAME2;
  } DUMMYUNIONNAME;
} REGFILTER2;

Members

dwVersion

Filter registration format. If the value is 1, the union contains the first unnamed structure. If the value is 2, the union contains the second unnamed structure.

dwMerit

Filter merit. Filters with higher merit are enumerated first. See Merit.

DUMMYUNIONNAME

DUMMYUNIONNAME.DUMMYSTRUCTNAME

DUMMYUNIONNAME.DUMMYSTRUCTNAME.cPins

DUMMYUNIONNAME.DUMMYSTRUCTNAME.rgPins

DUMMYUNIONNAME.DUMMYSTRUCTNAME2

DUMMYUNIONNAME.DUMMYSTRUCTNAME2.cPins2

DUMMYUNIONNAME.DUMMYSTRUCTNAME2.rgPins2

Remarks

This structure is passed to the IFilterMapper2::RegisterFilter method.

If you need to register pin mediums or pin categories, set dwVersion to 2 and use the REGFILTERPINS2 structure.

Requirements

Requirement Value
Header strmif.h (include Dshow.h)

See also

DirectShow Structures