Commit graph

985 commits

Author SHA1 Message Date
Wim Taymans
293932d4ec v0: improve compatibility
Implement RequestClockUpdate event and ClockUpdate message for
old clients.
2020-02-11 11:23:28 +01:00
Wim Taymans
7edd3fb054 typemap: fill out more audio formats 2020-02-10 20:46:18 +01:00
Wim Taymans
eab6dda513 protocol-native: improve v0 compatibility 2020-02-10 18:15:24 +01:00
Wim Taymans
56c15ca9e8 connection: improve version check
do the version check on the v2 update_types request or the v3
hello request.
2020-02-10 16:26:24 +01:00
Wim Taymans
d2e7f75071 resource: destroy old core_resource
If there is already a core_resource when we are going to make a new
one, remove the old one. This can happen when there is a version
switch.
2020-02-10 16:22:49 +01:00
Wim Taymans
03844d6c72 rtkit: add parameters for prio and rlimits
Make it possible to configure the prio and rlimits on the
rtkit module.
Set the defaults to the max.
2020-02-10 10:43:31 +01:00
Wim Taymans
40db445f3d rtkit: actually wake up the thread to set rt priority
Wake up the eventfd in the data thread to actually request the
realtime priority.
2020-02-08 22:47:18 +01:00
Wim Taymans
ee67ab9c04 client-node: keep target links in list
Don't allocate the links in an array because they might be moved
when the array is resized. Instead just use calloc and add them
to a list.

Make sure we update the list used in the real-time thread from a
safe context.
2020-02-07 16:45:58 +01:00
Wim Taymans
a1bb1548e6 tests: msg is undefined when _get_next() return != 1 2020-02-07 15:40:28 +01:00
Wim Taymans
3aa8e301c5 protocol-native: implement v2 update_permissions
Convert the old permission update to new permission events.
2020-02-06 16:57:24 +01:00
Wim Taymans
7a395bccaf improve v2 compat mode
Always send the server types when we got the first client types and
don't rely on the message sequence number.
Add some more types in the typemap.
2020-02-06 16:56:19 +01:00
Wim Taymans
41b47e726e context: add some more defaults
Make a property to allow mlock and use it.
mlock in stream and filter when asked to mmap mem.
2020-02-04 17:09:41 +01:00
Wim Taymans
dcec3f12b5 remote-node: safely activate and deactivate a link
Make sure we execute the admin of the target links in the data
thread.
2020-02-04 16:29:48 +01:00
Wim Taymans
f79dfcd77f profiler: fix method prototype 2020-02-03 16:44:09 +01:00
Wim Taymans
a4a93a2a16 profiler: Improve profiler info
Split the profiler info into multiple properties.
Give feedback about time and logged samples while profiling.
2020-02-03 12:33:01 +01:00
Wim Taymans
3317af804b pw-profiler: add profiler tool
Add Profiler object and fields.
Add profiler extension API. It notifies Profiler objects with
real-time performance data.
Add module that implements the profiler extension.
Add pw-profiler tool that binds to the profiler API and dumps the
data into a log file, gnuplot files, a html page and a script to
generate svg graphs. This is almost the same as what JACK2
JackEngineProfiling does.
2020-01-31 15:13:47 +01:00
Wim Taymans
7450bfd88b Improve mlock failure warning message 2020-01-29 11:07:26 +01:00
Wim Taymans
1c46dc32f8 protocol-native: improve message debug 2020-01-17 11:00:09 +01:00
Wim Taymans
4169d9196d module-access: handle -EACCES as non-flatpak
If we can't access the root filesystem, grant access to the app.
This should not happen but for now it is a workaround for selinux
where we can't access the gnome-shell root when it connects for
screen sharing.
2020-01-15 17:17:56 +01:00
Wim Taymans
1cedfade3a protocol: improve old version check
Check if the pod size is > 4 because the unit test adds one fd
in the first message.
2020-01-15 12:24:11 +01:00
Wim Taymans
043e7f24fe add some more useful defines
Add define to match all ids for nodes and params.
Add define for invalid permissions
2020-01-15 11:15:51 +01:00
Wim Taymans
cf53ededd0 connection: improve old version check
Check the type of the pod in the message instead. Old versions
should not have 0 there, new versions keep the number of file
descriptors, which should be 0 for the first message.
2020-01-15 10:29:58 +01:00
Wim Taymans
0ea8a92ea5 core: implement pw_core_set_paused
Make it possible to pause emision of events from the core object.
This is interesting if we need to wait for completion of some operations
on another connection before resuming processing.

