Commit graph

2311 commits

Author SHA1 Message Date
Wim Taymans
13fd6be747 media-session: only subscribe to readable params 2020-05-07 20:58:53 +02:00
Wim Taymans
6203fb967c log: make line==0 suppress the file/line/func output
Disable file/line/func output for pod debug
2020-05-07 20:42:52 +02:00
Wim Taymans
79fd4c941f debug: Don't debug EBUSY params
When a device returned EBUSY when enumerating params, don't try to
enumerate (and fail) them again.
2020-05-07 17:15:46 +02:00
Wim Taymans
f02c339645 Improve debug
Dump enum_params of failed format and buffer negotiation to error log.
2020-05-07 17:15:43 +02:00
Wim Taymans
97c8e674ac command: add log.level property
Support setting the log level from the config file.
2020-05-07 17:15:39 +02:00
Wim Taymans
3712ebc434 proxy: fix cleanup
Keep track if the proxy is still in the core object map or not
and make sure to only delete it once.

In _remove, just remove the item from the object map if the proxy
is destroyed. There is no need to call _proxy_destroy again (and
do the extra unref)
2020-05-07 17:09:07 +02:00
Wim Taymans
2c13b3ecd2 client-node-v0: return -ENOENT when parameter not found 2020-05-07 10:42:19 +02:00
Wim Taymans
55d75fb075 tools: add pw-metadata tool
Add tool to inspect, monitor, set and delete metadata keys.
2020-05-06 15:57:12 +02:00
Wim Taymans
649448fb5f array: add and use pw_array_consume 2020-05-06 15:56:31 +02:00
Wim Taymans
720b7b5c6a metadata: emit removed messages from clear
Consume the array until we have removed all subjects.
2020-05-06 15:47:14 +02:00
Wim Taymans
d6b1342bab meson: always build pw-mididump 2020-05-06 12:31:18 +02:00
Wim Taymans
28d47c79f0 link: also recalculate graph when a prepared link is destroyed 2020-05-06 11:37:44 +02:00
Michael Tretter
52c14e2378 gst: keep track of queued buffers
Pipewire might update buffers that have not been recycled by GStreamer,
because they are still used downstream. There is nothing we can do about
it in the pipewiresrc.

If a buffer is sent downstream more than once, take an additional
reference to make sure that we don't queue a buffer that is still used
and print a warning.
2020-05-05 13:53:02 +00:00
George Kiagiadakis
283d7f6e9b session-manager: fix typo in key 2020-05-05 10:07:44 +03:00
Wim Taymans
4e9fd6633b node: rate-limit the graph warnings 2020-05-04 16:49:32 +02:00
Wim Taymans
9049f1fdbb spa-node: don't warn on properties
When the node does not support enum_params or when the Props param
is not supported, suppress the warning.
2020-05-04 13:02:30 +02:00
Wim Taymans
8fe5b58686 pw-mididump: add getopt 2020-05-03 20:48:42 +02:00
Wim Taymans
6d5563a978 tools: add tool to dump midi messages 2020-05-03 11:51:51 +02:00
Wim Taymans
22cc1f903f stream: clean up enum_params 2020-05-03 11:43:56 +02:00
Wim Taymans
2efa3f00ac return -ENOENT when param doesn't exist 2020-05-03 10:13:50 +02:00
Wim Taymans
5b9e82c4e8 pw-cat: add pw-midiplay and pw-midirecord aliases 2020-05-01 11:35:51 +02:00
Wim Taymans
f11cd32258 node: improve warnings
Make separate warnings for read failure and xrun
2020-05-01 11:24:14 +02:00
Wim Taymans
940ff7f53b client-node: improve error reporting
Separate read failure and missed wakeup in 2 messages.
2020-05-01 11:23:54 +02:00
Wim Taymans
3324a15fe3 protocol: use bool for Bool pod 2020-04-30 17:12:20 +02:00
Wim Taymans
0fd46d057e remote: free io area after we set the new area
First set the new area, then destroy the old one. Otherwise the
data thread might still be using the old area and crash.
2020-04-30 16:13:50 +02:00
Wim Taymans
dc331aa562 add more warnings and fix one 2020-04-30 16:07:23 +02:00
Wim Taymans
ac9f2a020f filter: make sure to sync the position with data thread 2020-04-30 13:46:39 +02:00
Wim Taymans
acd9991bfc remote-node: remove unused position area 2020-04-30 11:55:46 +02:00
Wim Taymans
cec26494f8 data-loop: add function to invoke
Add function that invokes the given function in the context of the
thread or the caller thread depending on if the thread is running.
2020-04-30 11:54:15 +02:00
Wim Taymans
5e99e7da49 alsa-monitor: remove timeout in destroy 2020-04-29 17:12:22 +02:00
Wim Taymans
0380c6d91e suspend-node: remove idle handler in destroy
Or else the idle handler might go off when we are already destroyed.
2020-04-29 16:41:41 +02:00
Wim Taymans
856e1fe812 client-node: don't error in cleanup
It's possible the cleanup code might try to clean up ports we
already removed, don't show an error on that.
2020-04-28 13:56:23 +02:00
Wim Taymans
69bc57864a link: improve state management
Only activate a link when both nodes are active
Don't try to prepare the link when already prepared.
Only unprepare the link when it was prepared
2020-04-28 12:17:33 +02:00
Wim Taymans
f5e4a6b225 link: track active state of nodes
Keep track of the node active state, when both are active, we can
prepare (negotiate) the link.

