Commit graph

36 commits

Author SHA1 Message Date
Hongxu Jia
3d9deb1e56 build-sys: introduce a special build flag to explicitly disables running from build tree
It is helpful to improve reproducibility build [1] since
PA_SRCDIR/PA_BUILDDIR contains build path,
--disable-running-from-build-tree could drop these macros at
precompilation.

[1] https://reproducible-builds.org/

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2018-12-11 16:15:32 +02:00
Tanu Kaskinen
0623b3c91e gconf, gsettings: fix config.h includes
config.h should be included by all .c files and none of the .h files.
2018-04-19 14:38:18 +03:00
Sylvain Baubeau
785b660d8a module-gsettings: new module to store configuration using gsettings
GConf is deprecated, and distributions are removing it. paprefs depends
on GConf, so in order to avoid paprefs getting removed as well, paprefs
has to be changed to use something else than GConf. GSettings is the
easiest alternative to migrate to, although it has the same problems
that GConf had: no support for system mode or networking.

This patch takes the non-GConf specific code from module-gconf and puts
it in stdin-util.[ch], which is then reused by module-gsettings.
module-gsettings is designed to be very similar to module-gconf.

Migration is expected to happen as follows: Distributions update
PulseAudio and paprefs at the same time, or first PulseAudio and then
paprefs. paprefs depends on module-gsettings, and module-gsettings
conflicts with module-gconf. Therefore module-gconf gets automatically
removed during the paprefs update. After the update an old PulseAudio is
likely to be running with module-gconf loaded. If the user tries to use
paprefs during this period, whatever the user does in paprefs won't have
any effect until PulseAudio is restarted (probably by a reboot or
relogin). This is not ideal, but will have to do.

When module-gsettings is loaded, it runs gsettings-data-convert
(implemented in a later patch). That will copy the settings from GConf
to GSettings. If gsettings-data-convert is not available (it's part of
GConf, so it may have already been uninstalled), then any previous
paprefs settings are lost.
2018-04-19 14:30:30 +03:00
Arun Raghavan
d9624e0382 build-sys: Stop using symdef headers for modules
This removes the symdef header generation m4 magic in favour of a
simpler macro method, allowing us to skip one unnecessary build step
while moving to meson, and removing an 11 year old todo!
2017-12-12 12:58:52 +05:30
Colin Leroy
f0dfddead3 cli-command: don't exit on "module already loaded" errors
Some modules may only be loaded once, and trying to load them
twice from default.pa makes PulseAudio startup fail. While that could
be considered a user error, it's nicer to not be so strict. It's not
necessarily easy to figure what went wrong, if for example the user
plays with RAOP and adds module-raop-discover to default.pa, which first
works fine, but suddenly stops working when the user at some point
enables RAOP support in paprefs. Enabling RAOP in paprefs makes
module-gconf load the module too, so the module gets loaded twice.

This patch adds a way to differentiate module load errors, and
make cli-command ignore the error when the module is already
loaded.
2017-09-05 13:46:27 +03:00
Shawn Walker
954503d074 modules: Fix struct namespace collision on Solaris 2015-07-29 08:09:41 +05:30
Ondrej Holecek
5effc83479 update FSF addresses to FSF web page
FSF addresses used in PA sources are no longer valid and rpmlint
generates numerous warnings during packaging because of this.
This patch changes all FSF addresses to FSF web page according to
the GPL how-to: https://www.gnu.org/licenses/gpl-howto.en.html

Done automatically by sed-ing through sources.
2015-01-14 22:20:40 +02:00
Arun Raghavan
a30650d2ce gconf: Remove unused variable 2014-04-26 11:32:34 +03:00
Tanu Kaskinen
eca082a93f Use pa_hashmap_remove_and_free() where appropriate 2014-04-17 10:06:23 +03:00
Arun Raghavan
6825df8cec hashmap: Add the ability to free keys
Since the hashmap stores a pointer to the key provided at pa_hashmap_put()
time, it make sense to allow the hashmap to be given ownership of the key and
have it free it at pa_hashmap_remove/free time.

To do this cleanly, we now provide the key and value free functions at hashmap
creation time with a pa_hashmap_new_full. With this, we do away with the free
function that was provided at remove/free time for freeing the value.
2013-09-17 18:01:22 +05:30
poljar (Damir Jelić)
d806b19714 Remove pa_bool_t and replace it with bool.
commands used for this (executed from the pulseaudio/src directory):
    find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
        -a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
        -a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
        -exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
        -e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;

