AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
buffer.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #ifndef AJA_BUFFER_H
9 #define AJA_BUFFER_H
10 
11 #include "public.h"
12 
17 {
18 public:
19  AJABuffer();
20  virtual ~AJABuffer();
21 
30  AJAStatus AttachBuffer(uint8_t* pBuffer, size_t size);
31 
41  AJAStatus AllocateBuffer(size_t size, size_t alignment = 0, char* pName = NULL);
42 
49  AJAStatus FreeBuffer();
50 
56  uint8_t* GetBuffer();
57 
58  uint32_t* GetUINT32Buffer();
59 
65  size_t GetBufferSize();
66 
72  size_t GetBufferAlignment();
73 
79  const char* GetBufferName();
80 
88  AJAStatus SetDataOffset(size_t offset);
89 
95  size_t GetDataOffset();
96 
104  AJAStatus SetDataSize(size_t size);
105 
111  size_t GetDataSize();
112 
118  uint8_t* GetData();
119 
120 private:
121 
122  void ComputeAlignment();
123 
124  uint8_t* mpAllocate;
125  size_t mAllocateSize;
126  size_t mAllocateAlignment;
127  char* mpAllocateName;
128 
129  uint8_t* mpBuffer;
130  size_t mBufferSize;
131  size_t mBufferAlignment;
132 
133  size_t mDataOffset;
134  size_t mDataSize;
135 };
136 
137 #endif
138 
NULL
#define NULL
Definition: ntv2caption608types.h:19
AJA_EXPORT
#define AJA_EXPORT
Definition: export.h:34
AJABuffer
Definition: buffer.h:16
public.h
Master header for the ajabase library.
AJAStatus
AJAStatus
Definition: types.h:365