Commit graph

453 commits

Author SHA1 Message Date
Colin Guthrie
2b88634671 x11: Partially convert to XCB.
This commit mostly converts the X11 handling to XCB. There are still
some uses of XLib to deal with the X11 session handling modules, however all
client-side code should now be free of XLib and thus this should fix Bug #799
2010-08-15 21:41:52 +01:00
Lennart Poettering
bc7314f14e thread: name all threads so that the names appear in /proc/$PID/task/$TID/comm 2010-05-03 13:28:39 +02:00
Lennart Poettering
ddabaa3b0f proplist: explicitly mention a role 'test' 2010-02-21 17:36:51 +01:00
Lennart Poettering
3f44bf0afa channelmap: Use "Subwoofer" as pretty name for LFE
The pretty name is suspposed to be understandable by non-technical
folks, and they are generally more used to the term "Subwoofer" than
"Low Frequency Emitter", so let's change the name here.
2010-02-21 17:36:51 +01:00
Lennart Poettering
84782f24c5 native: rework handling of seeks that depend on variables the client does not know anything about
All seeks/flushes that depend on the playback buffer read pointer cannot
be accounted for properly in the client since it does not know the
actual read pointer. Due to that the clients do not account for it at
all. We need do the same on the server side. And we did, but a little
bit too extreme. While we properly have not applied the changes to the
"request" counter we still do have to apply it to the "missing" counter.
This patch fixes that.
2010-01-18 01:33:04 +01:00
Tanu Kaskinen
52c66b4766 libpulse: Store pa_stream pointers to hashmaps instead of dynarrays.
Since the stream identifiers (channels) are monotonically growing integer, it
isn't a good idea to use them as index to a dynamic array, because the array
will grow all the time. This is not a problem with client connections that
don't create many streams, but, for example, long-running clients that use
libcanberra for playing event sounds, this means that the client connection
effectively leaks memory.
2010-01-15 01:38:19 +01:00
Daniel T Chen
a2418effe7 threaded-mainloop: Properly initialise m->n_waiting_for_accept to prevent deadlock
Compiler optimisations have been seen to initialise
m->n_waiting_for_accept to a positive non-zero value, so the while() in
pa_threaded_mainloop_signal() never proceeds. Fix this by properly
initializing m->n_waiting_for_accept in pa_threaded_mainloop_new().

Patch from Iain Bucław.

https://bugs.launchpad.net/bugs/502992
2010-01-15 01:33:46 +01:00
Lennart Poettering
86144ee6cb client: include dolby channel names in comments 2010-01-15 01:29:55 +01:00
Lennart Poettering
fa64230107 client: implement $PULSE_LATENCY_MSEC
This allows easy overriding of a clients latency setting for debugging
purposes.

http://pulseaudio.org/ticket/753
2010-01-15 01:25:42 +01:00
Arun Raghavan
366e6d7e90 Mark shared variables as volatile
'n_waiting' and 'n_waiting_for_accept' may be accessed from mulitple
threads, and thus need to be marked as volatile to suppres certain
compiler optimisations. All uses are protected by a mutex, so we don't
need to worry about cache issues (added documentation for this as well).

This addresses bug #738.
2010-01-14 18:48:38 +00:00
Lennart Poettering
78811c5653 client: verify connection state in pa_stream_connect_upload()
Make suer we check the connection state before going on, so that we can
rely that s->context->pstream is properly initialized.

https://bugzilla.redhat.com/show_bug.cgi?id=539500
2010-01-12 03:01:27 +01:00
Lennart Poettering
bf50dc4230 client: detect forking in sample cache API, too 2010-01-12 03:01:14 +01:00
Lennart Poettering
8d356659e6 native: fix request counter miscalculations
Do not subtract bytes the client sends us beyond what we requested from
our missing bytes counter.

This was mostly a thinko that caused servers asking for too little data
when the client initially sent more data than requested, because that
data sent too much was accounted for twice.

This commit fixes this miscalculation.

http://bugzilla.redhat.com/show_bug.cgi?id=534130
2010-01-08 20:07:34 +01:00
Lennart Poettering
c41ee00893 dbus: remove filter functions only if they were actually set before
This fixes an assert when destructing modules that have not been fully
initialized.

