-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmemory.h
76 lines (64 loc) · 1.16 KB
/
smemory.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#define QUEUE_SIZE 128
#ifdef _WIN32
#define PACKET_SIZE 512 * 1024
#else
#define PACKET_SIZE 1024 * 1024
#endif
enum QueueType {
Video0,
Video1,
Audio,
Microphone,
Input,
QueueMax
};
typedef enum _EventType {
Pointer,
Bitrate,
Framerate,
Idr,
Hdr,
Stop,
EventMax
} EventType;
typedef struct {
int is_idr;
long long duration;
}PacketMetadata;
typedef struct {
int active;
char display[64];
int codec;
int env_width, env_height;
int width, height;
// Offset x and y coordinates of the client
float client_offsetX, client_offsetY;
float offsetX, offsetY;
float scalar_inv;
}QueueMetadata;
typedef struct {
int size;
PacketMetadata metadata;
char data[PACKET_SIZE];
} Packet;
typedef enum _DataType {
HDR_INFO,
NUMBER,
STRING,
} DataType;
typedef struct {
int read;
DataType type;
int data_size;
int value_number;
char value_raw[PACKET_SIZE];
} Event;
typedef struct _Queue{
int index;
QueueMetadata metadata;
Event events[EventMax];
Packet array[QUEUE_SIZE];
}Queue;
typedef struct {
Queue queues[QueueMax];
}SharedMemory;