diff options
| author | Wei Mao <[email protected]> | 2017-03-20 18:25:57 -0700 |
|---|---|---|
| committer | Wei Mao <[email protected]> | 2017-03-20 18:27:00 -0700 |
| commit | e044ea456aad4c444fbce00a2d9b56b304d59884 (patch) | |
| tree | 4326af385f0666a3af0b7dfae534db68e3e25785 /avstream/avscamera/sys/Common.h | |
| parent | bc6e698503f46afbd8fcf62f6d3939147dc49999 (diff) | |
| parent | e4581d8cd1bcc5108786b082a1ec24007a508847 (diff) | |
Merge pull request #118 from saredd/master
Diffstat (limited to 'avstream/avscamera/sys/Common.h')
| -rw-r--r-- | avstream/avscamera/sys/Common.h | 156 |
1 files changed, 71 insertions, 85 deletions
diff --git a/avstream/avscamera/sys/Common.h b/avstream/avscamera/sys/Common.h index 6870faea..d54ba2f3 100644 --- a/avstream/avscamera/sys/Common.h +++ b/avstream/avscamera/sys/Common.h @@ -1,21 +1,21 @@ /************************************************************************** -A/V Stream Camera Sample + A/V Stream Camera Sample -Copyright (c) 2015, Microsoft Corporation. + Copyright (c) 2015, Microsoft Corporation. -File: + File: -Common.h + Common.h -Abstract: + Abstract: -Common project header. + Common project header. -History: + History: -created 02/18/2015 + created 02/18/2015 **************************************************************************/ @@ -46,7 +46,7 @@ created 02/18/2015 /************************************************* -Add definitions that are missing for C++14. + Add definitions that are missing for C++14. *************************************************/ @@ -54,44 +54,44 @@ PVOID operator new ( size_t iSize, _When_((poolType & NonPagedPoolMustSucceed) != 0, - __drv_reportError("Must succeed pool allocations are forbidden. " - "Allocation failures cause a system crash")) + __drv_reportError("Must succeed pool allocations are forbidden. " + "Allocation failures cause a system crash")) POOL_TYPE poolType - ); +); PVOID operator new ( size_t iSize, _When_((poolType & NonPagedPoolMustSucceed) != 0, - __drv_reportError("Must succeed pool allocations are forbidden. " - "Allocation failures cause a system crash")) + __drv_reportError("Must succeed pool allocations are forbidden. " + "Allocation failures cause a system crash")) POOL_TYPE poolType, ULONG tag - ); +); /*++ Routine Description: -Array new() operator for creating objects with a specified allocation tag. + Array new() operator for creating objects with a specified allocation tag. Arguments: -iSize - -The size of the entire allocation. + iSize - + The size of the entire allocation. -poolType - -The type of allocation. Ex: PagedPool or NonPagedPoolNx + poolType - + The type of allocation. Ex: PagedPool or NonPagedPoolNx -tag - -A 4-byte allocation identifier. + tag - + A 4-byte allocation identifier. Return Value: -None + None --*/ -PVOID +PVOID operator new[]( size_t iSize, _When_((poolType & NonPagedPoolMustSucceed) != 0, @@ -99,86 +99,86 @@ operator new[]( "Allocation failures cause a system crash")) POOL_TYPE poolType, ULONG tag - ); +); /*++ Routine Description: -Array delete() operator. + Array delete() operator. Arguments: -pVoid - -The memory to free. + pVoid - + The memory to free. Return Value: -None + None --*/ -void -__cdecl +void +__cdecl operator delete[]( PVOID pVoid - ); +); /*++ Routine Description: -Sized delete() operator. + Sized delete() operator. Arguments: -pVoid - -The memory to free. + pVoid - + The memory to free. -size - -The size of the memory to free. + size - + The size of the memory to free. Return Value: -None + None --*/ void __cdecl operator delete ( void *pVoid, size_t /*size*/ - ); +); /*++ Routine Description: -Sized delete[]() operator. + Sized delete[]() operator. Arguments: -pVoid - -The memory to free. + pVoid - + The memory to free. -size - -The size of the memory to free. + size - + The size of the memory to free. Return Value: -None + None --*/ void __cdecl operator delete[] ( void *pVoid, size_t /*size*/ - ); +); #endif // _NEW_DELETE_OPERATORS_ /************************************************* -Misc Definitions + Misc Definitions *************************************************/ #pragma warning (disable : 4100 4127 4131 4189 4701 4706) @@ -342,7 +342,7 @@ DEFINE_GUIDSTRUCT("32595559-0000-0010-8000-00AA00389B71", KSDATAFORMAT_SUBTYPE_Y /************************************************* -Externed information + Externed information *************************************************/ // @@ -366,7 +366,7 @@ AvsCameraFilterDescriptorFFC; extern const GUID -AvsCameraFilterCategories[CAPTURE_FILTER_CATEGORIES_COUNT]; +AvsCameraFilterCategories [CAPTURE_FILTER_CATEGORIES_COUNT]; // // capture.cpp externs: @@ -393,7 +393,7 @@ ImageCapturePinDispatch; /************************************************* -Enums / Typedefs + Enums / Typedefs *************************************************/ @@ -414,23 +414,9 @@ typedef enum _PIN_MODE } PIN_MODE, *PPIN_MODE; -//Panel surface bits 115:118 -enum AcpiPldRotation -{ - AcpiPldRotation0 = 0, - AcpiPldRotation45 = 1, - AcpiPldRotation90 = 2, - AcpiPldRotation135 = 3, - AcpiPldRotation180 = 4, - AcpiPldRotation225 = 5, - AcpiPldRotation270 = 6, - AcpiPldRotation315 = 7, -}; - - /************************************************* -Class Definitions + Class Definitions *************************************************/ @@ -449,19 +435,19 @@ struct ISP_FRAME_SETTINGS ULONGLONG FlashMode; ULONG FlashValue; // Adjustable power setting (0-100) BOOLEAN bPhotoConfirmation; -}; +} ; struct SOC_CAP_WITH_STEPPING { KSCAMERA_PERFRAMESETTING_CAP_ITEM_HEADER Hdr; KSPROPERTY_STEPPING_LONG Stepping; -}; +} ; struct SOC_CAP_WITH_STEPPING_LONGLONG { KSCAMERA_PERFRAMESETTING_CAP_ITEM_HEADER Hdr; KSPROPERTY_STEPPING_LONGLONG Stepping; -}; +} ; // // ICapturePin: @@ -476,10 +462,10 @@ class ICapturePin public: virtual - NTSTATUS - CompleteMapping( - _In_ PKSSTREAM_POINTER Clone = nullptr - ) = 0; + NTSTATUS + CompleteMapping( + _In_opt_ PKSSTREAM_POINTER Clone=nullptr + ) = 0; }; @@ -527,9 +513,9 @@ template <class T, class U> class CMetaRational : public U { public: - CMetaRational(T Num = 1, T Denom = 1) + CMetaRational( T Num=1, T Denom=1 ) { - Set = TRUE; + Set=TRUE; Numerator = Num; Denominator = Denom; } @@ -542,7 +528,7 @@ template <class T, class U> class CMetaPrimative : public U { public: - CMetaPrimative(T n) + CMetaPrimative( T n ) { Set = TRUE; Value = n; @@ -551,7 +537,7 @@ public: typedef CMetaPrimative<UINT16, METADATA_UINT16> CMetadataShort; typedef CMetaPrimative<UINT32, METADATA_UINT32> CMetadataLong; -typedef CMetaPrimative<INT64, METADATA_INT64> CMetadataLongLong; +typedef CMetaPrimative<INT64, METADATA_INT64> CMetadataLongLong; typedef CMetaPrimative<UINT64, METADATA_UINT64> CMetadataULongLong; class CMetadataShortString : public METADATA_SHORTSTRING @@ -561,8 +547,8 @@ public: _In_z_ const CHAR *str ) { - Length = (UINT32)min(strlen(str), sizeof(String)); - strncpy_s(String, str, Length); + Length = (UINT32) min(strlen(str), sizeof(String)); + strncpy_s( String, str, Length ); } }; @@ -608,7 +594,7 @@ public: _In_ ULONG FrameIndex, _In_ LONGLONG Time ) - : m_Index(FrameIndex) + : m_Index( FrameIndex ) , m_Time(Time) , m_bRequired(TRUE) {} @@ -616,23 +602,23 @@ public: PHOTOCONFIRMATION_INFO() : m_Index(0) , m_Time(0) - , m_bRequired(FALSE) + , m_bRequired( FALSE ) {} BOOL - isRequired() + isRequired() { return m_bRequired; } ULONG - getIndex() + getIndex() { return m_Index; } LONGLONG - getTime() + getTime() { return m_Time; } @@ -645,13 +631,13 @@ private: /************************************************* -Global Functions + Global Functions *************************************************/ /************************************************* -Internal Includes + Internal Includes *************************************************/ |
