blob: 31f7916be986b336bf31d08c1941bfd94ea6f63a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
/**************************************************************************
A/V Stream Camera Sample
Copyright (c) 2014, Microsoft Corporation.
File:
ExtendedEvComp.h
Abstract:
This file contains the helper class CExtendedEvCompensation.
The class is provides initialization and accessor functions for
KSCAMERA_EXTENDEDPROP_EVCOMPENSATION.
History:
created 6/3/2014
**************************************************************************/
//
// Helper class for Extended Properties.
//
class CExtendedEvCompensation
: public CExtendedHeader
{
public:
KSCAMERA_EXTENDEDPROP_EVCOMPENSATION m_EvComp;
public:
// Standardized ctors to help ensure a consistant definition.
CExtendedEvCompensation( ULONGLONG flags=0, ULONG result=STATUS_SUCCESS )
:CExtendedHeader( flags, result )
{
Size = sizeof(*this);
RtlZeroMemory( &m_EvComp, sizeof(m_EvComp) );
}
CExtendedEvCompensation( KSCAMERA_EXTENDEDPROP_HEADER &hdr )
: CExtendedHeader(hdr)
{
Size = sizeof(*this);
RtlZeroMemory( &m_EvComp, sizeof(m_EvComp) );
}
bool isValid()
{
return CExtendedHeader::isValid() &&
(Size >= sizeof(*this)) ;
}
// Access operators let you fetch the value from the value field.
operator LONG()
{
return m_EvComp.Value;
}
// Assignment operators let you assign a value to the property.
CExtendedEvCompensation &
operator =( LONG x )
{
Value() = x;
return *this;
}
CExtendedEvCompensation &
operator =( const KSCAMERA_EXTENDEDPROP_EVCOMPENSATION &x )
{
m_EvComp = x;
return *this;
}
LONG &
Min()
{
return m_EvComp.Min;
}
LONG &
Max()
{
return m_EvComp.Max;
}
ULONG &
Mode()
{
return m_EvComp.Mode;
}
LONG &
Value()
{
return m_EvComp.Value;
}
LONG &
GetLONG()
{
return m_EvComp.Value;
}
};
|