[Spice-commits] 11 commits - autogen.sh client/display_channel.cpp client/x11 common/mem.c common/mem.h configure.ac Makefile.am server/reds.c server/red_worker.c spice.pc.in spice-server.pc.in
Alexander Larsson
alexl at kemper.freedesktop.org
Wed Mar 24 09:03:53 PDT 2010
Makefile.am | 4
autogen.sh | 9 --
client/display_channel.cpp | 14 +--
client/x11/Makefile.am | 181 ++++++++++++++++++++++-----------------------
common/mem.c | 18 ++++
common/mem.h | 1
configure.ac | 9 +-
server/red_worker.c | 58 ++++++++++----
server/reds.c | 56 ++-----------
spice-server.pc.in | 13 +++
spice.pc.in | 13 ---
11 files changed, 190 insertions(+), 186 deletions(-)
New commits:
commit ce0d8a094c9d64e762b2b0ca451b043e85d202a5
Author: Alexander Larsson <alexl at redhat.com>
Date: Wed Mar 24 17:02:20 2010 +0100
Add spice_strndup
Also, make str(n)dup handle NULL correctly
diff --git a/common/mem.c b/common/mem.c
index ad0cccf..56b3715 100644
--- a/common/mem.c
+++ b/common/mem.c
@@ -32,11 +32,29 @@ char *spice_strdup(const char *str)
{
char *copy;
+ if (str == NULL) {
+ return NULL;
+ }
+
copy = (char *)spice_malloc(strlen(str) + 1);
strcpy(copy, str);
return copy;
}
+char *spice_strndup(const char *str, size_t n_bytes)
+{
+ char *copy;
+
+ if (str == NULL) {
+ return NULL;
+ }
+
+ copy = (char *)spice_malloc(n_bytes + 1);
+ strncpy(copy, str, n_bytes);
+ copy[n_bytes] = 0;
+ return copy;
+}
+
void *spice_memdup(const void *mem, size_t n_bytes)
{
void *copy;
diff --git a/common/mem.h b/common/mem.h
index f5fab20..350e421 100644
--- a/common/mem.h
+++ b/common/mem.h
@@ -23,6 +23,7 @@
#include <spice/macros.h>
char *spice_strdup(const char *str) SPICE_GNUC_MALLOC;
+char *spice_strndup(const char *str, size_t n_bytes) SPICE_GNUC_MALLOC;
void *spice_memdup(const void *mem, size_t n_bytes) SPICE_GNUC_MALLOC;
void *spice_malloc(size_t n_bytes) SPICE_GNUC_MALLOC SPICE_GNUC_ALLOC_SIZE(1);
void *spice_malloc0(size_t n_bytes) SPICE_GNUC_MALLOC SPICE_GNUC_ALLOC_SIZE(1);
commit 4a36b98440df727bc16e2946853a5c9cb9f40094
Author: Alexander Larsson <alexl at redhat.com>
Date: Wed Mar 24 15:57:33 2010 +0100
Get rid of more out-of-memory checks
We already check this in spice_malloc now
diff --git a/server/reds.c b/server/reds.c
index 68c95a4..18792fd 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1090,11 +1090,7 @@ static void reds_send_channels()
int i;
message_size = sizeof(SpiceMsgChannels) + reds->num_of_channels * sizeof(SpiceChannelId);
- if (!(item = new_simple_out_item(SPICE_MSG_MAIN_CHANNELS_LIST, message_size))) {
- red_printf("alloc item failed");
- reds_disconnect();
- return;
- }
+ item = new_simple_out_item(SPICE_MSG_MAIN_CHANNELS_LIST, message_size);
channels_info = (SpiceMsgChannels *)item->data;
channels_info->num_of_channels = reds->num_of_channels;
channel = reds->channels;
@@ -1241,11 +1237,7 @@ static void reds_send_mouse_mode()
return;
}
- if (!(item = new_simple_out_item(SPICE_MSG_MAIN_MOUSE_MODE, sizeof(SpiceMsgMainMouseMode)))) {
- red_printf("alloc item failed");
- reds_disconnect();
- return;
- }
+ new_simple_out_item(SPICE_MSG_MAIN_MOUSE_MODE, sizeof(SpiceMsgMainMouseMode));
mouse_mode = (SpiceMsgMainMouseMode *)item->data;
mouse_mode->supported_modes = SPICE_MOUSE_MODE_SERVER;
if (reds->is_client_mouse_allowed) {
@@ -1287,9 +1279,7 @@ static void reds_update_mouse_mode()
static void reds_send_agent_connected()
{
SimpleOutItem *item;
- if (!(item = new_simple_out_item(SPICE_MSG_MAIN_AGENT_CONNECTED, 0))) {
- PANIC("alloc item failed");
- }
+ item = new_simple_out_item(SPICE_MSG_MAIN_AGENT_CONNECTED, 0);
reds_push_pipe_item(&item->base);
}
@@ -1298,9 +1288,7 @@ static void reds_send_agent_disconnected()
SpiceMsgMainAgentDisconnect *disconnect;
SimpleOutItem *item;
- if (!(item = new_simple_out_item(SPICE_MSG_MAIN_AGENT_DISCONNECTED, sizeof(SpiceMsgMainAgentDisconnect)))) {
- PANIC("alloc item failed");
- }
+ item = new_simple_out_item(SPICE_MSG_MAIN_AGENT_DISCONNECTED, sizeof(SpiceMsgMainAgentDisconnect));
disconnect = (SpiceMsgMainAgentDisconnect *)item->data;
disconnect->error_code = SPICE_LINK_ERR_OK;
reds_push_pipe_item(&item->base);
@@ -1338,11 +1326,7 @@ static void reds_send_tokens()
return;
}
- if (!(item = new_simple_out_item(SPICE_MSG_MAIN_AGENT_TOKEN, sizeof(SpiceMsgMainAgentTokens)))) {
- red_printf("alloc item failed");
- reds_disconnect();
- return;
- }
+ item = new_simple_out_item(SPICE_MSG_MAIN_AGENT_TOKEN, sizeof(SpiceMsgMainAgentTokens));
tokens = (SpiceMsgMainAgentTokens *)item->data;
tokens->num_tokens = reds->agent_state.num_tokens;
reds->agent_state.num_client_tokens += tokens->num_tokens;
@@ -2262,11 +2246,7 @@ static void reds_handle_main_link(RedLinkInfo *link)
SimpleOutItem *item;
SpiceMsgMainInit *init;
- if (!(item = new_simple_out_item(SPICE_MSG_MAIN_INIT, sizeof(SpiceMsgMainInit)))) {
- red_printf("alloc item failed");
- reds_disconnect();
- return;
- }
+ item = new_simple_out_item(SPICE_MSG_MAIN_INIT, sizeof(SpiceMsgMainInit));
init = (SpiceMsgMainInit *)item->data;
init->session_id = connection_id;
init->display_channels_hint = red_dispatcher_count();
@@ -2688,12 +2668,7 @@ static void reds_handle_other_links(RedLinkInfo *link)
LOG_MESSAGE(VD_LOG_WARN, "%s", mess);
- if (!(item = new_simple_out_item(SPICE_MSG_NOTIFY, sizeof(SpiceMsgNotify) + mess_len + 1))) {
- red_printf("alloc item failed");
- reds_disconnect();
- return;
- }
-
+ item = new_simple_out_item(SPICE_MSG_NOTIFY, sizeof(SpiceMsgNotify) + mess_len + 1);
notify = (SpiceMsgNotify *)item->data;
notify->time_stamp = get_time_stamp();
notify->severty = SPICE_NOTIFY_SEVERITY_WARN;
@@ -4272,11 +4247,6 @@ static void reds_mig_continue(RedsMigSpice *s)
host_len = strlen(s->host) + 1;
item = new_simple_out_item(SPICE_MSG_MAIN_MIGRATE_BEGIN,
sizeof(SpiceMsgMainMigrationBegin) + host_len + s->cert_pub_key_len);
- if (!(item)) {
- red_printf("alloc item failed");
- reds_disconnect();
- return;
- }
migrate = (SpiceMsgMainMigrationBegin *)item->data;
migrate->port = s->port;
migrate->sport = s->sport;
@@ -4591,11 +4561,7 @@ static void reds_mig_finished(void *opaque, int completed)
reds->mig_wait_disconnect = TRUE;
core->arm_timer(core, reds->mig_timer, MIGRATE_TIMEOUT);
- if (!(item = new_simple_out_item(SPICE_MSG_MIGRATE, sizeof(SpiceMsgMigrate)))) {
- red_printf("alloc item failed");
- reds_disconnect();
- return;
- }
+ item = new_simple_out_item(SPICE_MSG_MIGRATE, sizeof(SpiceMsgMigrate));
migrate = (SpiceMsgMigrate *)item->data;
migrate->flags = SPICE_MIGRATE_NEED_FLUSH | SPICE_MIGRATE_NEED_DATA_TRANSFER;
reds_push_pipe_item(&item->base);
@@ -4605,11 +4571,7 @@ static void reds_mig_finished(void *opaque, int completed)
channel = channel->next;
}
} else {
- if (!(item = new_simple_out_item(SPICE_MSG_MAIN_MIGRATE_CANCEL, 0))) {
- red_printf("alloc item failed");
- reds_disconnect();
- return;
- }
+ item = new_simple_out_item(SPICE_MSG_MAIN_MIGRATE_CANCEL, 0);
reds_push_pipe_item(&item->base);
reds_mig_cleanup();
}
commit 66310f99e058411d3421219ad0fb5782cf221e61
Author: Yonit Halperin <yhalperi at redhat.com>
Date: Wed Mar 24 15:18:07 2010 +0100
spice: server: Being more permissive in video identification
In 'filter' video streaming mode, use a more permissive threshold for distinguishing
'realistic' streams from 'textaul'/'artificial' streams. The previous threshold classified
streams that were scaled on the guest as artificial and thus they were not recoginized as videos.
diff --git a/server/red_worker.c b/server/red_worker.c
index 9ef84a6..4608706 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -778,8 +778,9 @@ typedef struct DrawItem {
typedef enum {
BITMAP_GRADUAL_INVALID,
BITMAP_GRADUAL_NOT_AVAIL,
- BITMAP_GRADUAL_TRUE,
- BITMAP_GRADUAL_FALSE,
+ BITMAP_GRADUAL_LOW,
+ BITMAP_GRADUAL_MEDIUM,
+ BITMAP_GRADUAL_HIGH,
} BitmapGradualType;
struct Drawable {
@@ -1003,7 +1004,7 @@ static void red_display_release_stream_clip(DisplayChannel* channel, StreamClipI
static int red_display_free_some_independent_glz_drawables(DisplayChannel *channel);
static void red_display_free_glz_drawable(DisplayChannel *channel, RedGlzDrawable *drawable);
static void reset_rate(StreamAgent *stream_agent);
-static int _bitmap_is_gradual(RedWorker *worker, SpiceBitmap *bitmap, uint32_t group_id);
+static BitmapGradualType _get_bitmap_graduality_level(RedWorker *worker, SpiceBitmap *bitmap, uint32_t group_id);
static inline int _stride_is_extra(SpiceBitmap *bitmap);
#ifdef DUMP_BITMAP
@@ -2904,11 +2905,7 @@ static inline void red_update_copy_graduality(RedWorker* worker, Drawable *drawa
(qxl_image->bitmap.flags & QXL_BITMAP_UNSTABLE)) {
drawable->copy_bitmap_graduality = BITMAP_GRADUAL_NOT_AVAIL;
} else {
- if (_bitmap_is_gradual(worker, &qxl_image->bitmap, drawable->group_id)) {
- drawable->copy_bitmap_graduality = BITMAP_GRADUAL_TRUE;
- } else {
- drawable->copy_bitmap_graduality = BITMAP_GRADUAL_FALSE;
- }
+ drawable->copy_bitmap_graduality = _get_bitmap_graduality_level(worker, &qxl_image->bitmap, drawable->group_id);
}
}
@@ -2928,7 +2925,7 @@ static void red_stream_add_frame(RedWorker* worker, Drawable *frame_drawable,
frame_drawable->frames_count = frames_count + 1;
frame_drawable->gradual_frames_count = gradual_frames_count;
- if (frame_drawable->copy_bitmap_graduality != BITMAP_GRADUAL_FALSE) {
+ if (frame_drawable->copy_bitmap_graduality != BITMAP_GRADUAL_LOW) {
if ((frame_drawable->frames_count - last_gradual_frame) >
RED_STREAM_FRAMES_RESET_CONDITION) {
frame_drawable->frames_count = 1;
@@ -5388,11 +5385,16 @@ typedef uint16_t rgb16_pixel_t;
#define RED_BITMAP_UTILS_RGB32
#include "red_bitmap_utils.h"
-#define GRADUAL_SCORE_RGB24_TH -0.03
-#define GRADUAL_SCORE_RGB16_TH 0
+#define GRADUAL_HIGH_RGB24_TH -0.03
+#define GRADUAL_HIGH_RGB16_TH 0
+
+// setting a more permissive threshold for stream identification in order
+// not to miss streams that were artificially scaled on the guest (e.g., full screen view
+// in window media player 12). see red_stream_add_frame
+#define GRADUAL_MEDIUM_SCORE_TH 0.002
// assumes that stride doesn't overflow
-static int _bitmap_is_gradual(RedWorker *worker, SpiceBitmap *bitmap, uint32_t group_id)
+static BitmapGradualType _get_bitmap_graduality_level(RedWorker *worker, SpiceBitmap *bitmap, uint32_t group_id)
{
double score = 0.0;
int num_samples = 0;
@@ -5477,9 +5479,19 @@ static int _bitmap_is_gradual(RedWorker *worker, SpiceBitmap *bitmap, uint32_t g
score /= num_samples;
if (bitmap->format == SPICE_BITMAP_FMT_16BIT) {
- return (score < GRADUAL_SCORE_RGB16_TH);
+ if (score < GRADUAL_HIGH_RGB16_TH) {
+ return BITMAP_GRADUAL_HIGH;
+ }
+ } else {
+ if (score < GRADUAL_HIGH_RGB24_TH) {
+ return BITMAP_GRADUAL_HIGH;
+ }
+ }
+
+ if (score < GRADUAL_MEDIUM_SCORE_TH) {
+ return BITMAP_GRADUAL_MEDIUM;
} else {
- return (score < GRADUAL_SCORE_RGB24_TH);
+ return BITMAP_GRADUAL_LOW;
}
}
@@ -5871,10 +5883,10 @@ static inline int red_compress_image(DisplayChannel *display_channel,
} else {
if (drawable->copy_bitmap_graduality == BITMAP_GRADUAL_INVALID) {
quic_compress = BITMAP_FMT_IS_RGB[src->format] &&
- _bitmap_is_gradual(display_channel->base.worker, src,
- drawable->group_id);
+ (_get_bitmap_graduality_level(display_channel->base.worker, src, drawable->group_id) ==
+ BITMAP_GRADUAL_HIGH);
} else {
- quic_compress = (drawable->copy_bitmap_graduality == BITMAP_GRADUAL_TRUE);
+ quic_compress = (drawable->copy_bitmap_graduality == BITMAP_GRADUAL_HIGH);
}
}
} else {
commit 77f6d705419034c8b191b13a66947a15ec8c4927
Author: Alon Levy <alevy at redhat.com>
Date: Wed Mar 10 21:19:53 2010 +0200
spice: client: fix handling of top down images in video streams
Top down streams arrive from x11-qxl driver.
diff --git a/client/display_channel.cpp b/client/display_channel.cpp
index 60e22fc..f303f57 100644
--- a/client/display_channel.cpp
+++ b/client/display_channel.cpp
@@ -129,8 +129,9 @@ static inline void yuv420_to_rgb(AVFrame* frame, uint8_t* data, uint32_t width,
ASSERT(width % 2 == 0);
ASSERT(height % 2 == 0);
+ /* turning it to be down to top */
if (top_down) {
- data += stride * height - 1;
+ data += stride * (height - 1);
stride = -stride;
}
@@ -334,16 +335,11 @@ VideoStream::VideoStream(RedClient& client, Canvas& canvas, DisplayChannel& chan
_pixmap.width = src_width;
_pixmap.height = src_height;
- if (top_down) {
- _pixmap.data = _uncompressed_data;
- _pixmap.stride = _stride;
- } else {
#ifdef WIN32
- SetViewportOrgEx(_dc, 0, stream_height - src_height, NULL);
+ SetViewportOrgEx(_dc, 0, stream_height - src_height, NULL);
#endif
- _pixmap.data = _uncompressed_data + _stride * (src_height - 1);
- _pixmap.stride = -_stride;
- }
+ _pixmap.data = _uncompressed_data + _stride * (src_height - 1);
+ _pixmap.stride = -_stride;
set_clip(clip_type, num_clip_rects, clip_rects);
commit d2edac47cd24103203405586e867b0bc038474e8
Author: Yonit Halperin <yhalperi at redhat.com>
Date: Tue Feb 2 16:05:44 2010 +0200
spice: server: avoid video streaming of small images
I added a lower limit to the size of images that are being streamed.
The limit is only active in "filter" video streaming mode.
This will prevent blurry animated icons.
diff --git a/server/red_worker.c b/server/red_worker.c
index d4f9743..9ef84a6 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -76,6 +76,7 @@
#define RED_STREAM_FRAMES_START_CONDITION 20
#define RED_STREAM_GRADUAL_FRAMES_START_CONDITION 0.2
#define RED_STREAM_FRAMES_RESET_CONDITION 100
+#define RED_STREAM_MIN_SIZE (96 * 96)
#define FPS_TEST_INTERVAL 1
#define MAX_FPS 30
@@ -3460,6 +3461,17 @@ static inline void red_update_streamable(RedWorker *worker, Drawable *drawable,
return;
}
+ if (worker->streaming_video == STREAM_VIDEO_FILTER) {
+ SpiceRect* rect;
+ int size;
+
+ rect = &drawable->qxl_drawable->u.copy.src_area;
+ size = (rect->right - rect->left) * (rect->bottom - rect->top);
+ if (size < RED_STREAM_MIN_SIZE) {
+ return;
+ }
+ }
+
drawable->streamable = TRUE;
}
commit fa3dddc0db4596b879f3fbfb71a18df1f7f49f3d
Author: Alexander Larsson <alexl at redhat.com>
Date: Wed Mar 24 15:08:57 2010 +0100
rename spice.pc to spice-server.pc
diff --git a/Makefile.am b/Makefile.am
index c5e5c7b..6640259 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
SUBDIRS = common server client
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = spice.pc
+pkgconfig_DATA = spice-server.pc
DISTCLEANFILES = \
- spice.pc
+ spice-server.pc
diff --git a/configure.ac b/configure.ac
index 331feed..aa9db5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -324,7 +324,7 @@ AC_SUBST([SPICEC_STATIC_LINKAGE_BDYNAMIC])
AC_OUTPUT([
Makefile
-spice.pc
+spice-server.pc
common/Makefile
common/linux/ffmpeg_inc.h
server/Makefile
diff --git a/spice-server.pc.in b/spice-server.pc.in
new file mode 100644
index 0000000..5639f4a
--- /dev/null
+++ b/spice-server.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: spice
+Description: SPICE server library
+Version: @VERSION@
+
+Requires: @SPICE_REQUIRES@
+Libs: -L${libdir} -lspice
+Libs.private: @SPICE_NONPKGCONFIG_LIBS@
+Cflags: -I${includedir}/libspice
diff --git a/spice.pc.in b/spice.pc.in
deleted file mode 100644
index 5639f4a..0000000
--- a/spice.pc.in
+++ /dev/null
@@ -1,13 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: spice
-Description: SPICE server library
-Version: @VERSION@
-
-Requires: @SPICE_REQUIRES@
-Libs: -L${libdir} -lspice
-Libs.private: @SPICE_NONPKGCONFIG_LIBS@
-Cflags: -I${includedir}/libspice
commit 1c98a3536b2eab04230fe5a6055b18c15fab5052
Author: Alexander Larsson <alexl at redhat.com>
Date: Wed Mar 24 14:49:37 2010 +0100
configure.ac: client: replace $(top_srcdir) in x11/Makefile.am (subdir config)
Replace all "$(top_srcdir)/common" with "$(SPICE_COMMON_DIR)"
and all "$(top_srcdir)/client" with custom "$(CLIENTDIR)"
This would (after following patches) enables building the client from
either spice/ (top directory) or spice/client.
diff --git a/client/x11/Makefile.am b/client/x11/Makefile.am
index b5fcdfc..ee92b33 100644
--- a/client/x11/Makefile.am
+++ b/client/x11/Makefile.am
@@ -1,5 +1,8 @@
NULL =
+COMMON_DIR=$(SPICE_COMMON_SRCDIR)
+CLIENT_DIR=$(top_srcdir)/client
+
SUBDIRS = images
INCLUDES = \
@@ -11,9 +14,9 @@ INCLUDES = \
-D__STDC_LIMIT_MACROS \
-I. \
-I.. \
- -I$(top_srcdir)/common \
- -I$(top_srcdir)/common/linux \
- -I$(top_srcdir)/client \
+ -I$(COMMON_DIR) \
+ -I$(COMMON_DIR)/linux \
+ -I$(CLIENT_DIR) \
$(PROTOCOL_CFLAGS) \
$(GL_CFLAGS) \
$(ALSA_CFLAGS) \
@@ -31,92 +34,92 @@ INCLUDES = \
RED_COMMON_SRCS = \
- $(top_srcdir)/client/application.cpp \
- $(top_srcdir)/client/application.h \
- $(top_srcdir)/client/audio_channels.h \
- $(top_srcdir)/client/audio_devices.h \
- $(top_srcdir)/client/cache.hpp \
- $(top_srcdir)/client/cairo_canvas.cpp \
- $(top_srcdir)/client/canvas.cpp \
- $(top_srcdir)/client/canvas.h \
- $(top_srcdir)/client/canvas_utils.cpp \
- $(top_srcdir)/client/red_cairo_canvas.cpp \
- $(top_srcdir)/client/red_cairo_canvas.h \
- $(top_srcdir)/client/cmd_line_parser.cpp \
- $(top_srcdir)/client/cmd_line_parser.h \
- $(top_srcdir)/client/client_net_socket.cpp \
- $(top_srcdir)/client/client_net_socket.h \
- $(top_srcdir)/client/common.h \
- $(top_srcdir)/client/cursor_channel.cpp \
- $(top_srcdir)/client/cursor_channel.h \
- $(top_srcdir)/client/cursor.cpp \
- $(top_srcdir)/client/cursor.h \
- $(top_srcdir)/client/debug.h \
- $(top_srcdir)/client/display_channel.cpp \
- $(top_srcdir)/client/display_channel.h \
- $(top_srcdir)/client/red_gl_canvas.cpp \
- $(top_srcdir)/client/red_gl_canvas.h \
- $(top_srcdir)/client/gl_canvas.cpp \
- $(top_srcdir)/client/glc.cpp \
- $(top_srcdir)/client/glz_decoded_image.h \
- $(top_srcdir)/client/glz_decoder_config.h \
- $(top_srcdir)/client/glz_decoder.cpp \
- $(top_srcdir)/client/glz_decoder.h \
- $(top_srcdir)/client/glz_decoder_window.cpp \
- $(top_srcdir)/client/glz_decoder_window.h \
- $(top_srcdir)/client/inputs_channel.cpp \
- $(top_srcdir)/client/inputs_channel.h \
- $(top_srcdir)/client/inputs_handler.h \
- $(top_srcdir)/client/lz.cpp \
- $(top_srcdir)/client/lines.cpp \
- $(top_srcdir)/client/monitor.cpp \
- $(top_srcdir)/client/monitor.h \
- $(top_srcdir)/client/mem.cpp \
- $(top_srcdir)/client/menu.cpp \
- $(top_srcdir)/client/menu.h \
- $(top_srcdir)/client/pixels_source.h \
- $(top_srcdir)/client/pixman_utils.cpp \
- $(top_srcdir)/client/platform.h \
- $(top_srcdir)/client/playback_channel.cpp \
- $(top_srcdir)/client/process_loop.cpp \
- $(top_srcdir)/client/quic.cpp \
- $(top_srcdir)/client/record_channel.cpp \
- $(top_srcdir)/client/red_channel.cpp \
- $(top_srcdir)/client/red_channel.h \
- $(top_srcdir)/client/red_client.cpp \
- $(top_srcdir)/client/red_client.h \
- $(top_srcdir)/client/red_drawable.h \
- $(top_srcdir)/client/red_key.h \
- $(top_srcdir)/client/red_peer.cpp \
- $(top_srcdir)/client/red_peer.h \
- $(top_srcdir)/client/red_pixmap_cairo.h \
- $(top_srcdir)/client/red_pixmap_gl.h \
- $(top_srcdir)/client/red_pixmap.h \
- $(top_srcdir)/client/red_types.h \
- $(top_srcdir)/client/red_window.h \
- $(top_srcdir)/client/region.cpp \
- $(top_srcdir)/client/rop3.cpp \
- $(top_srcdir)/client/screen.cpp \
- $(top_srcdir)/client/screen.h \
- $(top_srcdir)/client/screen_layer.cpp \
- $(top_srcdir)/client/screen_layer.h \
- $(top_srcdir)/client/shared_cache.hpp \
- $(top_srcdir)/client/hot_keys.cpp \
- $(top_srcdir)/client/hot_keys.h \
- $(top_srcdir)/client/threads.cpp \
- $(top_srcdir)/client/tunnel_channel.cpp \
- $(top_srcdir)/client/tunnel_channel.h \
- $(top_srcdir)/client/utils.cpp \
- $(top_srcdir)/client/utils.h \
- $(top_srcdir)/client/icon.h \
- $(top_srcdir)/client/gui/softrenderer.h \
- $(top_srcdir)/client/gui/softrenderer.cpp \
- $(top_srcdir)/client/gui/softtexture.h \
- $(top_srcdir)/client/gui/softtexture.cpp \
- $(top_srcdir)/client/gui/resource_provider.h \
- $(top_srcdir)/client/gui/resource_provider.cpp \
- $(top_srcdir)/client/gui/gui.h \
- $(top_srcdir)/client/gui/gui.cpp \
+ $(CLIENT_DIR)/application.cpp \
+ $(CLIENT_DIR)/application.h \
+ $(CLIENT_DIR)/audio_channels.h \
+ $(CLIENT_DIR)/audio_devices.h \
+ $(CLIENT_DIR)/cache.hpp \
+ $(CLIENT_DIR)/cairo_canvas.cpp \
+ $(CLIENT_DIR)/canvas.cpp \
+ $(CLIENT_DIR)/canvas.h \
+ $(CLIENT_DIR)/canvas_utils.cpp \
+ $(CLIENT_DIR)/red_cairo_canvas.cpp \
+ $(CLIENT_DIR)/red_cairo_canvas.h \
+ $(CLIENT_DIR)/cmd_line_parser.cpp \
+ $(CLIENT_DIR)/cmd_line_parser.h \
+ $(CLIENT_DIR)/client_net_socket.cpp \
+ $(CLIENT_DIR)/client_net_socket.h \
+ $(CLIENT_DIR)/common.h \
+ $(CLIENT_DIR)/cursor_channel.cpp \
+ $(CLIENT_DIR)/cursor_channel.h \
+ $(CLIENT_DIR)/cursor.cpp \
+ $(CLIENT_DIR)/cursor.h \
+ $(CLIENT_DIR)/debug.h \
+ $(CLIENT_DIR)/display_channel.cpp \
+ $(CLIENT_DIR)/display_channel.h \
+ $(CLIENT_DIR)/red_gl_canvas.cpp \
+ $(CLIENT_DIR)/red_gl_canvas.h \
+ $(CLIENT_DIR)/gl_canvas.cpp \
+ $(CLIENT_DIR)/glc.cpp \
+ $(CLIENT_DIR)/glz_decoded_image.h \
+ $(CLIENT_DIR)/glz_decoder_config.h \
+ $(CLIENT_DIR)/glz_decoder.cpp \
+ $(CLIENT_DIR)/glz_decoder.h \
+ $(CLIENT_DIR)/glz_decoder_window.cpp \
+ $(CLIENT_DIR)/glz_decoder_window.h \
+ $(CLIENT_DIR)/inputs_channel.cpp \
+ $(CLIENT_DIR)/inputs_channel.h \
+ $(CLIENT_DIR)/inputs_handler.h \
+ $(CLIENT_DIR)/lz.cpp \
+ $(CLIENT_DIR)/lines.cpp \
+ $(CLIENT_DIR)/monitor.cpp \
+ $(CLIENT_DIR)/monitor.h \
+ $(CLIENT_DIR)/mem.cpp \
+ $(CLIENT_DIR)/menu.cpp \
+ $(CLIENT_DIR)/menu.h \
+ $(CLIENT_DIR)/pixels_source.h \
+ $(CLIENT_DIR)/pixman_utils.cpp \
+ $(CLIENT_DIR)/platform.h \
+ $(CLIENT_DIR)/playback_channel.cpp \
+ $(CLIENT_DIR)/process_loop.cpp \
+ $(CLIENT_DIR)/quic.cpp \
+ $(CLIENT_DIR)/record_channel.cpp \
+ $(CLIENT_DIR)/red_channel.cpp \
+ $(CLIENT_DIR)/red_channel.h \
+ $(CLIENT_DIR)/red_client.cpp \
+ $(CLIENT_DIR)/red_client.h \
+ $(CLIENT_DIR)/red_drawable.h \
+ $(CLIENT_DIR)/red_key.h \
+ $(CLIENT_DIR)/red_peer.cpp \
+ $(CLIENT_DIR)/red_peer.h \
+ $(CLIENT_DIR)/red_pixmap_cairo.h \
+ $(CLIENT_DIR)/red_pixmap_gl.h \
+ $(CLIENT_DIR)/red_pixmap.h \
+ $(CLIENT_DIR)/red_types.h \
+ $(CLIENT_DIR)/red_window.h \
+ $(CLIENT_DIR)/region.cpp \
+ $(CLIENT_DIR)/rop3.cpp \
+ $(CLIENT_DIR)/screen.cpp \
+ $(CLIENT_DIR)/screen.h \
+ $(CLIENT_DIR)/screen_layer.cpp \
+ $(CLIENT_DIR)/screen_layer.h \
+ $(CLIENT_DIR)/shared_cache.hpp \
+ $(CLIENT_DIR)/hot_keys.cpp \
+ $(CLIENT_DIR)/hot_keys.h \
+ $(CLIENT_DIR)/threads.cpp \
+ $(CLIENT_DIR)/tunnel_channel.cpp \
+ $(CLIENT_DIR)/tunnel_channel.h \
+ $(CLIENT_DIR)/utils.cpp \
+ $(CLIENT_DIR)/utils.h \
+ $(CLIENT_DIR)/icon.h \
+ $(CLIENT_DIR)/gui/softrenderer.h \
+ $(CLIENT_DIR)/gui/softrenderer.cpp \
+ $(CLIENT_DIR)/gui/softtexture.h \
+ $(CLIENT_DIR)/gui/softtexture.cpp \
+ $(CLIENT_DIR)/gui/resource_provider.h \
+ $(CLIENT_DIR)/gui/resource_provider.cpp \
+ $(CLIENT_DIR)/gui/gui.h \
+ $(CLIENT_DIR)/gui/gui.cpp \
$(NULL)
bin_PROGRAMS = spicec
commit be45068b0a13965131b385814041f86aa98b1edd
Author: Uri Lublin <uril at redhat.com>
Date: Wed Dec 30 15:34:56 2009 +0200
configure.ac: define SPICE_COMMON_SRCDIR, to be used by Makefile.am (subdir config)
Note that SPICE_COMMON_SRCDIR may be overwritten by configure.ac.shared
Signed-off-by: Uri Lublin <uril at redhat.com>
diff --git a/configure.ac b/configure.ac
index 3f8190f..331feed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,6 +13,9 @@ AC_CONFIG_AUX_DIR(.)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
+# Define default SPICE_COMMON_SRCDIR
+SPICE_COMMON_SRCDIR='$(top_srcdir)'/common
+
AS_IF([test "$CFLAGS" = ""], [], [_cflags_is_set=yes])
AC_PROG_CC
AS_IF([test "$CXXFLAGS" = ""], [], [_cxxflags_is_set=yes])
@@ -311,7 +314,7 @@ fi
AC_MSG_RESULT($have_gcc4)
AC_SUBST(VISIBILITY_HIDDEN_CFLAGS)
-
+AC_SUBST(SPICE_COMMON_SRCDIR)
AC_SUBST(SPICE_REQUIRES)
AC_SUBST(SPICE_NONPKGCONFIG_CFLAGS)
AC_SUBST(SPICE_NONPKGCONFIG_LIBS)
@@ -339,7 +342,7 @@ echo "
prefix: ${prefix}
c compiler: ${CC}
c++ compiler: ${CXX}
-
+
Have XRANDR 1.2: ${have_xrandr12}
Red target: ${red_target}
commit 287b1cd38903d611bc320ca5261eb5dcd8d49e16
Author: Uri Lublin <uril at redhat.com>
Date: Wed Dec 30 15:34:56 2009 +0200
autogen: exit upon errors (subdir config)
Signed-off-by: Uri Lublin <uril at redhat.com>
diff --git a/autogen.sh b/autogen.sh
index d004e93..2619803 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,5 +1,7 @@
#! /bin/sh
+set -e # exit on errors
+
# FIXME: can replace this entire script with
# the following line if we can require autoconf 2.60:
# autoreconf -v --force --install || exit 1
commit 7da0ccc65e2ef09e89e010399cbcbba2797dd633
Author: Uri Lublin <uril at redhat.com>
Date: Wed Dec 30 15:34:56 2009 +0200
autogen: add possibly missing AUTOMAKE definition (subdir config)
Signed-off-by: Uri Lublin <uril at redhat.com>
diff --git a/autogen.sh b/autogen.sh
index 3a9b993..d004e93 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -10,6 +10,7 @@ ACLOCAL_FLAGS=""
LIBTOOLIZE=${LIBTOOLIZE-libtoolize}
LIBTOOLIZE_FLAGS="--copy --force"
AUTOHEADER=${AUTOHEADER-autoheader}
+AUTOMAKE=${AUTOMAKE-automake}
AUTOMAKE_FLAGS="--add-missing --gnu"
AUTOCONF=${AUTOCONF-autoconf}
commit 3b58f557afc7b435e5083803ea62620d5b26f9ee
Author: Uri Lublin <uril at redhat.com>
Date: Wed Dec 30 15:34:56 2009 +0200
autogen: remove copied code - srcdir and ORIGDIR (subdir config)
Signed-off-by: Uri Lublin <uril at redhat.com>
diff --git a/autogen.sh b/autogen.sh
index 9bba4d7..3a9b993 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,11 +1,5 @@
#! /bin/sh
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd $srcdir
-
# FIXME: can replace this entire script with
# the following line if we can require autoconf 2.60:
# autoreconf -v --force --install || exit 1
@@ -39,6 +33,7 @@ srcdir=`dirname $ARGV0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
+cd $srcdir
# Not all echo versions allow -n, so we check what is possible. This test is
# based on the one in autoconf.
@@ -156,7 +151,6 @@ do_cmd() {
# Run for top level directory
printbold "Setting up $PACKAGE toplevel"
-cd $srcdir
do_cmd $LIBTOOLIZE $LIBTOOLIZE_FLAGS
do_cmd $ACLOCAL $ACLOCAL_FLAGS
do_cmd $AUTOHEADER
More information about the Spice-commits
mailing list