Skip to content

Commit

Permalink
Apply linting
Browse files Browse the repository at this point in the history
  • Loading branch information
sirknightj committed Nov 1, 2024
1 parent 6eb5b31 commit f3c13a1
Show file tree
Hide file tree
Showing 84 changed files with 2,334 additions and 2,971 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -966,9 +966,9 @@ typedef enum {
/**
* Macros checking for the stream event types
*/
#define CHECK_STREAM_EVENT_TYPE_IMAGE_GENERATION(f) (((f) & STREAM_EVENT_TYPE_IMAGE_GENERATION) != STREAM_EVENT_TYPE_NONE)
#define CHECK_STREAM_EVENT_TYPE_NOTIFICATION(f) (((f) & STREAM_EVENT_TYPE_NOTIFICATION) != STREAM_EVENT_TYPE_NONE)
#define CHECK_STREAM_EVENT_TYPE_LAST(f) (((f) & STREAM_EVENT_TYPE_LAST) != STREAM_EVENT_TYPE_NONE)
#define CHECK_STREAM_EVENT_TYPE_IMAGE_GENERATION(f) (((f) &STREAM_EVENT_TYPE_IMAGE_GENERATION) != STREAM_EVENT_TYPE_NONE)
#define CHECK_STREAM_EVENT_TYPE_NOTIFICATION(f) (((f) &STREAM_EVENT_TYPE_NOTIFICATION) != STREAM_EVENT_TYPE_NONE)
#define CHECK_STREAM_EVENT_TYPE_LAST(f) (((f) &STREAM_EVENT_TYPE_LAST) != STREAM_EVENT_TYPE_NONE)

typedef enum {

Expand Down
16 changes: 8 additions & 8 deletions src/client/src/Include_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ typedef STATUS (*KinesisVideoClientCallbackHookFunc)(UINT64);
/**
* Kinesis Video client states definitions
*/
#define CLIENT_STATE_NONE ((UINT64) 0) // 0x00
#define CLIENT_STATE_NEW ((UINT64) (1 << 0)) // 0x01
#define CLIENT_STATE_AUTH ((UINT64) (1 << 1)) // 0x02
#define CLIENT_STATE_PROVISION ((UINT64) (1 << 2)) // 0x04
#define CLIENT_STATE_GET_TOKEN ((UINT64) (1 << 3)) // 0x08
#define CLIENT_STATE_CREATE ((UINT64) (1 << 4)) // 0x10
#define CLIENT_STATE_TAG_CLIENT ((UINT64) (1 << 5)) // 0x20
#define CLIENT_STATE_READY ((UINT64) (1 << 6)) // 0x40
#define CLIENT_STATE_NONE ((UINT64) 0) // 0x00
#define CLIENT_STATE_NEW ((UINT64) (1 << 0)) // 0x01
#define CLIENT_STATE_AUTH ((UINT64) (1 << 1)) // 0x02
#define CLIENT_STATE_PROVISION ((UINT64) (1 << 2)) // 0x04
#define CLIENT_STATE_GET_TOKEN ((UINT64) (1 << 3)) // 0x08
#define CLIENT_STATE_CREATE ((UINT64) (1 << 4)) // 0x10
#define CLIENT_STATE_TAG_CLIENT ((UINT64) (1 << 5)) // 0x20
#define CLIENT_STATE_READY ((UINT64) (1 << 6)) // 0x40

/**
* Object identifier enum - these will serve as sentinel values to identify
Expand Down
2 changes: 1 addition & 1 deletion src/client/src/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ typedef enum {

} UPLOAD_HANDLE_STATE;

#define CHECK_UPLOAD_CONNECTION_STATE_IN_USE(f) (((f) & UPLOAD_CONNECTION_STATE_IN_USE) != UPLOAD_CONNECTION_STATE_NONE)
#define CHECK_UPLOAD_CONNECTION_STATE_IN_USE(f) (((f) &UPLOAD_CONNECTION_STATE_IN_USE) != UPLOAD_CONNECTION_STATE_NONE)
/**
* Upload connection state enum type definition
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ typedef INT_PTR SSIZE_T, *PSSIZE_T;
#define SAFE_DELETE_ARRAY(p) \
do { \
if (p) { \
delete[] (p); \
delete[](p); \
(p) = NULL; \
} \
} while (0)
Expand Down Expand Up @@ -536,11 +536,11 @@ typedef INT_PTR SSIZE_T, *PSSIZE_T;
#endif

#ifndef S_ISDIR
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
#define S_ISDIR(mode) (((mode) &S_IFMT) == S_IFDIR)
#endif

#ifndef S_ISREG
#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
#define S_ISREG(mode) (((mode) &S_IFMT) == S_IFREG)
#endif

// Definition of the mkdir for Windows with 1 param
Expand Down Expand Up @@ -1112,9 +1112,9 @@ typedef SIZE_T ATOMIC_BOOL;
#define LOW_INT32(x) ((INT32) (x))
#define HIGH_INT32(x) ((INT32) (((INT64) (x) >> 32) & 0xFFFFFFFF))

#define MAKE_INT16(a, b) ((INT16) (((UINT8) ((UINT16) (a) & 0xff)) | ((UINT16) ((UINT8) ((UINT16) (b) & 0xff))) << 8))
#define MAKE_INT32(a, b) ((INT32) (((UINT16) ((UINT32) (a) & 0xffff)) | ((UINT32) ((UINT16) ((UINT32) (b) & 0xffff))) << 16))
#define MAKE_INT64(a, b) ((INT64) (((UINT32) ((UINT64) (a) & 0xffffffff)) | ((UINT64) ((UINT32) ((UINT64) (b) & 0xffffffff))) << 32))
#define MAKE_INT16(a, b) ((INT16) (((UINT8) ((UINT16) (a) &0xff)) | ((UINT16) ((UINT8) ((UINT16) (b) &0xff))) << 8))
#define MAKE_INT32(a, b) ((INT32) (((UINT16) ((UINT32) (a) &0xffff)) | ((UINT32) ((UINT16) ((UINT32) (b) &0xffff))) << 16))
#define MAKE_INT64(a, b) ((INT64) (((UINT32) ((UINT64) (a) &0xffffffff)) | ((UINT64) ((UINT32) ((UINT64) (b) &0xffffffff))) << 32))

#define SWAP_INT16(x) MAKE_INT16(HIGH_BYTE(x), LOW_BYTE(x))

Expand Down
2 changes: 1 addition & 1 deletion src/heap/src/AivHeap.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ typedef struct AIV_ALLOCATION_HEADER {
// Chaining left and right
struct AIV_ALLOCATION_HEADER* pNext;
struct AIV_ALLOCATION_HEADER* pPrev;
}* PAIV_ALLOCATION_HEADER;
} * PAIV_ALLOCATION_HEADER;

// Macros to convert to and from handle
#define AIV_HANDLE_SHIFT_BITS 2
Expand Down
2 changes: 1 addition & 1 deletion src/heap/src/HybridHeap.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ typedef UINT32 (*VramGetMax)(VOID);
#define ALIGNMENT_BITS (UINT64) 0x03
#define TO_VRAM_HANDLE(h) ((UINT32) ((UINT64) (h) >> 32))
#define FROM_VRAM_HANDLE(h) (ALLOCATION_HANDLE)(((UINT64) (h) << 32) | ALIGNMENT_BITS)
#define IS_DIRECT_ALLOCATION_HANDLE(h) (((UINT64) (h) & ALIGNMENT_BITS) == (UINT64) 0x00)
#define IS_DIRECT_ALLOCATION_HANDLE(h) (((UINT64) (h) &ALIGNMENT_BITS) == (UINT64) 0x00)

/**
* Hybrid heap struct
Expand Down
26 changes: 13 additions & 13 deletions src/mkvgen/include/com/amazonaws/kinesis/video/mkvgen/Include.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ extern "C" {
/**
* Constant definitions for some known codec IDs
*/
#define MKV_FOURCC_CODEC_ID ((PCHAR) "V_MS/VFW/FOURCC")
#define MKV_H264_AVC_CODEC_ID ((PCHAR) "V_MPEG4/ISO/AVC")
#define MKV_H265_HEVC_CODEC_ID ((PCHAR) "V_MPEGH/ISO/HEVC")
#define MKV_AAC_MPEG4_MAIN_CODEC_ID ((PCHAR) "A_AAC/MPEG4/MAIN")
#define MKV_AAC_CODEC_ID ((PCHAR) "A_AAC")
#define MKV_PCM_CODEC_ID ((PCHAR) "A_MS/ACM")
#define MKV_PCM_INT_LIT_CODEC_ID ((PCHAR) "A_PCM/INT/LIT")
#define MKV_PCM_INT_BIG_CODEC_ID ((PCHAR) "A_PCM/INT/BIG")
#define MKV_PCM_FLOAT_IEEE_CODEC_ID ((PCHAR) "A_PCM/FLOAT/IEEE")
#define MKV_FOURCC_CODEC_ID ((PCHAR) "V_MS/VFW/FOURCC")
#define MKV_H264_AVC_CODEC_ID ((PCHAR) "V_MPEG4/ISO/AVC")
#define MKV_H265_HEVC_CODEC_ID ((PCHAR) "V_MPEGH/ISO/HEVC")
#define MKV_AAC_MPEG4_MAIN_CODEC_ID ((PCHAR) "A_AAC/MPEG4/MAIN")
#define MKV_AAC_CODEC_ID ((PCHAR) "A_AAC")
#define MKV_PCM_CODEC_ID ((PCHAR) "A_MS/ACM")
#define MKV_PCM_INT_LIT_CODEC_ID ((PCHAR) "A_PCM/INT/LIT")
#define MKV_PCM_INT_BIG_CODEC_ID ((PCHAR) "A_PCM/INT/BIG")
#define MKV_PCM_FLOAT_IEEE_CODEC_ID ((PCHAR) "A_PCM/FLOAT/IEEE")

/**
* Current versions of the public facing structures
Expand Down Expand Up @@ -231,10 +231,10 @@ typedef enum { MKV_TREE_TAGS = 0, MKV_TREE_TAG, MKV_TREE_SIMPLE, MKV_TREE_LAST }
/**
* Macros checking for the frame flags
*/
#define CHECK_FRAME_FLAG_KEY_FRAME(f) (((f) & FRAME_FLAG_KEY_FRAME) != FRAME_FLAG_NONE)
#define CHECK_FRAME_FLAG_DISCARDABLE_FRAME(f) (((f) & FRAME_FLAG_DISCARDABLE_FRAME) != FRAME_FLAG_NONE)
#define CHECK_FRAME_FLAG_INVISIBLE_FRAME(f) (((f) & FRAME_FLAG_INVISIBLE_FRAME) != FRAME_FLAG_NONE)
#define CHECK_FRAME_FLAG_END_OF_FRAGMENT(f) (((f) & FRAME_FLAG_END_OF_FRAGMENT) != FRAME_FLAG_NONE)
#define CHECK_FRAME_FLAG_KEY_FRAME(f) (((f) &FRAME_FLAG_KEY_FRAME) != FRAME_FLAG_NONE)
#define CHECK_FRAME_FLAG_DISCARDABLE_FRAME(f) (((f) &FRAME_FLAG_DISCARDABLE_FRAME) != FRAME_FLAG_NONE)
#define CHECK_FRAME_FLAG_INVISIBLE_FRAME(f) (((f) &FRAME_FLAG_INVISIBLE_FRAME) != FRAME_FLAG_NONE)
#define CHECK_FRAME_FLAG_END_OF_FRAGMENT(f) (((f) &FRAME_FLAG_END_OF_FRAGMENT) != FRAME_FLAG_NONE)

#define SET_FRAME_FLAG_KEY_FRAME(f) ((f) = (FRAME_FLAGS) (f | FRAME_FLAG_KEY_FRAME))
#define SET_FRAME_FLAG_DISCARDABLE_FRAME(f) ((f) = (FRAME_FLAGS) (f | FRAME_FLAG_DISCARDABLE_FRAME))
Expand Down
4 changes: 2 additions & 2 deletions src/mkvgen/src/Include_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ extern DOUBLE gMkvAACSamplingFrequencies[];
extern UINT32 gMkvAACSamplingFrequenciesCount;
#define MKV_AAC_SAMPLING_FREQUNECY_IDX_MAX gMkvAACSamplingFrequenciesCount
// documented here: https://wiki.multimedia.cx/index.php/MPEG-4_Audio
#define MKV_AAC_CHANNEL_CONFIG_MAX 8
#define MKV_AAC_CHANNEL_CONFIG_MAX 8

extern BYTE gMkvTrackInfoBits[];
extern UINT32 gMkvTrackInfoBitsSize;
Expand Down Expand Up @@ -284,7 +284,7 @@ extern UINT32 gMkvTagStringBitsSize;
/**
* To and from MKV timestamp conversion factoring in the timecode
*/
#define TIMESTAMP_TO_MKV_TIMECODE(ts, tcs) ((ts) * DEFAULT_TIME_UNIT_IN_NANOS / (tcs))
#define TIMESTAMP_TO_MKV_TIMECODE(ts, tcs) ((ts) *DEFAULT_TIME_UNIT_IN_NANOS / (tcs))
#define MKV_TIMECODE_TO_TIMESTAMP(tc, tcs) ((tc) * ((tcs) / DEFAULT_TIME_UNIT_IN_NANOS))

/**
Expand Down
18 changes: 9 additions & 9 deletions src/view/include/com/amazonaws/kinesis/video/view/Include.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ extern "C" {
/**
* Macros for checking/setting/clearing for various flags
*/
#define CHECK_ITEM_FRAGMENT_START(f) (((f) & ITEM_FLAG_FRAGMENT_START) != ITEM_FLAG_NONE)
#define CHECK_ITEM_BUFFERING_ACK(f) (((f) & ITEM_FLAG_BUFFERING_ACK) != ITEM_FLAG_NONE)
#define CHECK_ITEM_RECEIVED_ACK(f) (((f) & ITEM_FLAG_RECEIVED_ACK) != ITEM_FLAG_NONE)
#define CHECK_ITEM_STREAM_START(f) (((f) & ITEM_FLAG_STREAM_START) != ITEM_FLAG_NONE)
#define CHECK_ITEM_FRAGMENT_END(f) (((f) & ITEM_FLAG_FRAGMENT_END) != ITEM_FLAG_NONE)
#define CHECK_ITEM_PERSISTED_ACK(f) (((f) & ITEM_FLAG_PERSISTED_ACK) != ITEM_FLAG_NONE)
#define CHECK_ITEM_SKIP_ITEM(f) (((f) & ITEM_FLAG_SKIP_ITEM) != ITEM_FLAG_NONE)
#define CHECK_ITEM_STREAM_START_DEBUG(f) (((f) & ITEM_FLAG_STREAM_START_DEBUG) != ITEM_FLAG_NONE)
#define CHECK_ITEM_FRAGMENT_START(f) (((f) &ITEM_FLAG_FRAGMENT_START) != ITEM_FLAG_NONE)
#define CHECK_ITEM_BUFFERING_ACK(f) (((f) &ITEM_FLAG_BUFFERING_ACK) != ITEM_FLAG_NONE)
#define CHECK_ITEM_RECEIVED_ACK(f) (((f) &ITEM_FLAG_RECEIVED_ACK) != ITEM_FLAG_NONE)
#define CHECK_ITEM_STREAM_START(f) (((f) &ITEM_FLAG_STREAM_START) != ITEM_FLAG_NONE)
#define CHECK_ITEM_FRAGMENT_END(f) (((f) &ITEM_FLAG_FRAGMENT_END) != ITEM_FLAG_NONE)
#define CHECK_ITEM_PERSISTED_ACK(f) (((f) &ITEM_FLAG_PERSISTED_ACK) != ITEM_FLAG_NONE)
#define CHECK_ITEM_SKIP_ITEM(f) (((f) &ITEM_FLAG_SKIP_ITEM) != ITEM_FLAG_NONE)
#define CHECK_ITEM_STREAM_START_DEBUG(f) (((f) &ITEM_FLAG_STREAM_START_DEBUG) != ITEM_FLAG_NONE)

#define SET_ITEM_FRAGMENT_START(f) ((f) |= ITEM_FLAG_FRAGMENT_START)
#define SET_ITEM_BUFFERING_ACK(f) ((f) |= ITEM_FLAG_BUFFERING_ACK)
Expand All @@ -96,7 +96,7 @@ extern "C" {
#define CLEAR_ITEM_STREAM_START_DEBUG(f) ((f) &= ~ITEM_FLAG_STREAM_START_DEBUG)

#define GET_ITEM_DATA_OFFSET(f) ((UINT16) ((f) >> 16))
#define SET_ITEM_DATA_OFFSET(f, o) ((f) = ((f) & 0x0000ffff) | (((UINT16) (o)) << 16))
#define SET_ITEM_DATA_OFFSET(f, o) ((f) = ((f) &0x0000ffff) | (((UINT16) (o)) << 16))

/**
* This is a sentinel indicating an invalid index value
Expand Down
Loading

0 comments on commit f3c13a1

Please sign in to comment.