Commit graph

3893 commits

Author SHA1 Message Date
Wim Taymans
2fe7197930 node: add option to pause-on-idle
v4l2 is slower to start when we pause in idle. Disable this
behaviour with an option on the node.
2018-02-20 12:28:19 +01:00
Wim Taymans
920d098ea7 video-src: pause timeout when not streaming 2018-02-20 11:41:48 +01:00
Wim Taymans
b1492aa130 thread-loop: ensure the right clock is used
Use the right clock for the cond variable.
2018-02-20 11:18:49 +01:00
Karin Hedlund
43a384c51e thread-loop: add timed wait 2018-02-20 10:54:10 +01:00
Wim Taymans
58667d6ced params: make method on node and port to enum params
Do not pass the params of the node in the node_info, instead,
make a method to enumerate the params. This makes it possible for
clients to only enumerate what they need and when they need it.
Improve introspection of a port, add the name and properties.
Add an enum_param method on the port that can be used to enumerate
port formats.
Change -monitor and -cli and add support for enum_params on the node
and port.
2018-02-20 10:31:55 +01:00
Wim Taymans
a9a95a4205 audio-dsp: start counting from 1, to match jack ports 2018-02-20 10:01:10 +01:00
Wim Taymans
0e5a1b6327 props: use macro for property alternatives 2018-02-20 09:36:05 +01:00
Wim Taymans
f039238288 audio-dsp: implement buffer size param 2018-02-16 18:15:37 +01:00
Wim Taymans
9cb2891741 cli: implement destroy 2018-02-16 18:15:06 +01:00
Wim Taymans
0a57c86c25 link: clear port buffers when not in use and not owner
When we are the owner of the buffers, we want to keep them until
we suspend.
2018-02-16 17:56:25 +01:00
Wim Taymans
922099c67e link: always make ouput owner of buffers
Make the output pad owner of the buffers, if we have multiple outgoing
connections from the outpad we don't want that buffers to disappear.
2018-02-16 16:55:18 +01:00
Wim Taymans
5034770eae node: unlink ports before destroy
First unlink the ports, then destroy them. This is a more natural
way of cleaning up.
Make sure we destroy the node after destroying the ports.
Destroy the port after destroying its controls
Destroy resources after destroying the global
2018-02-16 12:04:33 +01:00
Wim Taymans
3db9a44679 dsp: make separate nodes for sinks and sources
Make separate nodes for sinks and sources
Add aliases for ports
2018-02-16 12:02:39 +01:00
Wim Taymans
8c4bb3a104 factory: improve registration 2018-02-16 12:01:18 +01:00
Wim Taymans
0173180e78 module-audio-dsp: add dsp module
Add an audio dsp module that adds an interleaver for each audio sink
and only allows 1 buffer size and format on the ports. The idea is that
dsp (pro-audio) nodes can be inserted in this part of the pipeline.
2018-02-15 17:54:08 +01:00
Wim Taymans
6c000229f0 port: add port globals
Expose all ports as globals, linking is then done by specifying
the global id of the ports.
Add method to destroy objects. not much security on this one but
yet but it should allow priviledged clients to kill connections
and other clients etc.
Make events on the global object. Implement the bind with the event,
handle destroy of the globals.
Add link properties
Use append to preserve the order.
2018-02-15 17:49:04 +01:00
Wim Taymans
b86f141273 add more debug info 2018-02-15 11:41:07 +01:00
Wim Taymans
95e27c27ca protocol: signal when connection was closed 2018-02-15 10:49:01 +01:00
Wim Taymans
96fdfc86f7 link: avoid getting params
We don't need to iterate the port params again when we already
can reuse buffers from the ports.
2018-02-13 10:48:33 +01:00
Wim Taymans
cc53023fb9 remote: fix clear_memid
Use a separate variable to iterate the mem_ids.
Clear some more fields.
2018-02-13 10:29:30 +01:00
Wim Taymans
8a4f3c546d port: remove port_pause
port_pause is not needed, spa elements should pause themselves when
setting NULL format or buffers.
Handle use_buffer or alloc_buffer error cases.
Clear buffers in the port before cleaning up the memory.
2018-02-13 10:22:30 +01:00
Wim Taymans
f2f94c4f72 examples: handle NULL io areas 2018-02-13 10:16:55 +01:00
Wim Taymans
fdfce79edb connection: return false on read error
Return false to indicate that there is no more data to read or else
we add the -1 to buffer_size and things go wrong..
2018-02-12 17:32:09 +01:00
Wim Taymans
df57656615 remote: improve map/unmap of io area
Make sure we map and unmap the io area for controls.
Handle reset of io area
2018-02-12 11:44:37 +01:00
Wim Taymans
9b9a7411f5 port: set some more properties 2018-02-09 18:16:07 +01:00
Wim Taymans
dfa39ab2ff node: set node name in global 2018-02-09 18:15:03 +01:00
Wim Taymans
001e693e5c global: fix parent global
Only use the global of the owner as the parent if we don't already
have a parent.
2018-02-09 18:13:19 +01:00
Wim Taymans
70687e466d client-node: update port properties
Handle port properties
Set the client name
2018-02-09 18:10:51 +01:00
Wim Taymans
60177646e9 examples: remove some unused types 2018-02-09 12:03:28 +01:00
Wim Taymans
c0f8f811e8 node: fix adding ports 2018-02-09 11:58:12 +01:00
Wim Taymans
2198cbe00f node: only remove from graph when added 2018-02-09 11:57:52 +01:00
Wim Taymans
d841e0f778 pipewiresrc: use the right allocator for dmabuf
Use the dmabuf allocator when we get dmabuf memory.
https://github.com/PipeWire/pipewire/issues/31
2018-02-08 12:24:23 +01:00
Wim Taymans
f049d3dc7f Fix compiler issues with c++ 2018-02-08 10:49:08 +01:00
Wim Taymans
72e98dc74a load rtkit module by default 2018-02-08 10:04:13 +01:00
Wim Taymans
9d4b0d8358 dbus: move rtkit to module
Move the rtkit code to a module.
Make sure we don't need to include the dbus headers in the spa dbus
interface. This removes the dependency on dbus.
2018-02-08 10:02:17 +01:00
Wim Taymans
06ba8c9a7e export-sink: change contrast property 2018-02-07 18:16:01 +01:00
Wim Taymans
2fe6a8245d control: keep track of prop_id
Keep track of the property id which describes the property
functionality.
Link controls based on the property instead of the param_id.
2018-02-07 17:56:35 +01:00
Wim Taymans
053f251be8 client-node: handle io reset 2018-02-07 17:54:43 +01:00
Wim Taymans
9225ec29f2 control: emit linked/unlinked event on both controls 2018-02-07 11:56:00 +01:00
Wim Taymans
f9237eb0db control: keep track of linked controls
Keep track of what controls are linked together.
Clean up links on destroy.
Implement unlink, reset io area.
Add events for control link/unlink
2018-02-07 11:52:55 +01:00
Wim Taymans
935efffe0e deviceprovider: only create devices once
We can get many info updates from a device. Only create the device
once and ignore the other updates.
2018-02-06 16:12:31 +01:00
Wim Taymans
d14c7abe11 protocol: make connect async
Make the protocol client connect call async with a callback when it
completes.
Move the connect methods into separate files, add an empty connect
method that will use the screencast portal to get a pipewire fd.
Use the remote intention to get the connect method.
Add some better error reporting.
2018-01-30 15:11:39 +01:00
Wim Taymans
ad1e5fdc10 monitor: set node enabled state
Let the monitor update the node enabled states when creating
and on change events.
2018-01-30 15:08:44 +01:00
Wim Taymans
bd1fea49c2 node: add enabled state
Add method to enable/disable a node. Disabled nodes will SUSPEND and not
be available for automatic connections, it is intented for handling
the monitor node state.
2018-01-30 15:05:23 +01:00
Wim Taymans
8882b2316e remote: add get_properties method 2018-01-30 14:50:46 +01:00
Wim Taymans
cb0811860f jack: add property to select node to link to 2018-01-27 11:46:15 +01:00
Wim Taymans
1361a12094 spa-node: use new function to parse arguments 2018-01-27 11:46:15 +01:00
Wim Taymans
5fbf79a4b2 jack: fix param enum 2018-01-27 11:46:15 +01:00
Wim Taymans
b5f9983c4e properties: add method to parse key=value list 2018-01-27 11:46:15 +01:00
maxice8
1e411bfe09 pipewire/private.h: add missing sys/types.h for pthread_t 2018-01-27 07:40:04 +01:00