Age | Commit message (Collapse) | Author | Files | Lines |
|
The module implementation treats an empty description as a protocol
error, so we should validate the description already at client side.
|
|
json_tokener_parse() simply returns NULL on error these days
latest json-c (post 0.12) doesn't automatically include json-c/bits.h anymore
causing compilation errors
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
json_object_object_get()
pulse/format.c: In function 'pa_format_info_get_prop_type':
pulse/format.c:252:5: warning: implicit declaration of function 'is_error' [-Wimplicit-function-declaration]
pulse/format.c:287:13: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
pulse/format.c:293:13: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
pulse/format.c: In function 'pa_format_info_get_prop_int_range':
pulse/format.c:364:5: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
pulse/format.c:369:5: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
pulse/format.c: In function 'pa_format_info_prop_compatible':
pulse/format.c:676:9: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
pulse/format.c:680:9: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:290) [-Wdeprecated-declarations]
json-c 0.10 (released 20120530) added json_object_object_get_ex()
json-c 0.12 (released 20140410) deprecated json_object_object_get()
PulseAudio depends on json 0.9 or json-c 0.11, drop support for json 0.9
in a subsequent patch and require json-c 0.11 (this will also avoids confusion
which json package is needed due to the upstream rename)
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
json_object_array_get_idx()
json-c documentation states that "No reference counts will be changed.
There is no need to manually adjust reference counts through the
json_object_put/json_object_get methods unless..."
hence fix pa_format_info_get_prop_type() and pa_format_info_get_prop_int_range();
note that pa_format_info_prop_compatible() is OK
the json_object_array_get_idx() bug reported by Arun, thanks!
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: Arun Raghavan <arun@accosted.net>
|
|
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: David Henningsson <david.henningsson@canonical.com>
|
|
handle_srbchannel_memblock() should return when memblock sanity checks fail
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Cc: David Henningsson <david.henningsson@canonical.com>
|
|
Debian GNU/kFreeBSD uses a FreeBSD kernel and GLIBC,
it #defines __FreeBSD_kernel__, but not __FreeBSD__ nor __linux__
Debian GNU/kFreeBSD does have a /proc/self/exe
FreeBSD #defines __FreeBSD__ and __FreeBSD_kernel__
problem reporte here:
http://lists.freedesktop.org/archives/pulseaudio-discuss/2014-July/020998.html
http://stackoverflow.com/questions/1023306/finding-current-executables-path-without-proc-self-exe and
http://stackoverflow.com/questions/933850/how-to-find-the-location-of-the-executable-in-c have some
background info
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=81075
|
|
This comment can potentially save a lot of debugging effort and fixing
an ABI break, even though I don't think it's particularly likely that
anyone will ever extend pa_ext_device_manager_role_priority_info.
|
|
A recent patch broke the build on FreeBSD, which does not have
HAVE_CREDS defined. Also, make sure any attempts to enable the
srbchannel on such architectures fail.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=80642
Reported-by: Ryan Lortie
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
This increments protocol version to v30 and adds two new commands
to enable and disable an shm ringbuffer, as well as client side
implementation.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
The file descriptors are read from the iochannel just like the creds are.
So instead of passing just creds (and creds_valid), we now pass the
entire pa_ancil struct.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=80570
|
|
in the home directory
If a relative path is passed to pa_authkey_load(), it will interpret
the path as relative to the home directory. This is wrong, because
relative paths should be interpreted to be relative to the config home
directory. Before fixing pa_authkey_load(), this patch prepares for
the change by using absolute paths when the file actually needs to be
in the home directory (i.e. the fallback cookie path for the native
protocol and the default cookie path for the esound protocol).
|
|
pa_authkey_load() was removed earlier, so the _auto suffix isn't
necessary any more.
|
|
This simplifies the code a bit.
|
|
pa_context already ignored the return value of pa_client_conf_load(),
so the only places where the return value was not ignored were the
D-Bus server lookup thing and pax11publish. I don't think those cases
are negatively affected if they ignore errors in opening or parsing
client.conf.
pa_client_conf_env() never failed anyway, so returning int was
obviously redundant.
|
|
Having an extra variable that tracks the wakeup status introduces a
race where the variable is set but the data has yet to propagate from
the write end of the pipe to the read end. When this happens the
system goes into a tight loop as select() always returns immediately.
|
|
Add surround-21 as a alias to set up a 2.1 channel map.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
The old code loaded cookies at the time of loading the client
configuration, which could lead to creation of multiple cookie files.
For example, when pa_client_conf_load() was called, the default cookie
file was created, and then if PULSE_COOKIE was set,
pa_client_conf_env() would create another cookie file.
This patch moves the loading of the cookie to a separate function,
which pa_context calls just before needing the cookie, so the cookie
won't be loaded from the default file if PULSE_COOKIE is set. This
patch also splits the single cookie and cookie_file fields in
pa_client_conf into multiple fields, one for each possible cookie
source. That change allows falling back to another cookie source if
the primary source doesn't work.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=75006
|
|
|
|
Avoid unpredictable behaviour in case e.g. the HOME environment
variable is incorrectly set up for whatever reason.
I haven't seen non-absolute HOME anywhere, but this feels like a good
sanity check anyway.
|
|
There's no behavioral change, just nicer code.
|
|
|
|
|
|
10 bytes isn't enough for "-123.45 dB", including the terminating null
byte.
|
|
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
pa_threaded_mainloop_signal()
also sneaks in a full stop in documentation elsewhere
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
|
|
the latency_update callback is supported on playback AND record
streams
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
|
|
|
|
documentation
|
|
|
|
|
|
The check is done for clients that use pa_stream_new() but not for
clients that use pa_stream_new_extended(). This is inconsistent. We
could check that the volume channels match the channels set in the
format info struct that is passed to pa_stream_new_extended(), but
that doesn't work if the format info doesn't contain the channel
information (that can happen if the client wants the server to choose
the channel count for the stream). And it should also be possible to
pass a mono volume for a multi-channel stream. The check could be
extended to handle all these cases, but I don't see much point in
wasting time on that. The server will anyway validate the stream
parameters, it's not particularly important to fail already when the
stream is being created at the client side.
|
|
|
|
|
|
|
|
This also fixes an issue in pa_format_info_to_sample_spec(): it did
no validation for the channels value. Now the validation is taken care
of in pa_format_info_get_channels().
|
|
This also fixes an issue in pa_format_info_to_sample_spec(): it did
no validation for the rate value. Now the validation is taken care of
in pa_format_info_get_rate().
|
|
|
|
I will need to use the function from outside libpulse.
I added the channel map argument, because the function will be called
from another function that is expected to initialize the channel map.
I don't know if it's in practice necessary, but it shouldn't do any
harm either.
|
|
Hello.
Over time, I became aware of several instances of tempting but
semantically incorrect usage of PulseAudio API (one from my own bad
proposal of "improving" Wine, one from Parole media player and one
from Webkit-GTK). I want to document these gotchas so that other
developers don't fall for that. See the attached patch.
I have checked that the rendered HTML is correct, but need someone to
confirm the factual accuracy of the proposed changes and, possibly, to
improve the wording.
--
Alexander E. Patrakov
|
|
while ((r = pa_mainloop_iterate(m, 1, retval)) >= 0)
;
if (r == -2)
return 1;
else if (r < 0)
return -1;
else
return 0;
the last else is never reached, discovered by coverity
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|
|
streams
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
|