From 7f93d08d4014cc68965611068c47834c1e5547ef Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 1 Aug 2006 21:04:43 +0000 Subject: [PATCH] bump API and protocol version. Return PA_ERR_NOTSUPPORTED if pa_context_move_sink_input_by_*()is called for servers that don't support it git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1179 fefdeb5f-60dc-0310-8127-8f9354f1896f --- configure.ac | 4 ++-- src/pulse/def.h | 1 + src/pulse/introspect.c | 2 ++ src/utils/pacat.c | 2 +- src/utils/pactl.c | 2 +- src/utils/paplay.c | 2 +- todo | 2 +- 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index e6b09c5..26fd860 100644 --- a/configure.ac +++ b/configure.ac @@ -33,8 +33,8 @@ AM_INIT_AUTOMAKE([foreign -Wall]) AC_SUBST(PA_MAJORMINOR, "PA_MAJOR.PA_MINOR") AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/pulseaudio/]) -AC_SUBST(PA_API_VERSION, 9) -AC_SUBST(PA_PROTOCOL_VERSION, 9) +AC_SUBST(PA_API_VERSION, 10) +AC_SUBST(PA_PROTOCOL_VERSION, 10) AC_SUBST(LIBPULSE_VERSION_INFO, [0:2:0]) AC_SUBST(LIBPULSECORE_VERSION_INFO, [1:1:0]) diff --git a/src/pulse/def.h b/src/pulse/def.h index 01ed0f6..a22e3c1 100644 --- a/src/pulse/def.h +++ b/src/pulse/def.h @@ -161,6 +161,7 @@ enum { PA_ERR_NODATA, /**< No data */ PA_ERR_VERSION, /**< Incompatible protocol version \since 0.8 */ PA_ERR_TOOLARGE, /**< Data too large \since 0.8.1 */ + PA_ERR_NOTSUPPORTED, /**< Operation not supported \since 0.9.5 */ PA_ERR_MAX /**< Not really an error but the first invalid error code */ }; diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c index 8aaf8b3..d750bbd 100644 --- a/src/pulse/introspect.c +++ b/src/pulse/introspect.c @@ -1248,6 +1248,7 @@ pa_operation* pa_context_move_sink_input_by_name(pa_context *c, uint32_t idx, ch assert(c->ref >= 1); PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE); + PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 10, PA_ERR_NOTSUPPORTED); PA_CHECK_VALIDITY_RETURN_NULL(c, idx != PA_INVALID_INDEX, PA_ERR_INVALID); PA_CHECK_VALIDITY_RETURN_NULL(c, sink_name && *sink_name, PA_ERR_INVALID); @@ -1272,6 +1273,7 @@ pa_operation* pa_context_move_sink_input_by_index(pa_context *c, uint32_t idx, u assert(c->ref >= 1); PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE); + PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 10, PA_ERR_NOTSUPPORTED); PA_CHECK_VALIDITY_RETURN_NULL(c, idx != PA_INVALID_INDEX, PA_ERR_INVALID); PA_CHECK_VALIDITY_RETURN_NULL(c, sink_idx != PA_INVALID_INDEX, PA_ERR_INVALID); diff --git a/src/utils/pacat.c b/src/utils/pacat.c index dda5c19..1c581f4 100644 --- a/src/utils/pacat.c +++ b/src/utils/pacat.c @@ -37,7 +37,7 @@ #define TIME_EVENT_USEC 50000 -#if PA_API_VERSION != 9 +#if PA_API_VERSION < 9 #error Invalid PulseAudio API version #endif diff --git a/src/utils/pactl.c b/src/utils/pactl.c index 3674f95..0fde33e 100644 --- a/src/utils/pactl.c +++ b/src/utils/pactl.c @@ -37,7 +37,7 @@ #include -#if PA_API_VERSION != 9 +#if PA_API_VERSION < 10 #error Invalid PulseAudio API version #endif diff --git a/src/utils/paplay.c b/src/utils/paplay.c index 7b34016..0386c9d 100644 --- a/src/utils/paplay.c +++ b/src/utils/paplay.c @@ -37,7 +37,7 @@ #include -#if PA_API_VERSION != 9 +#if PA_API_VERSION < 9 #error Invalid PulseAudio API version #endif diff --git a/todo b/todo index 8d0105f..cdd8b87 100644 --- a/todo +++ b/todo @@ -28,7 +28,7 @@ Post 0.9.0: - Document utf8.h, timeval.h and util.h - gettextify polypaudio - drop dependency of libpolyp on libX11, instead use an external mini binary -- "hot" moving of streams between sinks +- "hot" moving of recording streams between sources - hooks for creating sink inputs - insert the low-level device name in the default sink/source name, to make them recognizable - ssl -- 2.7.4