summaryrefslogtreecommitdiff
path: root/server/dcc-private.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/dcc-private.h')
-rw-r--r--server/dcc-private.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/server/dcc-private.h b/server/dcc-private.h
new file mode 100644
index 00000000..29b55ff0
--- /dev/null
+++ b/server/dcc-private.h
@@ -0,0 +1,87 @@
+/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/*
+ Copyright (C) 2009-2015 Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef DCC_PRIVATE_H_
+#define DCC_PRIVATE_H_
+
+#include "cache-item.h"
+#include "dcc.h"
+#include "dcc-encoders.h"
+#include "stream.h"
+
+struct DisplayChannelClient {
+ CommonGraphicsChannelClient common;
+ uint32_t id;
+ SpiceImageCompression image_compression;
+ spice_wan_compression_t jpeg_state;
+ spice_wan_compression_t zlib_glz_state;
+ int jpeg_quality;
+ int zlib_level;
+
+ QuicData quic_data;
+ QuicContext *quic;
+ LzData lz_data;
+ LzContext *lz;
+ JpegData jpeg_data;
+ JpegEncoderContext *jpeg;
+#ifdef USE_LZ4
+ Lz4Data lz4_data;
+ Lz4EncoderContext *lz4;
+#endif
+ ZlibData zlib_data;
+ ZlibEncoder *zlib;
+
+ int expect_init;
+
+ PixmapCache *pixmap_cache;
+ uint32_t pixmap_cache_generation;
+ int pending_pixmaps_sync;
+
+ RedCacheItem *palette_cache[PALETTE_CACHE_HASH_SIZE];
+ Ring palette_cache_lru;
+ long palette_cache_available;
+ uint32_t palette_cache_items;
+
+ struct {
+ uint32_t stream_outbuf_size;
+ uint8_t *stream_outbuf; // caution stream buffer is also used as compress bufs!!!
+
+ FreeList free_list;
+ uint64_t pixmap_cache_items[MAX_DRAWABLE_PIXMAP_CACHE_ITEMS];
+ int num_pixmap_cache_items;
+ } send_data;
+
+ /* global lz encoding entities */
+ GlzSharedDictionary *glz_dict;
+ GlzEncoderContext *glz;
+ GlzData glz_data;
+
+ Ring glz_drawables; // all the living lz drawable, ordered by encoding time
+ Ring glz_drawables_inst_to_free; // list of instances to be freed
+ pthread_mutex_t glz_drawables_inst_to_free_lock;
+
+ uint8_t surface_client_created[NUM_SURFACES];
+ QRegion surface_client_lossy_region[NUM_SURFACES];
+
+ StreamAgent stream_agents[NUM_STREAMS];
+ int use_video_encoder_rate_control;
+ uint32_t streams_max_latency;
+ uint64_t streams_max_bit_rate;
+ bool gl_draw_ongoing;
+};
+
+#endif /* DCC_PRIVATE_H_ */