diff options
-rw-r--r-- | src/Makefile.am | 9 | ||||
-rw-r--r-- | src/pulse/def.h | 39 | ||||
-rw-r--r-- | src/pulsecore/protocol-native.c | 4 |
3 files changed, 30 insertions, 22 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 4009deb4..b89e7d8e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -48,6 +48,7 @@ AM_CFLAGS = \ $(PTHREAD_CFLAGS) \ -DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \ -DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\" +SERVER_CFLAGS = -D__INCLUDED_FROM_PULSE_AUDIO AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS) AM_LDADD = $(PTHREAD_LIBS) $(INTLLIBS) @@ -819,7 +820,7 @@ libpulsecore_@PA_MAJORMINOR@_la_SOURCES = \ pulsecore/time-smoother.c pulsecore/time-smoother.h \ pulsecore/database.h -libpulsecore_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(LIBSAMPLERATE_CFLAGS) $(LIBSPEEX_CFLAGS) $(LIBSNDFILE_CFLAGS) $(WINSOCK_CFLAGS) +libpulsecore_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) $(LIBSAMPLERATE_CFLAGS) $(LIBSPEEX_CFLAGS) $(LIBSNDFILE_CFLAGS) $(WINSOCK_CFLAGS) libpulsecore_@PA_MAJORMINOR@_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version libpulsecore_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSPEEX_LIBS) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LTLIBICONV) libpulsecommon-@PA_MAJORMINOR@.la libpulse.la libpulsecore-foreign.la @@ -914,7 +915,7 @@ libprotocol_http_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version libprotocol_http_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la libprotocol_native_la_SOURCES = pulsecore/protocol-native.c pulsecore/protocol-native.h pulsecore/native-common.h -libprotocol_native_la_CFLAGS = $(AM_CFLAGS) +libprotocol_native_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) libprotocol_native_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version libprotocol_native_la_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la libpulsecommon-@PA_MAJORMINOR@.la libpulse.la if HAVE_DBUS @@ -1485,10 +1486,12 @@ module_loopback_la_LDFLAGS = $(MODULE_LDFLAGS) module_loopback_la_LIBADD = $(MODULE_LIBADD) module_virtual_sink_la_SOURCES = modules/module-virtual-sink.c +module_virtual_sink_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) module_virtual_sink_la_LDFLAGS = $(MODULE_LDFLAGS) module_virtual_sink_la_LIBADD = $(MODULE_LIBADD) module_virtual_source_la_SOURCES = modules/module-virtual-source.c +module_virtual_source_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) module_virtual_source_la_LDFLAGS = $(MODULE_LDFLAGS) module_virtual_source_la_LIBADD = $(MODULE_LIBADD) @@ -1548,7 +1551,7 @@ libalsa_util_la_SOURCES = \ modules/reserve-wrap.c modules/reserve-wrap.h libalsa_util_la_LDFLAGS = -avoid-version libalsa_util_la_LIBADD = $(MODULE_LIBADD) $(ASOUNDLIB_LIBS) -libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS) +libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(SERVER_CFLAGS) $(ASOUNDLIB_CFLAGS) if HAVE_HAL libalsa_util_la_SOURCES += modules/hal-util.h modules/hal-util.c diff --git a/src/pulse/def.h b/src/pulse/def.h index 5e2626c9..f43e8646 100644 --- a/src/pulse/def.h +++ b/src/pulse/def.h @@ -753,24 +753,26 @@ typedef enum pa_sink_flags { /**< The latency can be adjusted dynamically depending on the * needs of the connected streams. \since 0.9.15 */ - PA_SINK_DEFERRED_VOLUME = 0x0100U, - /**< The HW volume changes are syncronized with SW volume. - * \since 1.0 */ + PA_SINK_SET_FORMATS = 0x0100U, + /**< The sink allows setting what formats are supported by the connected + * hardware. The actual functionality to do this might be provided by an + * extension. \since 1.0 */ +#ifdef __INCLUDED_FROM_PULSE_AUDIO /** \cond fulldocs */ /* PRIVATE: Server-side values -- do not try to use these at client-side. * The server will filter out these flags anyway, so you should never see * these flags in sinks. */ - PA_SINK_SHARE_VOLUME_WITH_MASTER = 0x0200U, + PA_SINK_SHARE_VOLUME_WITH_MASTER = 0x1000000U, /**< This sink shares the volume with the master sink (used by some filter * sinks). */ + + PA_SINK_DEFERRED_VOLUME = 0x2000000U, + /**< The HW volume changes are syncronized with SW volume. */ /** \endcond */ +#endif - PA_SINK_SET_FORMATS = 0x0400U, - /**< The sink allows setting what formats are supported by the connected - * hardware. The actual functionality to do this might be provided by an - * extension. \since 1.0 */ } pa_sink_flags_t; /** \cond fulldocs */ @@ -782,9 +784,10 @@ typedef enum pa_sink_flags { #define PA_SINK_DECIBEL_VOLUME PA_SINK_DECIBEL_VOLUME #define PA_SINK_FLAT_VOLUME PA_SINK_FLAT_VOLUME #define PA_SINK_DYNAMIC_LATENCY PA_SINK_DYNAMIC_LATENCY -#define PA_SINK_DEFERRED_VOLUME PA_SINK_DEFERRED_VOLUME -#define PA_SINK_SHARE_VOLUME_WITH_MASTER PA_SINK_SHARE_VOLUME_WITH_MASTER #define PA_SINK_SET_FORMATS PA_SINK_SET_FORMATS +#ifdef __INCLUDED_FROM_PULSE_AUDIO +#define PA_SINK_CLIENT_FLAGS_MASK 0xFFFFFF +#endif /** \endcond */ @@ -869,18 +872,19 @@ typedef enum pa_source_flags { /**< This source is in flat volume mode, i.e. always the maximum of * the volume of all connected outputs. \since 1.0 */ - PA_SOURCE_DEFERRED_VOLUME = 0x0100U, - /**< The HW volume changes are syncronized with SW volume. - * \since 1.0 */ - +#ifdef __INCLUDED_FROM_PULSE_AUDIO /** \cond fulldocs */ /* PRIVATE: Server-side values -- do not try to use these at client-side. * The server will filter out these flags anyway, so you should never see * these flags in sources. */ - PA_SOURCE_SHARE_VOLUME_WITH_MASTER = 0x0200U, + PA_SOURCE_SHARE_VOLUME_WITH_MASTER = 0x1000000U, /**< This source shares the volume with the master source (used by some filter * sources). */ + + PA_SOURCE_DEFERRED_VOLUME = 0x2000000U, + /**< The HW volume changes are syncronized with SW volume. */ +#endif } pa_source_flags_t; /** \cond fulldocs */ @@ -892,8 +896,9 @@ typedef enum pa_source_flags { #define PA_SOURCE_DECIBEL_VOLUME PA_SOURCE_DECIBEL_VOLUME #define PA_SOURCE_DYNAMIC_LATENCY PA_SOURCE_DYNAMIC_LATENCY #define PA_SOURCE_FLAT_VOLUME PA_SOURCE_FLAT_VOLUME -#define PA_SOURCE_DEFERRED_VOLUME PA_SOURCE_DEFERRED_VOLUME -#define PA_SOURCE_SHARE_VOLUME_WITH_MASTER PA_SOURCE_SHARE_VOLUME_WITH_MASTER +#ifdef __INCLUDED_FROM_PULSE_AUDIO +#define PA_SOURCE_CLIENT_FLAGS_MASK 0xFFFFFF +#endif /** \endcond */ diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 3cffecb4..e8714784 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -3066,7 +3066,7 @@ static void sink_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_sin PA_TAG_STRING, sink->monitor_source ? sink->monitor_source->name : NULL, PA_TAG_USEC, pa_sink_get_latency(sink), PA_TAG_STRING, sink->driver, - PA_TAG_U32, sink->flags & ~PA_SINK_SHARE_VOLUME_WITH_MASTER, + PA_TAG_U32, sink->flags & PA_SINK_CLIENT_FLAGS_MASK, PA_TAG_INVALID); if (c->version >= 13) { @@ -3136,7 +3136,7 @@ static void source_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_s PA_TAG_STRING, source->monitor_of ? source->monitor_of->name : NULL, PA_TAG_USEC, pa_source_get_latency(source), PA_TAG_STRING, source->driver, - PA_TAG_U32, source->flags, + PA_TAG_U32, source->flags & PA_SOURCE_CLIENT_FLAGS_MASK, PA_TAG_INVALID); if (c->version >= 13) { |