and:
    sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
        -e '181,194!s/\bTRUE\b/true/' -e \
        '181,194!s/\bFALSE\b/false/' pulsecore/macro.h
2013-07-04 12:25:30 +03:00
poljar (Damir Jelić)
cbd274676d Style fix: Add a space between the closing/opening bracket
This patch replaces every occurrence of '){' with ') {'.
The ffmpeg source tree was excluded since it will disappear anyways.

Command used for this:
    find . -type d \( -name ffmpeg \) -prune -o \
        -regex '\(.*\.[hc]\|.*\.cc\)' \
        -exec sed -i -e 's/){/) {/' {} \;
2013-06-24 16:56:24 +03:00
Tanu Kaskinen
8872c238ba hashmap: Use pa_free_cb_t instead of pa_free2_cb_t
The previous patch removed module-gconf's dependency on the userdata
pointer of the free callback, and that was the only place where the
userdata pointer of pa_free2_cb_t was used, so now there's no need for
pa_free2_cb_t in pa_hashmap_free(). Using pa_free_cb_t instead allows
removing a significant amount of repetitive code.
2013-02-16 01:12:21 +02:00
Tanu Kaskinen
dcf043842e gconf: Remove needless userdata function arguments 2013-02-16 01:12:10 +02:00
Tanu Kaskinen
cfb895438a gconf: Add userdata pointer to struct module_info
This will be useful in simplifying function argument lists.
2013-02-16 01:12:01 +02:00
Arti Trivedi Bora
e5954aca8e modules: Use pa_streq instead of strcmp. 2012-06-09 16:21:41 +03:00
Maarten Bosmans
dd9265ac78 Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
Lennart Poettering
56e1290ef6 gconf: run the wrapper script when running gconf-helper from build tree 2009-09-18 23:31:54 +02:00
Lennart Poettering
14c27c7ade gconf: use correct path for gconf-helper tool when running from build tree 2009-08-21 22:05:27 +02:00
Colin Guthrie
86dee05aec Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
Lennart Poettering
cf3f80e8b4 when killing gconf helper, loop over EINTR 2008-10-01 23:42:32 +02:00
Lennart Poettering
b7026bf248 add a few more gcc warning flags and fix quite a few problems found by doing so 2008-08-19 22:39:54 +02:00
Lennart Poettering
34dd4a20f2 fix shutdown when --disallow-module-loading=1 is passed 2008-08-05 23:56:25 +02:00
Lennart Poettering
8ae83d618e get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
Lennart Poettering
e8092bede9 Port module-gconf to make use of the new API pa_start_child_for_read()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2047 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-11 23:01:44 +00:00
Lennart Poettering
e313fe1b3d tag modules that may only be loaded once at most especially, and enforce that in the module loader
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2043 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-09 18:25:40 +00:00
Lennart Poettering
641d1fa964 drop rt scheduling before we start our helper process
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2013 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-01 02:55:06 +00:00
Lennart Poettering
2d265a91cc deal properly with signals interrupting us when we wait for data from gconf helper
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1992 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-30 00:17:21 +00:00
Lennart Poettering
a67c21f093 merge 'lennart' branch back into trunk.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-28 19:13:50 +00:00
Lennart Poettering
1e12e0ee8d Kill spaces on EOL
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1465 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-29 17:24:48 +00:00
Pierre Ossman
06211b7c8f Add copyright notices to all relevant files. (based on svn log)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-02-13 15:35:19 +00:00
Lennart Poettering
e385d93e5a remove all occurences of
pa_logXXX(__FILE__":  
   
and replace them by 
  
   pa_logXXX("



git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1272 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-18 21:38:40 +00:00
Lennart Poettering
d7ee1bcf75 fix module-gconf initialization
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1172 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-29 17:42:25 +00:00
Lennart Poettering
fec7e9bec7 if possible do not unload already loaded modules when the gconf settings change. instead try to reuse already loaded modules as much as possible
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1157 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-27 16:51:20 +00:00
Lennart Poettering
b2ad9a9753 add some protection that the gconf helper process will be killed when the daemon process dies. make sure the gconf helper process doesn't keep open file descriptors belonging to the daemon; if gconf helper path
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1152 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-26 18:28:31 +00:00
Lennart Poettering
cc1d8213d6 add new module "module-gconf" which reads configuration information from gconf. this will be used in my upcoming paconf module
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1150 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-26 17:36:14 +00:00