[Spice-commits] 2 commits - configure.ac server/red_common.h server/red_dispatcher.c server/reds.c server/red_worker.c
Jonathon Jongsma
jjongsma at kemper.freedesktop.org
Mon Jun 15 11:09:06 PDT 2015
configure.ac | 31 ++++++++++++++++---------------
server/red_common.h | 7 -------
server/red_dispatcher.c | 4 ++--
server/red_worker.c | 14 +++++++-------
server/reds.c | 2 +-
5 files changed, 26 insertions(+), 32 deletions(-)
New commits:
commit a94836a467a942f32ed5cc88d2941101c995f355
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date: Fri Jun 12 10:41:42 2015 -0500
Remove duplicate streaming enumeration
There is already a enumeration in a public header that defines the
different streaming options, so there's no need to duplicate that
enumeration internally. Just use the public enum values.
diff --git a/server/red_common.h b/server/red_common.h
index b6b643a..2b1c7ae 100644
--- a/server/red_common.h
+++ b/server/red_common.h
@@ -31,13 +31,6 @@
#define SPICE_GNUC_VISIBLE __attribute__ ((visibility ("default")))
-enum {
- STREAM_VIDEO_INVALID,
- STREAM_VIDEO_OFF,
- STREAM_VIDEO_ALL,
- STREAM_VIDEO_FILTER
-};
-
static const LzImageType MAP_BITMAP_FMT_TO_LZ_IMAGE_TYPE[] = {
LZ_IMAGE_TYPE_INVALID,
LZ_IMAGE_TYPE_PLT1_LE,
diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c
index f5f3e52..74adaa2 100644
--- a/server/red_dispatcher.c
+++ b/server/red_dispatcher.c
@@ -743,8 +743,8 @@ static void qxl_worker_loadvm_commands(QXLWorker *qxl_worker,
static inline int calc_compression_level(void)
{
- spice_assert(streaming_video != STREAM_VIDEO_INVALID);
- if ((streaming_video != STREAM_VIDEO_OFF) ||
+ spice_assert(streaming_video != SPICE_STREAM_VIDEO_INVALID);
+ if ((streaming_video != SPICE_STREAM_VIDEO_OFF) ||
(image_compression != SPICE_IMAGE_COMPRESS_QUIC)) {
return 0;
} else {
diff --git a/server/red_worker.c b/server/red_worker.c
index 5deb30b..a51b670 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -3404,7 +3404,7 @@ static inline void red_update_copy_graduality(RedWorker* worker, Drawable *drawa
SpiceBitmap *bitmap;
spice_assert(drawable->red_drawable->type == QXL_DRAW_COPY);
- if (worker->streaming_video != STREAM_VIDEO_FILTER) {
+ if (worker->streaming_video != SPICE_STREAM_VIDEO_FILTER) {
drawable->copy_bitmap_graduality = BITMAP_GRADUAL_INVALID;
return;
}
@@ -3883,7 +3883,7 @@ static inline void red_update_streamable(RedWorker *worker, Drawable *drawable,
{
SpiceImage *image;
- if (worker->streaming_video == STREAM_VIDEO_OFF) {
+ if (worker->streaming_video == SPICE_STREAM_VIDEO_OFF) {
return;
}
@@ -3903,7 +3903,7 @@ static inline void red_update_streamable(RedWorker *worker, Drawable *drawable,
return;
}
- if (worker->streaming_video == STREAM_VIDEO_FILTER) {
+ if (worker->streaming_video == SPICE_STREAM_VIDEO_FILTER) {
SpiceRect* rect;
int size;
@@ -11774,15 +11774,15 @@ void handle_dev_set_streaming_video(void *opaque, void *payload)
RedWorker *worker = opaque;
worker->streaming_video = msg->streaming_video;
- spice_assert(worker->streaming_video != STREAM_VIDEO_INVALID);
+ spice_assert(worker->streaming_video != SPICE_STREAM_VIDEO_INVALID);
switch(worker->streaming_video) {
- case STREAM_VIDEO_ALL:
+ case SPICE_STREAM_VIDEO_ALL:
spice_info("sv all");
break;
- case STREAM_VIDEO_FILTER:
+ case SPICE_STREAM_VIDEO_FILTER:
spice_info("sv filter");
break;
- case STREAM_VIDEO_OFF:
+ case SPICE_STREAM_VIDEO_OFF:
spice_info("sv off");
break;
default:
diff --git a/server/reds.c b/server/reds.c
index 3a38258..12c0bf4 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -110,7 +110,7 @@ static uint8_t spice_uuid[16] = { 0, };
static int ticketing_enabled = 1; //Ticketing is enabled by default
static pthread_mutex_t *lock_cs;
static long *lock_count;
-uint32_t streaming_video = STREAM_VIDEO_FILTER;
+uint32_t streaming_video = SPICE_STREAM_VIDEO_FILTER;
spice_image_compression_t image_compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ;
spice_wan_compression_t jpeg_state = SPICE_WAN_COMPRESSION_AUTO;
spice_wan_compression_t zlib_glz_state = SPICE_WAN_COMPRESSION_AUTO;
commit edc52a4ead75ddc836b5f693d8d41f6b1fe4c1b8
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date: Thu Jun 11 16:20:13 2015 -0500
Use AS_HELP_STRING for configure options
diff --git a/configure.ac b/configure.ac
index 7a9fc4b..1802ff1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,30 +70,31 @@ esac
dnl =========================================================================
dnl Check optional features
-AC_ARG_ENABLE(opengl,
-[ --enable-opengl Enable opengl requirement / support (not recommended)],,
-[enable_opengl="no"])
+AC_ARG_ENABLE([opengl],
+ AS_HELP_STRING([--enable-opengl],
+ [Enable opengl requirement / support (not recommended)]),,
+ [enable_opengl="no"])
AS_IF([test x"$enable_opengl" != "xno"], [enable_opengl="yes"])
AM_CONDITIONAL(SUPPORT_GL, test "x$enable_opengl" = "xyes")
-AC_ARG_ENABLE(lz4,
-[ --enable-lz4 Enable lz4 compression algorithm],,
-[enable_lz4="no"])
+AC_ARG_ENABLE([lz4],
+ AS_HELP_STRING([--enable-lz4],[Enable lz4 compression algorithm]),,
+ [enable_lz4="no"])
AS_IF([test x"$enable_lz4" != "xno"], [enable_lz4="yes"])
AM_CONDITIONAL(SUPPORT_LZ4, test "x$enable_lz4" = "xyes")
-AC_ARG_ENABLE(smartcard,
-[ --enable-smartcard Enable network redirection],,
-[enable_smartcard="no"])
+AC_ARG_ENABLE([smartcard],
+ AS_HELP_STRING([--enable-smartcard], [Enable network redirection]),,
+ [enable_smartcard="no"])
AS_IF([test x"$enable_smartcard" != "xno"], [enable_smartcard="yes"])
AM_CONDITIONAL(SUPPORT_SMARTCARD, test "x$enable_smartcard" != "xno")
if test "x$enable_smartcard" = "xyes"; then
AC_DEFINE([USE_SMARTCARD], [1], [Define if supporting smartcard proxying])
fi
-AC_ARG_ENABLE(automated_tests,
-[ --enable-automated-tests Enable automated tests using spicy-screenshot (part of spice--gtk)],,
-[enable_automated_tests="no"])
+AC_ARG_ENABLE([automated_tests],
+ AS_HELP_STRING([--enable-automated-tests], [Enable automated tests using spicy-screenshot (part of spice--gtk)]),,
+ [enable_automated_tests="no"])
AS_IF([test x"$enable_automated_tests" != "xno"], [enable_automated_tests="yes"])
AM_CONDITIONAL(SUPPORT_AUTOMATED_TESTS, test "x$enable_automated_tests" != "xno")
@@ -136,9 +137,9 @@ AC_SUBST(PIXMAN_CFLAGS)
AC_SUBST(PIXMAN_LIBS)
AS_VAR_APPEND([SPICE_REQUIRES], [" pixman-1 >= 0.17.7"])
-AC_ARG_ENABLE(celt051,
- [ --disable-celt051 Disable celt051 audio codec (enabled by default)],,
- [enable_celt051="yes"])
+AC_ARG_ENABLE([celt051],
+ AS_HELP_STRING([--disable-celt051], [Disable celt051 audio codec (enabled by default)]),,
+ [enable_celt051="yes"])
if test "x$enable_celt051" = "xyes"; then
PKG_CHECK_MODULES(CELT051, celt051 >= 0.5.1.1, AS_VAR_APPEND([SPICE_REQUIRES], [" celt051 >= 0.5.1.1"]))
More information about the Spice-commits
mailing list