~ubuntu-branches/ubuntu/trusty/sflphone/trusty

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/third_party/BaseClasses/fourcc.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (4.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20140128182336-jrsv0k9u6cawc068
Tags: 1.3.0-1
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//------------------------------------------------------------------------------
2
 
// File: FourCC.h
3
 
//
4
 
// Desc: DirectShow base classes.
5
 
//
6
 
// Copyright (c) 1992-2001 Microsoft Corporation.  All rights reserved.
7
 
//------------------------------------------------------------------------------
8
 
 
9
 
 
10
 
// FOURCCMap
11
 
//
12
 
// provides a mapping between old-style multimedia format DWORDs
13
 
// and new-style GUIDs.
14
 
//
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.
17
 
//
18
 
// January 95
19
 
 
20
 
 
21
 
#ifndef __FOURCC__
22
 
#define __FOURCC__
23
 
 
24
 
 
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.
30
 
 
31
 
class FOURCCMap : public GUID
32
 
{
33
 
 
34
 
public:
35
 
    FOURCCMap();
36
 
    FOURCCMap(DWORD Fourcc);
37
 
    FOURCCMap(const GUID *);
38
 
 
39
 
 
40
 
    DWORD GetFOURCC(void);
41
 
    void SetFOURCC(DWORD fourcc);
42
 
    void SetFOURCC(const GUID *);
43
 
 
44
 
private:
45
 
    void InitGUID();
46
 
};
47
 
 
48
 
#define GUID_Data2      0
49
 
#define GUID_Data3     0x10
50
 
#define GUID_Data4_1   0xaa000080
51
 
#define GUID_Data4_2   0x719b3800
52
 
 
53
 
inline void
54
 
FOURCCMap::InitGUID() {
55
 
    Data2 = GUID_Data2;
56
 
    Data3 = GUID_Data3;
57
 
    ((DWORD *)Data4)[0] = GUID_Data4_1;
58
 
    ((DWORD *)Data4)[1] = GUID_Data4_2;
59
 
}
60
 
 
61
 
inline
62
 
FOURCCMap::FOURCCMap() {
63
 
    InitGUID();
64
 
    SetFOURCC( DWORD(0));
65
 
}
66
 
 
67
 
inline
68
 
FOURCCMap::FOURCCMap(DWORD fourcc)
69
 
{
70
 
    InitGUID();
71
 
    SetFOURCC(fourcc);
72
 
}
73
 
 
74
 
inline
75
 
FOURCCMap::FOURCCMap(const GUID * pGuid)
76
 
{
77
 
    InitGUID();
78
 
    SetFOURCC(pGuid);
79
 
}
80
 
 
81
 
inline void
82
 
FOURCCMap::SetFOURCC(const GUID * pGuid)
83
 
{
84
 
    FOURCCMap * p = (FOURCCMap*) pGuid;
85
 
    SetFOURCC(p->GetFOURCC());
86
 
}
87
 
 
88
 
inline void
89
 
FOURCCMap::SetFOURCC(DWORD fourcc)
90
 
{
91
 
    Data1 = fourcc;
92
 
}
93
 
 
94
 
inline DWORD
95
 
FOURCCMap::GetFOURCC(void)
96
 
{
97
 
    return Data1;
98
 
}
99
 
 
100
 
#endif /* __FOURCC__ */