Commit graph

1044 commits

Author SHA1 Message Date
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
c613ae4b40 v4l2: unset format, then close
v4l2 does not want to close unless the format is cleared
2018-02-16 18:14:24 +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
cafb22a6b9 alsa: only try to pull when out of buffers 2018-02-16 16:56:19 +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
7ffaaf66a7 v4l2: remove source on errors 2018-02-15 10:47:43 +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
f37f8ce70d v4l2: keep separate field for mapped fd
When mapping an input memfd, don't write the mapped pointer into the
buffer but keep a separate field for it.
2018-02-12 11:35:49 +01:00
Wim Taymans
29dbffea52 v4l2: map memfd when not already mapped 2018-02-12 11:04:28 +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
342f0d59d0 node: add some more port flags
Add port flags to mark physical and terminal ports
2018-02-09 18:05:35 +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
5f89cf4fa2 type-map: fix char array definition 2018-02-08 12:40:09 +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
21e3b4cec7 c++ compiler fixes 2018-02-08 11:24:20 +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
c5df05d3f3 v4l2: respect MAX_CONTROLS limit 2018-02-07 18:14:11 +01:00
Wim Taymans
3289e3fb7e v4l2: handle control properties
Add the right propId to properties so they can get controls.
Keep track of properties and handle the io area for them
Check if properties changed and update the v4l2 controls
2018-02-07 18:08:16 +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
8e89474c7e v4l2: generate prop id for controls
Generate a propid so that they are added as controls
2018-02-07 11:51:51 +01:00
Wim Taymans
4c1dc20eac io: remove unused field 2018-02-07 11:31:47 +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
c524fae523 list: add more helpers 2018-02-06 09:25:27 +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