[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.11-202-ga609e4a
Lennart Poettering
gitmailer-noreply at 0pointer.de
Thu Sep 4 16:31:51 PDT 2008
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from 456284918ab04cde6c661839d706cb84baf3a887 (commit)
- Log -----------------------------------------------------------------
a609e4a... check for errors returned by pa_context_connect()
3f6f13f... use pa_channel_map_compatible() where applicable
b56f344... a few minor clean-ups
3429072... introduce upper channel map definition limit PA_CHANNEL_MAP_DEF_MAX
ece297f... update map file
cb0c97d... add new API function pa_channel_map_compatible()
5a9a602... update map-file script to ignore gcc malloc attributes
-----------------------------------------------------------------------
Summary of changes:
src/Makefile.am | 2 +-
src/map-file | 2 ++
src/pulse/channelmap.c | 22 +++++++++++++---------
src/pulse/channelmap.h | 9 ++++++++-
src/utils/pacat.c | 7 +++++--
5 files changed, 29 insertions(+), 13 deletions(-)
-----------------------------------------------------------------------
commit 5a9a6021f12ebfcdc071d07488723ab8c0adfd5f
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Sep 5 01:28:08 2008 +0200
update map-file script to ignore gcc malloc attributes
diff --git a/src/Makefile.am b/src/Makefile.am
index a20c7c4..3ee5372 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1625,7 +1625,7 @@ update-ffmpeg:
update-map-file:
( echo "PULSE_0 {" ; \
echo "global:" ; \
- ctags -I PA_GCC_PURE,PA_GCC_CONST,PA_GCC_DEPRECATED,PA_GCC_PRINTF_ATTR -f - --c-kinds=p $(pulseinclude_HEADERS) | awk '/^pa_/ { print $$1 ";" }' | sort ; \
+ ctags -I PA_GCC_MALLOC,PA_GCC_ALLOC_SIZE2,PA_GCC_ALLOC_SIZE,PA_GCC_PURE,PA_GCC_CONST,PA_GCC_DEPRECATED,PA_GCC_PRINTF_ATTR -f - --c-kinds=p $(pulseinclude_HEADERS) | awk '/^pa_/ { print $$1 ";" }' | sort ; \
echo "local:" ; \
echo "*;" ; \
echo "};" ) > $(srcdir)/map-file
commit cb0c97dae7655eda60cabc06df0d1da4666392ec
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Sep 5 01:29:07 2008 +0200
add new API function pa_channel_map_compatible()
diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index 1766e72..7a21998 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -560,3 +560,10 @@ int pa_channel_map_valid(const pa_channel_map *map) {
return 1;
}
+
+int pa_channel_map_compatible(const pa_channel_map *map, const pa_sample_spec *ss) {
+ pa_assert(map);
+ pa_assert(ss);
+
+ return map->channels == ss->channels;
+}
diff --git a/src/pulse/channelmap.h b/src/pulse/channelmap.h
index f9086d1..035f9b1 100644
--- a/src/pulse/channelmap.h
+++ b/src/pulse/channelmap.h
@@ -214,6 +214,10 @@ int pa_channel_map_equal(const pa_channel_map *a, const pa_channel_map *b) PA_GC
/** Return non-zero of the specified channel map is considered valid */
int pa_channel_map_valid(const pa_channel_map *map) PA_GCC_PURE;
+/** Return non-zero if the specified channel map is compatible with
+ * the specified sample spec. \since 0.9.12 */
+int pa_channel_map_compatible(const pa_channel_map *map, const pa_sample_spec *ss) PA_GCC_PURE;
+
PA_C_DECL_END
#endif
commit ece297f21b627dfb71e853a57dcacbd1bd5217bb
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Sep 5 01:29:24 2008 +0200
update map file
diff --git a/src/map-file b/src/map-file
index b6d3b63..67a5ee3 100644
--- a/src/map-file
+++ b/src/map-file
@@ -9,6 +9,7 @@ pa_browser_unref;
pa_bytes_per_second;
pa_bytes_snprint;
pa_bytes_to_usec;
+pa_channel_map_compatible;
pa_channel_map_equal;
pa_channel_map_init;
pa_channel_map_init_auto;
@@ -98,6 +99,7 @@ pa_context_unref;
pa_cvolume_avg;
pa_cvolume_channels_equal_to;
pa_cvolume_equal;
+pa_cvolume_max;
pa_cvolume_remap;
pa_cvolume_set;
pa_cvolume_snprint;
commit 34290725043274ddc88aeb203892f3d8bb7bbecf
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Sep 5 01:30:25 2008 +0200
introduce upper channel map definition limit PA_CHANNEL_MAP_DEF_MAX
diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index 7a21998..7df6d6d 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -198,6 +198,7 @@ pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, p
pa_assert(m);
pa_assert(channels > 0);
pa_assert(channels <= PA_CHANNELS_MAX);
+ pa_assert(def < PA_CHANNEL_MAP_DEF_MAX);
pa_channel_map_init(m);
@@ -391,7 +392,7 @@ pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, p
default:
- return NULL;
+ pa_assert_not_reached();
}
}
@@ -401,6 +402,7 @@ pa_channel_map* pa_channel_map_init_extend(pa_channel_map *m, unsigned channels,
pa_assert(m);
pa_assert(channels > 0);
pa_assert(channels <= PA_CHANNELS_MAX);
+ pa_assert(def < PA_CHANNEL_MAP_DEF_MAX);
pa_channel_map_init(m);
diff --git a/src/pulse/channelmap.h b/src/pulse/channelmap.h
index 035f9b1..d2dd6f8 100644
--- a/src/pulse/channelmap.h
+++ b/src/pulse/channelmap.h
@@ -157,6 +157,9 @@ typedef enum pa_channel_map_def {
PA_CHANNEL_MAP_OSS,
/**< The default channel mapping used by OSS as defined in the OSS 4.0 API specs */
+ /**< Upper limit of valid channel mapping definitions */
+ PA_CHANNEL_MAP_DEF_MAX,
+
PA_CHANNEL_MAP_DEFAULT = PA_CHANNEL_MAP_AIFF
/**< The default channel map */
} pa_channel_map_def_t;
@@ -211,7 +214,7 @@ pa_channel_map *pa_channel_map_parse(pa_channel_map *map, const char *s);
/** Compare two channel maps. Return 1 if both match. */
int pa_channel_map_equal(const pa_channel_map *a, const pa_channel_map *b) PA_GCC_PURE;
-/** Return non-zero of the specified channel map is considered valid */
+/** Return non-zero if the specified channel map is considered valid */
int pa_channel_map_valid(const pa_channel_map *map) PA_GCC_PURE;
/** Return non-zero if the specified channel map is compatible with
commit b56f344b97e9520828a76cf54d81663fa48cbd33
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Sep 5 01:30:48 2008 +0200
a few minor clean-ups
diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index 7df6d6d..3730875 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
@@ -288,9 +288,6 @@ pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, p
case PA_CHANNEL_MAP_AUX: {
unsigned i;
- if (channels >= PA_CHANNELS_MAX)
- return NULL;
-
for (i = 0; i < channels; i++)
m->map[i] = PA_CHANNEL_POSITION_AUX0 + i;
@@ -491,7 +488,7 @@ pa_channel_map *pa_channel_map_parse(pa_channel_map *rmap, const char *s) {
pa_assert(rmap);
pa_assert(s);
- memset(&map, 0, sizeof(map));
+ pa_channel_map_init(&map);
if (strcmp(s, "stereo") == 0) {
map.channels = 2;
@@ -554,11 +551,9 @@ int pa_channel_map_valid(const pa_channel_map *map) {
if (map->channels <= 0 || map->channels > PA_CHANNELS_MAX)
return 0;
- for (c = 0; c < map->channels; c++) {
-
- if (map->map[c] < 0 ||map->map[c] >= PA_CHANNEL_POSITION_MAX)
+ for (c = 0; c < map->channels; c++)
+ if (map->map[c] < 0 || map->map[c] >= PA_CHANNEL_POSITION_MAX)
return 0;
- }
return 1;
}
commit 3f6f13f90227d1adfe39b56671aa34745778f35d
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Sep 5 01:31:17 2008 +0200
use pa_channel_map_compatible() where applicable
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index f42abc8..76aea36 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -695,7 +695,7 @@ int main(int argc, char *argv[]) {
goto quit;
}
- if (channel_map_set && channel_map.channels != sample_spec.channels) {
+ if (channel_map_set && pa_channel_map_compatible(&channel_map, &sample_spec)) {
fprintf(stderr, _("Channel map doesn't match sample specification\n"));
goto quit;
}
commit a609e4a700da10926fcb9c9633dee1342907de97
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Sep 5 01:31:39 2008 +0200
check for errors returned by pa_context_connect()
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 76aea36..99df5b9 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -773,7 +773,10 @@ int main(int argc, char *argv[]) {
pa_context_set_state_callback(context, context_state_callback, NULL);
/* Connect the context */
- pa_context_connect(context, server, 0, NULL);
+ if (pa_context_connect(context, server, 0, NULL) < 0) {
+ fprintf(stderr, _("pa_context_connect() failed: %s"), pa_strerror(pa_context_errno(context)));
+ goto quit;
+ }
if (verbose) {
struct timeval tv;
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list