Search code examples
c++comdirectshowguidclsid

GUID and CLSID in different formats?


I'm working on a MP4 filter in DirectShow. I am current trying to create a IBaseFilter object but one of the requirements is CLSID for CoCreateInstance.

I am confused about where this ID comes from. Can I get it from the GraphEdit > Insert Filter? If so, it gives me in the format of {00000000-0000-0000-0000-000000000000} However most examples I've seen are in the format of

static const GUID CLSID_MPEG4Demux = { 0x025BE2E4, 0x1787, 0x4DA4, 0xA5, 0x85, 0xC5, 0xB2, 0xB9, 0xEE, 0xB5, 0x7C };

Do I need a converter for it?


Solution

  • CLSID is fundamental COM identifier for registered class. DirectShow filters which are registered to be available to public all have their CLSIDs, hardcoded by their developers. If your work on MP4 filter supposes that you are a developer of MP4 filter, then you need to put your own CLSID in (generate by "Create GUID" (guidgen.exe) tool, by API etc). If you want to look up CLSID of existing registered filter, you can find it out using GraphEdit, or rather GraphStudioNext browsing registered filter list:

    enter image description here