See #204
2020-01-14 16:37:01 +01:00
Wim Taymans
bdc82bb94b typemap: add more video types 2020-01-03 09:33:59 +01:00
Wim Taymans
df519ee3b3 avoid including private.h
Expose some more methods to make it possible to build without
including the private.h header, especially in modules.
2020-01-02 13:48:50 +01:00
Wim Taymans
f391353c7f Make interface types a string
This is more in line with wayland and it allows us to create new
interfaces in modules without having to add anything to the type
enum. It also removes some lookups to map type_id to readable
name in debug.
2019-12-19 13:36:04 +01:00
Wim Taymans
2a4c57798d client-node0: remap target node property 2019-12-17 17:55:15 +01:00
Wim Taymans
e9b62c0ce6 v0: set media class
Set the media class on the client-node after we know the number of
ports.
Add more type mappings
Fix change_mask on core_info
2019-12-17 17:34:10 +01:00
Wim Taymans
d3f4dda51b client-node: improve debug 2019-12-17 11:35:04 +01:00
Wim Taymans
05f93cd750 media-session: improve cleanup 2019-12-17 10:47:31 +01:00
Wim Taymans
1317ca140c pass spa_dict around as config
Don't pass pw_properties around when we simply need to pass around
config info, only use pw_properties when used to construct an object
that keeps the properties.
2019-12-13 11:26:05 +01:00
Wim Taymans
f724319e8a context: move core implementation to impl-core.h
Move the core implementation to a separate file. Make a default
core object in the context.

Pass impl-core to server. We now tie the server to a core. Also
keep track of the core that a client connected to.

Fill the properties that we usually use to connect in the context
and copy them when a connection is made.

Use "internal" as the remote name to connect to the default
internal core.
2019-12-12 16:34:01 +01:00
Wim Taymans
2a142edadb pw_impl_port_new -> pw_context_create_port 2019-12-11 18:07:03 +01:00
Wim Taymans
930b595724 pw_impl_node_new -> pw_context_create_node 2019-12-11 17:59:00 +01:00
Wim Taymans
6043a3f8c0 pw_impl_device_new -> pw_context_create_device 2019-12-11 17:56:24 +01:00
Wim Taymans
c3f6524120 pw_impl_link_new -> pw_context_create_link 2019-12-11 17:54:27 +01:00
Wim Taymans
e96bdc6bd9 pw_impl_client_new -> pw_context_create_client 2019-12-11 17:52:15 +01:00
Wim Taymans
310077438b pw_impl_factory_new -> pw_context_create_factory 2019-12-11 17:50:27 +01:00
Wim Taymans
73eea24443 impl-client: improve constructor
Pass the protocol in constructor
Keep the link in the server protocol list private to the prototol.
2019-12-11 17:19:12 +01:00
Wim Taymans
d99b1918ed small cleanups 2019-12-11 16:51:38 +01:00
Wim Taymans
3805d5dfa2 pw_endpoint_stream_proxy -> pw_endpoint_stream 2019-12-11 16:48:00 +01:00
Wim Taymans
9b53c65c72 pw_endpoint_proxy -> pw_endpoint 2019-12-11 16:43:53 +01:00
Wim Taymans
85103d128e pw_session_proxy -> pw_session 2019-12-11 16:39:24 +01:00
Wim Taymans
3c737cf39c pw_endpoint_link_proxy -> pw_endpoint_link 2019-12-11 16:36:12 +01:00
Wim Taymans
94ed9c8e38 pw_client_endpoint_proxy -> pw_client_endpoint
pw_client_session_proxy -> pw_client_session
2019-12-11 16:31:58 +01:00
Wim Taymans
743450a19f pw_client_node_proxy -> pw_client_node 2019-12-11 16:13:46 +01:00
Wim Taymans
c23006fcdb pw_port_proxy -> pw_port 2019-12-11 15:59:26 +01:00
Wim Taymans
beb3c69dfe pw_node_proxy -> pw_node 2019-12-11 15:26:11 +01:00
Wim Taymans
199fa47216 pw_module_proxy -> pw_module 2019-12-11 15:16:30 +01:00
Wim Taymans
e633e205c2 pw_link_proxy -> pw_link 2019-12-11 15:11:56 +01:00