AJA NTV2 SDK
18.0.0.2122
NTV2 SDK 18.0.0.2122
thread.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: MIT */
8
#ifndef AJA_THREAD_H
9
#define AJA_THREAD_H
10
11
#include "
ajabase/common/public.h
"
12
13
// forward declarations
14
class
AJAThread
;
15
class
AJAThreadImpl
;
16
17
22
typedef
void
AJAThreadFunction
(
AJAThread
* pThread,
void
* pContext);
23
28
enum
AJAThreadState
29
{
30
AJA_ThreadState_Running
,
31
AJA_ThreadState_Idle
,
32
AJA_ThreadState_Shutdown
33
};
34
35
39
enum
AJAThreadPriority
40
{
41
AJA_ThreadPriority_Unknown
,
42
AJA_ThreadPriority_Low
,
43
AJA_ThreadPriority_Normal
,
44
AJA_ThreadPriority_High
,
45
AJA_ThreadPriority_TimeCritical
,
46
AJA_ThreadPriority_AboveNormal
47
};
48
49
50
enum
AJAThreadRealTimePolicy
51
{
52
AJA_ThreadRealTimePolicyFIFO
,
53
AJA_ThreadRealTimePolicyRoundRobin
54
};
55
56
69
class
AJA_EXPORT
AJAThread
70
{
71
public
:
72
73
AJAThread
();
74
virtual
~
AJAThread
();
75
83
virtual
AJAStatus
Start();
84
94
virtual
AJAStatus
Stop(uint32_t timeout = 0xffffffff);
95
102
virtual
AJAStatus
Kill(uint32_t exitCode);
103
110
virtual
bool
Active();
111
118
virtual
bool
IsCurrentThread();
119
128
virtual
AJAStatus
SetPriority(
AJAThreadPriority
priority);
129
136
virtual
AJAStatus
GetPriority(
AJAThreadPriority
* pPriority);
137
147
virtual
AJAStatus
SetRealTime(
AJAThreadRealTimePolicy
policy,
int
priority);
148
159
virtual
AJAStatus
ThreadRun();
160
169
virtual
AJAStatus
ThreadInit();
170
179
virtual
bool
ThreadLoop();
180
189
virtual
AJAStatus
ThreadFlush();
190
199
virtual
bool
Terminate();
200
211
virtual
AJAStatus
Attach(AJAThreadFunction* pThreadFunction,
void
* pUserContext);
212
221
virtual
AJAStatus
SetThreadName(
const
char
*name);
222
228
static
uint64_t GetThreadId();
229
230
private
:
231
232
AJAThreadImpl
* mpImpl;
233
};
234
235
#endif // AJA_THREAD_H
AJAThreadPriority
AJAThreadPriority
Definition:
thread.h:39
AJAStatus
AJAStatus
Definition:
types.h:380
AJA_EXPORT
#define AJA_EXPORT
Definition:
export.h:34
AJA_ThreadRealTimePolicyFIFO
Definition:
thread.h:52
AJA_ThreadPriority_AboveNormal
Definition:
thread.h:46
AJA_ThreadPriority_High
Definition:
thread.h:44
AJA_ThreadRealTimePolicyRoundRobin
Definition:
thread.h:53
AJAThread
Definition:
thread.h:69
AJA_ThreadState_Idle
Definition:
thread.h:31
AJAThreadRealTimePolicy
AJAThreadRealTimePolicy
Definition:
thread.h:50
public.h
Master header for the ajabase library.
AJA_ThreadState_Shutdown
Definition:
thread.h:32
AJAThread::AJAThreadFunction
void AJAThreadFunction(AJAThread *pThread, void *pContext)
Definition:
thread.h:22
AJA_ThreadPriority_Unknown
Definition:
thread.h:41
AJA_ThreadPriority_Normal
Definition:
thread.h:43
AJA_ThreadPriority_TimeCritical
Definition:
thread.h:45
AJA_ThreadState_Running
Definition:
thread.h:30
AJA_ThreadPriority_Low
Definition:
thread.h:42
AJAThreadImpl
Definition:
threadimpl.h:18
AJAThreadState
AJAThreadState
Definition:
thread.h:28
libajantv2
ajabase
system
thread.h
Generated on Wed Mar 18 2026 15:01:17 for AJA NTV2 SDK by
1.8.14