Microsoft Windows CE 3.0  

FOURCCMap Class

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This class provides conversion between GUID media subtypes and old-style FOURCC32-bit media tags. In the original Microsoft Windows multimedia APIs, media types were tagged with 32-bit values created from four 8-bit characters and were known as FOURCCs. Microsoft DirectShow media types have GUIDs for the subtype, partly because these are simpler to create (creation of a new FOURCCrequires its registration with Microsoft). Because FOURCCs are unique, a one-to-one mapping has been made possible by allocating a range of 4,000 million GUIDs representing FOURCCs. This range is all GUIDs of the form:

XXXXXXXX-0000-0010-8000-00AA00389B71

This class simplifies conversion between GUIDs and FOURCCs. This is for compatibility only. It is recommended that all new media subtypes be represented by GUIDs created by Guidgen.exe or a similar tool, and not by mapping FOURCCs.

The object is derived from a GUID, with no extra data members, and can be cast to a GUID. The object can be passed a FOURCCat construction time. The default constructor will initialize the FOURCCto zero.

The GetFOURCCand SetFOURCCmethods do not check that the fixed portions of the GUID correspond to the FOURCCrange. Thus, if you cast a pointer to a GUIDinto a pointer to a FOURCCand then set or get the FOURCCfield, you also need to check separately that the GUIDis within the FOURCCrange.

Member Functions

FOURCCMap Constructs a FOURCCMap object.
GetFOURCC Returns the FOURCCfrom a FOURCCMap object.
SetFOURCC Sets the FOURCCportion of the FOURCCMap object.