[pulseaudio-commits] Branch 'next' - 3 commits - src/daemon src/modules src/pulsecore
Arun Raghavan
arun at kemper.freedesktop.org
Mon Apr 22 21:02:08 PDT 2013
src/daemon/daemon-conf.c | 2 +-
src/modules/module-rygel-media-server.c | 10 ++++++++++
src/pulsecore/cli-command.c | 12 +++++++++++-
src/pulsecore/core-util.c | 12 +++++++-----
4 files changed, 29 insertions(+), 7 deletions(-)
New commits:
commit 508c60fff158961fcba2eba831523c3904dcb8ea
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Sat Apr 20 10:12:34 2013 +0530
pulsecore: Make run-from-build not readlink() on every call
Since this is no longer only defined in debug builds, let's make sure
that there is no impact if this is indavertently called repeatedly at
startup.
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index cca66bc..da8266b 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -3211,12 +3211,14 @@ void pa_reset_personality(void) {
pa_bool_t pa_run_from_build_tree(void) {
char *rp;
- pa_bool_t b = FALSE;
+ static pa_bool_t b = FALSE;
- if ((rp = pa_readlink("/proc/self/exe"))) {
- b = pa_startswith(rp, PA_BUILDDIR);
- pa_xfree(rp);
- }
+ PA_ONCE_BEGIN {
+ if ((rp = pa_readlink("/proc/self/exe"))) {
+ b = pa_startswith(rp, PA_BUILDDIR);
+ pa_xfree(rp);
+ }
+ } PA_ONCE_END;
return b;
}
commit bb7f83567b60c17e4744a1c7eb6a4e83d924b00f
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Sat Apr 20 09:50:38 2013 +0530
daemon: Fix dlsearchpath while running from build tree
It appears that, libltdl will find the .la file in the builddir and
figure out where the real .so is.
This also requires .ifexists to be fixed up to correspondingly search in
<dlsearchpath>/.libs.
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index 2c43cf9..f1e5476 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -156,7 +156,7 @@ pa_daemon_conf *pa_daemon_conf_new(void) {
#else
if (pa_run_from_build_tree()) {
pa_log_notice("Detected that we are run from the build tree, fixing search path.");
- c->dl_search_path = pa_xstrdup(PA_BUILDDIR "/.libs/");
+ c->dl_search_path = pa_xstrdup(PA_BUILDDIR);
} else
c->dl_search_path = pa_xstrdup(PA_DLSEARCHPATH);
#endif
diff --git a/src/pulsecore/cli-command.c b/src/pulsecore/cli-command.c
index 1ec8054..f5489d6 100644
--- a/src/pulsecore/cli-command.c
+++ b/src/pulsecore/cli-command.c
@@ -2062,11 +2062,21 @@ int pa_cli_command_execute_line_stateful(pa_core *c, const char *s, pa_strbuf *b
char *pathname;
pathname = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", p, filename);
- pa_xfree(p);
*ifstate = access(pathname, F_OK) == 0 ? IFSTATE_TRUE : IFSTATE_FALSE;
pa_log_debug("Checking for existence of '%s': %s", pathname, *ifstate == IFSTATE_TRUE ? "success" : "failure");
+ if (PA_UNLIKELY(pa_run_from_build_tree())) {
+ /* If run from the build tree, search in <path>/.libs as well */
+ char *ltpathname = pa_sprintf_malloc("%s" PA_PATH_SEP ".libs" PA_PATH_SEP "%s", p, filename);
+
+ *ifstate = access(ltpathname, F_OK) == 0 ? IFSTATE_TRUE : IFSTATE_FALSE;
+ pa_log_debug("Checking for existence of '%s': %s", ltpathname, *ifstate == IFSTATE_TRUE ? "success" : "failure");
+
+ pa_xfree(ltpathname);
+ }
+
+ pa_xfree(p);
pa_xfree(pathname);
if (*ifstate == IFSTATE_TRUE)
commit 274c93e7f5f00d54c14871beb0ddd41a3dc8104d
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Fri Apr 19 15:04:45 2013 +0530
rygel: Set DLNA profile on our MediaItems
We know we always serve up LPCM, and exposing this via D-Bus lets Rygel
set the appropriate metadata while presenting the raw (i.e.
non-transcoded) stream to clients.
diff --git a/src/modules/module-rygel-media-server.c b/src/modules/module-rygel-media-server.c
index 94b2d68..855d7bb 100644
--- a/src/modules/module-rygel-media-server.c
+++ b/src/modules/module-rygel-media-server.c
@@ -134,6 +134,7 @@ PA_MODULE_USAGE("display_name=<UPnP Media Server name>");
" <interface name=\"org.gnome.UPnP.MediaItem2\">" \
" <property name=\"URLs\" type=\"as\" access=\"read\"/>" \
" <property name=\"MIMEType\" type=\"s\" access=\"read\"/>" \
+ " <property name=\"DLNAProfile\" type=\"s\" access=\"read\"/>" \
" </interface>" \
" <interface name=\"org.gnome.UPnP.MediaObject2\">" \
" <property name=\"Parent\" type=\"s\" access=\"read\"/>" \
@@ -587,6 +588,7 @@ static void append_sink_or_source_item_properties(
append_sink_or_source_item_mediaobject2_properties(r, &sub, path, sink, source);
append_property_dict_entry_urls(r, &sub, user_data, sink, source);
append_property_dict_entry_mime_type(r, &sub, sink, source);
+ append_property_dict_entry_string(r, &sub, "DLNAProfile", "LPCM");
}
else {
for (int i = 0; i < filter_len; ++i) {
@@ -609,6 +611,9 @@ static void append_sink_or_source_item_properties(
else if (pa_streq(property_name, "MIMEType")) {
append_property_dict_entry_mime_type(r, &sub, sink, source);
}
+ else if (pa_streq(property_name, "DLNAProfile")) {
+ append_property_dict_entry_string(r, &sub, "DLNAProfile", "LPCM");
+ }
}
}
@@ -988,6 +993,10 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
pa_assert_se(r = dbus_message_new_method_return(m));
append_variant_mime_type(r, NULL, sink, source);
+ } else if (message_is_property_get(m, "org.gnome.UPnP.MediaItem2", "DLNAProfile")) {
+ pa_assert_se(r = dbus_message_new_method_return(m));
+ append_variant_string(r, NULL, "LPCM");
+
} else if (message_is_property_get(m, "org.gnome.UPnP.MediaItem2", "URLs")) {
pa_assert_se(r = dbus_message_new_method_return(m));
append_variant_urls(r, NULL, u, sink, source);
@@ -1001,6 +1010,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
pa_assert_se(dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "{sv}", &sub));
append_property_dict_entry_mime_type(r, &sub, sink, source);
+ append_property_dict_entry_string(r, &sub, "DLNAProfile", "LPCM");
append_property_dict_entry_urls(r, &sub, u, sink, source);
pa_assert_se(dbus_message_iter_close_container(&iter, &sub));
More information about the pulseaudio-commits
mailing list