Commit graph

25 commits

Author SHA1 Message Date
Lennart Poettering
ff4814cac7 add callbacks for the revoke/release stuff, so that we can make this thing thread-safe
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1626 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-10 23:41:50 +00:00
Lennart Poettering
b3f1a133f1 minor update
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1623 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-10 22:01:54 +00:00
Lennart Poettering
455ff8d342 fix a memory leak
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1582 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-06 17:37:59 +00:00
Lennart Poettering
c306b83525 initialize 'length' properly
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1580 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-06 16:12:54 +00:00
Lennart Poettering
23d01bb75d Modernize pstream.[ch], reintroduce defer event to make things actually work
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1572 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-05 00:07:58 +00:00
Lennart Poettering
00da37f2c4 Merge HUGE set of changes temporarily into a branch, to allow me to move them from one machine to another (lock-free and stuff)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1469 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-06-11 12:08:37 +00:00
Lennart Poettering
c3b5de77bc fix minor typo
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1447 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-23 16:30:57 +00:00
Lennart Poettering
f90339528b Fix another DoS vulnerability, also identified Luigi Auriemma (closes #67)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1446 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-23 16:29:18 +00:00
Lennart Poettering
407a1b6efe fix a DoS vulnerability (re #67), originally identified by Luigi Auriemma
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1445 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-05-23 16:24:54 +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
Pierre Ossman
521daf6f0a Huge trailing whitespace cleanup. Let's keep the tree pure from here on,
mmmkay?


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-01-04 13:43:45 +00:00
Pierre Ossman
8dc6214276 Revert r1404 and keep it on a development branch until it is fully tested.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1409 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-11-06 13:06:01 +00:00
Lennart Poettering
d210ebbb09 rework memory block management to be thread-safe and mostly lock-free.
pa_memblock is now an opaque structure. Access to its fields is now done
through various accessor functions in a thread-safe manner.

pa_memblock_acquire() and pa_memblock_release() are now used to access the
attached audio data. Why? To allow safe manipulation of the memory pointer
maintained by the memory block. Internally _acquire() and _release() maintain a
reference counter. Please do not confuse this reference counter whith the one
maintained by pa_memblock_ref()/_unref()!

As a side effect this patch removes all direct usages of AO_t and replaces it
with pa_atomic_xxx based code.

This stuff needs some serious testing love. Especially if threads are actively
used.



git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1404 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-26 23:50:56 +00:00
Lennart Poettering
1728e3ac98 make pa_stream thread-safe: use new refcounting system, protect access using mutexes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1379 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-09-07 19:08:19 +00:00
Lennart Poettering
c0b3e8b346 when transferring large memory chunks of a pa_pstream, split them up
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1300 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-19 18:57:33 +00:00
Lennart Poettering
206ac6f3ee allow importing of external shm data blocks unconditionally, even when local SHM support is disabled
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1283 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-19 01:16:38 +00:00
Lennart Poettering
7ac79098a6 remove export/import objects when SHM is disable for a pa_pstream object
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1275 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-18 23:42:14 +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
0e436a6926 Rework memory management to allow shared memory data transfer. The central idea
is to allocate all audio memory blocks from a per-process memory pool which is
available as read-only SHM segment to other local processes. Then, instead of
writing the actual audio data to the socket just write references to this
shared memory pool.

To work optimally all memory blocks should now be of type PA_MEMBLOCK_POOL or
PA_MEMBLOCK_POOL_EXTERNAL. The function pa_memblock_new() now generates memory
blocks of this type by default.



git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1266 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-08-18 19:55:18 +00:00
Pierre Ossman
7ba93ebae2 Protect platform dependent headers with ifdefs.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1112 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-20 00:13:12 +00:00
Lennart Poettering
a382492204 * add new function pa_check_in_group()
* abstract credential APis a little bit by introducing HAVE_CREDS and a structure pa_creds
* rework credential authentication
* fix module-volume-restore and friends for usage in system-wide instance
* remove loopback= argument from moulde-*-protocol-tcp since it is a superset of listen= and usually a bad idea anyway since the user shouldn't load the TCP module at all if he doesn't want remote access
* rename a few variables in the jack modules to make sure they don't conflict with symbols defined in the system headers
* add server address for system-wide daemons to the default server list for the the client libs
* update todo


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1109 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-19 21:48:35 +00:00
Lennart Poettering
9c87a65ce9 * add new --system command line parameter to the daemon for running PulseAudio as system-wide instance
* add PA_ prefixes to all global #defines
* modify auth-by-creds: define a new group "pulse-access" which is used for authentication
* add proper privilige dropping when running in --system mode
* create runtime directory once on startup and not by each module seperately


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1105 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-19 17:44:19 +00:00
Pierre Ossman
f5afb7b6d0 Forgot to protect one access to with_creds with an ifdef.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1098 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-17 11:42:25 +00:00
Lennart Poettering
fc544a63de don't send SCM_CREDENTIALS on every sendmsg(), instead do it only on handshake
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1085 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-07-14 23:00:57 +00:00
Lennart Poettering
f44ba09265 big s/polyp/pulse/g
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1033 fefdeb5f-60dc-0310-8127-8f9354f1896f
2006-06-19 21:53:48 +00:00
Renamed from src/polypcore/pstream.c (Browse further)