summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_encoder.h
diff options
context:
space:
mode:
authorspeidy <speidy@gmail.com>2016-12-22 12:04:29 -0500
committerspeidy <speidy@gmail.com>2016-12-22 12:04:29 -0500
commit93c55e58a884270850794c29bd0f4e2df22e22d6 (patch)
tree0eeece185f648a2ddf14d522c54c75c70986afda /xrdp/xrdp_encoder.h
parentf4224615c97668236826d115fa37b6ce805bea96 (diff)
parent38253f1371b5e01e05ba995f28b6451ee57b613c (diff)
downloadxrdp-proprietary-93c55e58a884270850794c29bd0f4e2df22e22d6.tar.gz
xrdp-proprietary-93c55e58a884270850794c29bd0f4e2df22e22d6.zip
Merge branch 'devel' of https://github.com/neutrinolabs/xrdp
Conflicts: xorgxrdp
Diffstat (limited to 'xrdp/xrdp_encoder.h')
-rw-r--r--xrdp/xrdp_encoder.h62
1 files changed, 58 insertions, 4 deletions
diff --git a/xrdp/xrdp_encoder.h b/xrdp/xrdp_encoder.h
index 1d525f12..f138d749 100644
--- a/xrdp/xrdp_encoder.h
+++ b/xrdp/xrdp_encoder.h
@@ -3,13 +3,67 @@
#define _XRDP_ENCODER_H
#include "arch.h"
+#include "fifo.h"
-struct xrdp_mm;
+struct xrdp_enc_data;
-int APP_CC
-init_xrdp_encoder(struct xrdp_mm *self);
+/* for codec mode operations */
+struct xrdp_encoder
+{
+ struct xrdp_mm *mm;
+ int in_codec_mode;
+ int codec_id;
+ int codec_quality;
+ 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;
+};
+
+/* 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 *APP_CC
+xrdp_encoder_create(struct xrdp_mm *mm);
void APP_CC
-deinit_xrdp_encoder(struct xrdp_mm *self);
+xrdp_encoder_delete(struct xrdp_encoder *self);
THREAD_RV THREAD_CC
proc_enc_msg(void *arg);