[Spice-devel] [PATCH v2 04/18] worker: start a DisplayChannelClient unit
Frediano Ziglio
fziglio at redhat.com
Thu Nov 19 03:18:27 PST 2015
The difference from the previous patch (just to make it easier) is
diff --git a/server/Makefile.am b/server/Makefile.am
index ffffd22..669664a 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -140,6 +140,7 @@ libspice_server_la_SOURCES = \
stream.h \
dcc.c \
dcc.h \
+ display-limits.h \
dcc-encoders.c \
dcc-encoders.h \
$(NULL)
diff --git a/server/dcc.h b/server/dcc.h
index b66f730..ee2e75f 100644
--- a/server/dcc.h
+++ b/server/dcc.h
@@ -23,6 +23,7 @@
#include "cache-item.h"
#include "dcc-encoders.h"
#include "stream.h"
+#include "display-limits.h"
#define PALETTE_CACHE_HASH_SHIFT 8
#define PALETTE_CACHE_HASH_SIZE (1 << PALETTE_CACHE_HASH_SHIFT)
diff --git a/server/display-channel.h b/server/display-channel.h
index ee107e8..aba7dce 100644
--- a/server/display-channel.h
+++ b/server/display-channel.h
@@ -50,6 +50,7 @@
#include "tree.h"
#include "stream.h"
#include "dcc.h"
+#include "display-limits.h"
typedef struct DependItem {
diff --git a/server/display-limits.h b/server/display-limits.h
new file mode 100644
index 0000000..8d2b41d
--- /dev/null
+++ b/server/display-limits.h
@@ -0,0 +1,27 @@
+/* -*- 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 DISPLAY_LIMITS_H_
+#define DISPLAY_LIMITS_H_
+
+/*** Maximum number of surfaces a guest can create */
+#define NUM_SURFACES 10000
+
+/*** Maximum number of streams created by spice-server */
+#define NUM_STREAMS 50
+
+#endif /* DISPLAY_LIMITS_H_ */
diff --git a/server/red_worker.h b/server/red_worker.h
index c64dcaf..729ce2b 100644
--- a/server/red_worker.h
+++ b/server/red_worker.h
@@ -23,8 +23,6 @@
#include "red_common.h"
#include "red_dispatcher.h"
-#define NUM_SURFACES 10000
-
typedef struct RedWorker RedWorker;
typedef struct CommonChannelClient {
diff --git a/server/stream.h b/server/stream.h
index 5d95ae6..0577dc8 100644
--- a/server/stream.h
+++ b/server/stream.h
@@ -40,7 +40,6 @@
#define RED_STREAM_DEFAULT_HIGH_START_BIT_RATE (10 * 1024 * 1024) // 10Mbps
#define RED_STREAM_DEFAULT_LOW_START_BIT_RATE (2.5 * 1024 * 1024) // 2.5Mbps
#define MAX_FPS 30
-#define NUM_STREAMS 50
/* move back to display_channel once struct private */
typedef struct DisplayChannel DisplayChannel;
Frediano
More information about the Spice-devel
mailing list