1
//------------------------------------------------------------------------------
4
// Desc: DirectShow base classes.
6
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
7
//------------------------------------------------------------------------------
12
// provides a mapping between old-style multimedia format DWORDs
13
// and new-style GUIDs.
15
// A range of 4 billion GUIDs has been allocated to ensure that this
16
// mapping can be done straightforwardly one-to-one in both directions.
25
// Multimedia format types are marked with DWORDs built from four 8-bit
26
// chars and known as FOURCCs. New multimedia AM_MEDIA_TYPE definitions include
27
// a subtype GUID. In order to simplify the mapping, GUIDs in the range:
28
// XXXXXXXX-0000-0010-8000-00AA00389B71
29
// are reserved for FOURCCs.
31
class FOURCCMap : public GUID
36
FOURCCMap(DWORD Fourcc);
37
FOURCCMap(const GUID *);
40
DWORD GetFOURCC(void);
41
void SetFOURCC(DWORD fourcc);
42
void SetFOURCC(const GUID *);
49
#define GUID_Data3 0x10
50
#define GUID_Data4_1 0xaa000080
51
#define GUID_Data4_2 0x719b3800
54
FOURCCMap::InitGUID() {
57
((DWORD *)Data4)[0] = GUID_Data4_1;
58
((DWORD *)Data4)[1] = GUID_Data4_2;
62
FOURCCMap::FOURCCMap() {
68
FOURCCMap::FOURCCMap(DWORD fourcc)
75
FOURCCMap::FOURCCMap(const GUID * pGuid)
82
FOURCCMap::SetFOURCC(const GUID * pGuid)
84
FOURCCMap * p = (FOURCCMap*) pGuid;
85
SetFOURCC(p->GetFOURCC());
89
FOURCCMap::SetFOURCC(DWORD fourcc)
95
FOURCCMap::GetFOURCC(void)
100
#endif /* __FOURCC__ */