https://bugzilla.redhat.com/show_bug.cgi?id=548525
2010-01-08 20:06:21 +01:00
Lennart Poettering
a281aad784 pulse: ask for timing updates both *before* and *after* triggering a stream state change so that in the STARTED/UNDERFLOW callbacks we accurate transport latency information 2009-11-23 05:03:30 +01:00
Lennart Poettering
c13bf3dd55 pulse: delay smoother update only when unpausing, not when pausing, since we don't want the timer to advance when we are supposedly already paused 2009-11-23 05:03:22 +01:00
Lennart Poettering
d6a851cd16 pulse: try to fix inaccuracy with uncork timing for streams that are created in corked state 2009-11-23 05:03:13 +01:00
Colin Guthrie
25537ffa00 device-manager: Update docs version -> 0.9.20
Third time is a charm... maybe.
2009-11-11 17:50:38 +00:00
Colin Guthrie
725ab6c4a0 device-manager: Update docs version -> 0.9.20 2009-11-11 17:44:28 +00:00
Colin Guthrie
5382455d5e device-manager: Rather than flagging the device as available, just include the sink/source index with PA_INVALID_INDEX meaning unavailable 2009-11-11 17:44:27 +00:00
Colin Guthrie
8a5778dcc5 device-manager: Change the prefer/defer options to a single 'reorder' command.
We put in the devices from the wire into a hashmap and then add all like type device in the database
and then order them based on priority (with the ones specified on the wire always being in that order at
the top of the list.
2009-11-11 17:44:26 +00:00
Colin Guthrie
055ad89928 device-manager: Expose the priority lists in the protocol extension.
Also leave space for 'icon' and 'available' details too, althought currently this info is dummy.
2009-11-11 17:44:26 +00:00
Colin Guthrie
6d4afac194 device-manager: Change the write function to a rename function.
The structure itself will contain various bits of info so exposing this fully to the client is a bad idea.
By keeping to a rename operation we keep what we do store abstracted from the clients.

Also fix some doxy comments.
2009-11-11 17:44:23 +00:00
Colin Guthrie
4981268738 device-manager: Provide a method for prefering/defering a device.
This allows clients to edit the priroity order. What is not yet in place is the initialisation of that priority list
when new devices are detected or the cleaning (remove holes) when devices are removed.

In order to keep the storage transparent I will likely remove the write functionality and replace it with a
simple rename method.

I also still need to expose the priority itself when reading the data.
2009-11-11 17:44:23 +00:00
Colin Guthrie
c1ece6ce85 device-manager: Provide a way for clients to enable/disable role-based device-priority routing.
The routing logic itself does not yet exist, but the command currently will unload/load module-stream-restore as approriate.
(module-stream-restore would conflict with the role-based priority-routing).
2009-11-11 17:44:23 +00:00
Colin Guthrie
25f054582f device-manager: Update docs version -> 0.9.19 (predicted) 2009-11-11 17:44:23 +00:00
Colin Guthrie
bddebbf7f4 device-manager: Fix copy+paste leftover 2009-11-11 17:44:22 +00:00
Colin Guthrie
0f6ace75c9 device-manager: Add an untested protocol extension.
This is effectively copied from the stream restore extension.
2009-11-11 17:44:22 +00:00
Lennart Poettering
3dcdab6e8d libpulse: explain semantics of pa_stream_connect_playback() in more detail 2009-11-11 05:13:47 +01:00
Lennart Poettering
84e77cb13d libpulse: add missing includes 2009-11-11 05:12:45 +01:00
Colin Guthrie
8f4940b17a libpulse: Add *_NOFLAGS flags with value 0 for various enums
This avoids the need for ugly casting in client implementations.
2009-09-22 18:43:03 +01:00
Lennart Poettering
f84d755d6a mainloop: fix detection of rt clocks 2009-09-18 22:16:25 +02:00
Lennart Poettering
d6291511a2 mainloop: pass monotonic times back to user if he passed monotonic times to us 2009-09-18 04:21:01 +02:00
Lennart Poettering
c024aeaae9 timeval: make timeval conversion routines handle PA_USEC_INVALID special 2009-09-18 04:14:39 +02:00
Lennart Poettering
a1da83b206 timeval: add UNLIKELY annotation 2009-09-18 04:14:38 +02:00
Lennart Poettering
05f6236a83 timeval: make pa_timeval_sub saturating 2009-09-18 04:14:38 +02:00
Lennart Poettering
f7d38965b3 timeval: introduce PA_USEC_MAX 2009-09-18 04:14:37 +02:00
Lennart Poettering
fb4a2a1bbb mainloop: sum up dispatched events in an unsigned to clarify range 2009-09-18 04:14:37 +02:00
Lennart Poettering
18d69c5d9d mainloop: use PA_LLIST_FOREACH macros where applicable 2009-09-18 04:14:37 +02:00
Lennart Poettering
b32f5994e9 mainloop: don't initialize fields we don't have to 2009-09-18 04:14:36 +02:00
Lennart Poettering
a049909a70 mainloop: calculate in pa_usec_t everywhere 2009-09-18 04:14:36 +02:00
Lennart Poettering
a43118b730 mainloop: properly convert time to wallclock time when handing it to the user 2009-09-18 04:14:36 +02:00
Lennart Poettering
94f28b9d4b proplist: introduce PA_PROP_WINDOW_DESKTOP property 2009-09-17 02:22:41 +02:00
Lennart Poettering
cdbeac6b69 libpulse: as a special exception, don't require a non-NULL context in pa_context_errno 2009-09-17 01:37:23 +02:00
Lennart Poettering
6b8fdc4169 CANCELLED vs. CANCELED
Define CANCELLED as alias for CANCELED
2009-09-17 01:19:55 +02:00
Lennart Poettering
12f211105e gccmacro: enable weakrefs only on ELF 2009-09-15 04:31:54 +02:00
Lennart Poettering
5919337433 proplist: define properties for storing window position 2009-09-11 02:16:17 +02:00
Lennart Poettering
42b795b408 doxygen: don't confuse doxygen with spurious .. 2009-09-11 01:49:55 +02:00
Lennart Poettering
4e3f7d5577 doxygen: add rtclock.h to documentation 2009-09-11 01:49:39 +02:00
Lennart Poettering
297f318206 doxygen: drop references to pacat.c and paplay.c as examples since tehy are not useful as such and in the case of paplay not even existant anymore 2009-09-11 01:49:16 +02:00