diff options
| author | Wei Mao <[email protected]> | 2017-03-17 20:14:57 -0700 |
|---|---|---|
| committer | Wei Mao <[email protected]> | 2017-03-17 20:14:57 -0700 |
| commit | 406cf3e4c6cd251bf69cdd8d7b6433f3477d3980 (patch) | |
| tree | 15ca9253d190ab5e16cde06526dc17b486f32a22 /avstream/avscamera/sys/ExtendedFieldOfView.h | |
| parent | 1a3e0d580380e58bf336a242d2affc8a1e2d1ddf (diff) | |
Use lower case
Diffstat (limited to 'avstream/avscamera/sys/ExtendedFieldOfView.h')
| -rw-r--r-- | avstream/avscamera/sys/ExtendedFieldOfView.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/avstream/avscamera/sys/ExtendedFieldOfView.h b/avstream/avscamera/sys/ExtendedFieldOfView.h new file mode 100644 index 00000000..388356a6 --- /dev/null +++ b/avstream/avscamera/sys/ExtendedFieldOfView.h @@ -0,0 +1,67 @@ +/************************************************************************** + + A/V Stream Camera Sample + + Copyright (c) 2014, Microsoft Corporation. + + File: + + ExtendedFieldOfView.h + + Abstract: + + This file contains the helper class CExtendedFieldOfView. + The class is provides initialization and accessor functions for + KSCAMERA_EXTENDEDPROP_FIELDOFVIEW. + + History: + + created 11/26/2014 + +**************************************************************************/ + +// +// Helper class for Extended Field of View. +// +class CExtendedFieldOfView + : public CExtendedHeader +{ +public: + KSCAMERA_EXTENDEDPROP_FIELDOFVIEW m_Params; + +public: + // Standardized ctors to help ensure a consistant definition. + CExtendedFieldOfView( ULONGLONG flags=0, ULONG result=STATUS_SUCCESS ) + : CExtendedHeader( flags, result ) + { + Size = sizeof(*this); + RtlZeroMemory( &m_Params, sizeof(m_Params) ); + } + + CExtendedFieldOfView( KSCAMERA_EXTENDEDPROP_HEADER &hdr ) + : CExtendedHeader(hdr) + { + Size = sizeof(*this); + RtlZeroMemory( &m_Params, sizeof(m_Params) ); + } + + // Access functions let you more easily fetch the embedded field. + ULONG & + NormalizedFocalLengthX() + { + return m_Params.NormalizedFocalLengthX; + } + + ULONG & + NormalizedFocalLengthY() + { + return m_Params.NormalizedFocalLengthY; + } + + bool isValid() + { + return CExtendedHeader::isValid() && + (Size >= sizeof(*this)) ; + } +}; + |
