[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v1.0-dev-33-g95ccbf7
Colin Guthrie
gitmailer-noreply at 0pointer.de
Mon Jan 3 01:46:28 PST 2011
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 d28fc0df8997fed0da9ac3f54138f792dc660841 (commit)
- Log -----------------------------------------------------------------
95ccbf7 loopback: Add new arguments to disable stream move
06875b6 Revert "core: make use of dbus_message_iter_append_fixed_array"
-----------------------------------------------------------------------
Summary of changes:
src/modules/module-loopback.c | 27 ++++++++++++++++++++++++++-
src/pulsecore/dbus-util.c | 7 ++++++-
2 files changed, 32 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
commit 06875b67e616f6ade97fda3b41cb7b6d7f9857c1
Author: Colin Guthrie <cguthrie at mandriva.org>
Date: Mon Jan 3 09:22:33 2011 +0000
Revert "core: make use of dbus_message_iter_append_fixed_array"
This causes problems as outlined in ticket #887.
This reverts commit f564c7d76371380980faa10ee3c756c3130c60bf.
diff --git a/src/pulsecore/dbus-util.c b/src/pulsecore/dbus-util.c
index 8b20305..09ab071 100644
--- a/src/pulsecore/dbus-util.c
+++ b/src/pulsecore/dbus-util.c
@@ -595,14 +595,19 @@ void pa_dbus_send_proplist_variant_reply(DBusConnection *c, DBusMessage *in_repl
void pa_dbus_append_basic_array(DBusMessageIter *iter, int item_type, const void *array, unsigned n) {
DBusMessageIter array_iter;
+ unsigned i;
+ unsigned item_size;
pa_assert(iter);
pa_assert(dbus_type_is_basic(item_type));
pa_assert(array || n == 0);
+ item_size = basic_type_size(item_type);
+
pa_assert_se(dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, signature_from_basic_type(item_type), &array_iter));
- pa_assert_se(dbus_message_iter_append_fixed_array(&array_iter, item_type, array, n));
+ for (i = 0; i < n; ++i)
+ pa_assert_se(dbus_message_iter_append_basic(&array_iter, item_type, &((uint8_t*) array)[i * item_size]));
pa_assert_se(dbus_message_iter_close_container(iter, &array_iter));
};
commit 95ccbf73466529e4c65460010955c355452aa0b1
Author: Cai Yuanqing <Yuanqing.Cai at tieto.com>
Date: Thu Dec 23 19:25:36 2010 +0800
loopback: Add new arguments to disable stream move
The arguments sink_dont_move and source_dont_move have been added to toggle
module automatic unloading when the sink or source were no longer
available, rather than just moving them to the next available
sink/source (via rescue streams).
Reviewed and tweaked by Colin Guthrie.
diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c
index 55716b2..a6553f7 100644
--- a/src/modules/module-loopback.c
+++ b/src/modules/module-loopback.c
@@ -57,7 +57,9 @@ PA_MODULE_USAGE(
"sink_input_name=<custom name for the sink input> "
"source_output_name=<custom name for the source output> "
"sink_input_role=<media.role for the sink input> "
- "source_output_role=<media.role for the source output>");
+ "source_output_role=<media.role for the source output> "
+ "source_dont_move=<boolean> "
+ "sink_dont_move=<boolean>");
#define DEFAULT_LATENCY_MSEC 200
@@ -115,6 +117,8 @@ static const char* const valid_modargs[] = {
"source_output_name",
"sink_input_role",
"source_output_role",
+ "source_dont_move",
+ "sink_dont_move",
NULL,
};
@@ -618,8 +622,10 @@ int pa__init(pa_module *m) {
struct userdata *u;
pa_sink *sink;
pa_sink_input_new_data sink_input_data;
+ pa_bool_t sink_dont_move;
pa_source *source;
pa_source_output_new_data source_output_data;
+ pa_bool_t source_dont_move;
uint32_t latency_msec;
pa_sample_spec ss;
pa_channel_map map;
@@ -696,6 +702,15 @@ int pa__init(pa_module *m) {
pa_sink_input_new_data_set_channel_map(&sink_input_data, &map);
sink_input_data.flags = PA_SINK_INPUT_VARIABLE_RATE;
+ sink_dont_move = FALSE;
+ if (pa_modargs_get_value_boolean(ma, "sink_dont_move", &sink_dont_move) < 0) {
+ pa_log("sink_dont_move= expects a boolean argument.");
+ goto fail;
+ }
+
+ if (sink_dont_move)
+ sink_input_data.flags |= PA_SINK_INPUT_DONT_MOVE;
+
pa_sink_input_new(&u->sink_input, m->core, &sink_input_data);
pa_sink_input_new_data_done(&sink_input_data);
@@ -737,6 +752,16 @@ int pa__init(pa_module *m) {
pa_source_output_new_data_set_sample_spec(&source_output_data, &ss);
pa_sink_input_new_data_set_channel_map(&sink_input_data, &map);
+ source_output_data.flags = (pa_source_output_flags_t)0;
+
+ source_dont_move = FALSE;
+ if (pa_modargs_get_value_boolean(ma, "source_dont_move", &source_dont_move) < 0) {
+ pa_log("source_dont_move= expects a boolean argument.");
+ goto fail;
+ }
+
+ if (source_dont_move)
+ source_output_data.flags |= PA_SOURCE_OUTPUT_DONT_MOVE;
pa_source_output_new(&u->source_output, m->core, &source_output_data);
pa_source_output_new_data_done(&source_output_data);
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list