After a link has been prepared we can activate it. When we deactivate
the link, we don't need to prepare again.

When a port loses buffers or format, set the link back to the
unprepared state.

This fixes the case where:
 1) a node becomes inactive and goes to suspend, the link becomes
    unprepared
 2) the node becomes active again and need to be prepared again
2020-04-28 11:45:52 +02:00
Wim Taymans
68268a0116 context: improve states
Don't try to IDLE a suspended node.
Don't try to start an inactive node.
2020-04-28 11:42:45 +02:00
Wim Taymans
ea9a016797 context: reorganize graph recalc
Move quantum calculation after adding unassigned to fallback drivers
so that they also receive the required quantum.
2020-04-28 09:58:43 +02:00
Wim Taymans
2220d5b9b6 support: add dummy driver
Add a dummy driver node with high priority. All nodes not linked
to a device node will be linked to this when they require a driver.
2020-04-27 20:21:31 +02:00
Wim Taymans
93211549a4 log: add option to disable line numbers 2020-04-27 11:18:49 +02:00
Wim Taymans
b69bdc1eff context: improve graph states
Keep the first active node as the fallback node. We use this node
as the target when no oher active nodes exist.

Only assign the target node to active nodes.

When we assign an unassigned node, simply update the active followers
of the target, the state of the nodes and target itself will then
be taken care of later.

When registering nodes, only active nodes can influence the state of the
graph.

Update some comments
2020-04-27 11:16:14 +02:00
Wim Taymans
d024229166 node: improve debug 2020-04-24 11:51:42 +02:00
Wim Taymans
667c08ecc4 context: improve graph recalc
Add reason to why we recalculate the graph for debugging purposes
Only recalculate graph when something relevant changed.
Block recalc from being called recursively.
2020-04-24 11:27:00 +02:00
Wim Taymans
39c2d5b963 gst: remove internal queue
Remove the extra queue and use the queue from pw_stream.
Fix some locks and the bufferpool handling to make audio playback
work.
2020-04-23 15:56:12 +02:00
Wim Taymans
7b13ba202b node: also IDLE when not active
Inactive nodes can be set to IDLE
2020-04-23 13:22:38 +02:00
Wim Taymans
972b843851 node: don't suspend when already suspended 2020-04-23 13:10:02 +02:00
Wim Taymans
5d12929153 gst: use the pw_stream queue
There is no need to keep a separate queue in the source, simply use
the one from pw_stream.
2020-04-23 13:01:03 +02:00
Wim Taymans
26fa35a0e7 gst: always use the clock time
Also use the clock time when the stream is not yet started.
2020-04-23 12:38:05 +02:00
Wim Taymans
4cb2d58e89 factory: do more version checks
So that we don't accidentally load an old plugin.
2020-04-22 18:10:26 +02:00
Wim Taymans
2c76ec5193 context: simplify state changes
Keep track of when a link is prepared, this is when the link has
successfully negotiated a format and buffers.

Only follow prepared links when collecting nodes in the graph.

Set the state of the driver and its nodes based on how many active
nodes the driver has. We don't have to do state changes on the nodes
from the link anymore then and we can get rid of the counters.

Only set the io on the mixer ports when prepared because we might
need a special mixer element based on the format.

Remove passive links for now.

This fixes many cases where the graph would stall when linking/unlinking
ports in various combinations.

Fixes #221
2020-04-22 17:09:42 +02:00
Wim Taymans
aafd1e7298 improve debug
Improve log so that debug level 3 gives a reasonably readable overview
of what is going on.
2020-04-22 12:47:18 +02:00
Wim Taymans
8ab67c5fa0 mem: implement remove_id
Rename (the non-exported symbol) _unref_id -> _remove_id and make it
remove the id from the map of known ids. This way, the server can send
the remove_mem and reuse the id for new memory before all references
are gone. Fixes "invalid mem id X, expected Y" errors.
2020-04-22 11:30:53 +02:00