blob: a84a48e1982292e065b8bd6c4274059aba91a65c (
plain)
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
|
#ifndef _XRDP_ENCODER_H
#define _XRDP_ENCODER_H
#include "arch.h"
#include "fifo.h"
struct xrdp_enc_data;
/* for codec mode operations */
struct xrdp_encoder
{
struct xrdp_mm *mm;
int in_codec_mode;
int codec_id;
int codec_quality;
int max_compressed_bytes;
tbus xrdp_encoder_event_to_proc;
tbus xrdp_encoder_event_processed;
tbus xrdp_encoder_term;
FIFO *fifo_to_proc;
FIFO *fifo_processed;
tbus mutex;
int (*process_enc)(struct xrdp_encoder *self, struct xrdp_enc_data *enc);
void *codec_handle;
int frame_id_client; /* last frame id received from client */
int frame_id_server; /* last frame id received from Xorg */
int frame_id_server_sent;
int frames_in_flight;
};
/* used when scheduling tasks in xrdp_encoder.c */
struct xrdp_enc_data
{
struct xrdp_mod *mod;
int num_drects;
short *drects; /* 4 * num_drects */
int num_crects;
short *crects; /* 4 * num_crects */
char *data;
int width;
int height;
int flags;
int frame_id;
};
typedef struct xrdp_enc_data XRDP_ENC_DATA;
/* used when scheduling tasks from xrdp_encoder.c */
struct xrdp_enc_data_done
{
int comp_bytes;
int pad_bytes;
char *comp_pad_data;
struct xrdp_enc_data *enc;
int last; /* true is this is last message for enc */
int x;
int y;
int cx;
int cy;
};
typedef struct xrdp_enc_data_done XRDP_ENC_DATA_DONE;
struct xrdp_encoder *
xrdp_encoder_create(struct xrdp_mm *mm);
void
xrdp_encoder_delete(struct xrdp_encoder *self);
THREAD_RV THREAD_CC
proc_enc_msg(void *arg);
#endif
|