Commit graph

877 commits

Author SHA1 Message Date
Wim Taymans
7204f3e047 update docs 2017-11-13 19:58:52 +01:00
Wim Taymans
440f681f4b Improve enum_param
Add an argument to pass the result param to the caller instead of
having the caller have to pick it up from the builder.
Improve docs for node, clock and monitor
Pass spa_pod everywhere instead of spa_pod_object.
Pass result argument to spa_pod_filter to make things a little
nicer.
2017-11-13 17:57:38 +01:00
Wim Taymans
cd5e697e9f builder: make methods to save and restore state 2017-11-13 12:30:48 +01:00
Wim Taymans
737b428077 builder: make deref safer
Don't try to deref objects that did not fit into the memory.
Deref now returns the object
2017-11-13 11:50:50 +01:00
Wim Taymans
101d2af1be connection: signal errors 2017-11-13 11:33:07 +01:00
Wim Taymans
6fb0f580ea Use errno for result errors
Make new enumeration for data transport status and use errno
style error numbers for errors.
2017-11-13 09:41:41 +01:00
Wim Taymans
dda28b1589 cleaup up the result codes 2017-11-10 16:11:53 +01:00
Wim Taymans
caaeaff223 Reorganise SPA tree
Reorganise the SPA includes to make it more extensible later
Simplify the naming of the buffer and meta params
2017-11-10 13:36:14 +01:00
Wim Taymans
58451d626c Implement param filtering
Make a new pod filter function and use it in the plugins to filter
in enum_params.
Small tweaks to the pod_builder
2017-11-09 17:16:54 +01:00
Wim Taymans
cc47fb7e3a clean up pod_builder
Remove the frame argument from the builder, we can use the builder
allocated frames.
Add deref function to builder to make it more flexible later.
Add some more recursion depth checks in the parser.
Improve props filter, also filter other types.
2017-11-08 15:48:31 +01:00
Wim Taymans
30a4651c51 Various fixes and improvements to enum_params 2017-11-08 11:22:42 +01:00
Wim Taymans
4d890a2d98 small cleanups
Remove the temp storage for formats and props now that we get a builder
from the host to write into.
2017-11-07 20:28:07 +01:00
Wim Taymans
f3bca48398 Unify props, params and formats
Make enum_params and set_param to configure properties, format
and other parameters. This allows us to remove some duplicate
code and make the properties and parameters much more extensible.
Use the object id to mark the id of the parameter.
Remove the spa_format and spa_props.
We can now make the client-node easier by merging the various
format methods into the params.
Make the stream API more powerful now that we can pass params
around.
2017-11-07 17:48:40 +01:00
Rasmus Thomsen
b6ee67905d spa: install pop-parser.h 2017-11-03 18:27:32 +01:00
Wim Taymans
63fe535352 Back to development 2017-11-03 12:43:50 +01:00
Wim Taymans
5fec60078d Release 0.1.6 2017-11-03 12:40:03 +01:00
Wim Taymans
25212235b9 audiomixer: add log 2017-11-03 12:26:16 +01:00
Wim Taymans
f58a567af8 export-source: set buffer output size 2017-11-02 16:54:36 +01:00
Wim Taymans
3f020cd350 audiomixer: simplify code
Pretend there are ringbuffers on input and output buffers and simulate
them otherwise to make some code paths simpler.
2017-11-02 16:51:26 +01:00
Wim Taymans
e303485757 alsa: suggest ringbuffer of max-latency size
With a ringbuffer of max-latency size we never receive more data than
the max-latency, which is exactly what we want.
2017-11-02 16:49:56 +01:00
Wim Taymans
8c77332f25 Improve ringbuffer support
Fix ringbuffer mixing in audiomixer
Add ringbuffer support in audiotestsrc params
Don't recycle buffers before signaling have_output, the app is supposed
to recycle explicitly or with a process_output call.
Add some trace to graph functions in tests
Add ringbuffer support in export-source
2017-11-02 15:19:20 +01:00
Wim Taymans
e11e19f3e7 audiomixer: fix buffer reuse
Only reuse the buffer after we consumed all data
2017-11-02 12:41:34 +01:00
Wim Taymans
307239767c audiomixer: add ringbuffer handling 2017-10-31 16:01:26 +01:00
Wim Taymans
af99c196c9 alsa: improve ringbuffer handling
Add max-latency property to configure the maximum amount we write
to the device.
Only try to pull after we consumed our current buffers.
2017-10-31 15:59:08 +01:00
Wim Taymans
f04b292d08 remote: ask for input in start 2017-10-27 18:13:48 +02:00
Wim Taymans
61555ab3b5 client-node: Rework scheduling
Only send data to a client when it has sent a NEED_INPUT otherwise
recycle the buffers immediately.
Explicitly recycle buffers when the client is not going to do this.
2017-10-27 18:04:00 +02:00
Wim Taymans
d594444059 export-sink: add sanity checks 2017-10-27 17:59:51 +02:00
Wim Taymans
3138e20cb6 v4l2: rename variable from state -> port 2017-10-27 17:57:45 +02:00
Wim Taymans
91ba492712 alsa: improve ringbuffer params
Always reuse the ringbuffer after we consumed some of it. This is
the trigger for upstream to write some more in the buffer.
2017-10-27 17:54:34 +02:00
David Svensson Fors
84d422bc46 stream: light-weight buffer recycling while in new_buffer
When recycle_buffer() is called while in the new_buffer event handler,
don't send the reuse_buffer event. Instead, mark the buffer for
recycling by putting the buffer ID in the IO area, which is more
light-weight. When need_input reaches the server, it will recycle the
buffer.

Also introduce a helper function for sending the reuse_buffer event.

Change-Id: I900e75694efce2fa7e12840eaf53a7f6b7ae7e8a
2017-10-27 17:47:59 +02:00
David Svensson Fors
82eaf7e8dd stream: emit new_buffer only if HAVE_BUFFER
Emit the new_buffer event only if the IO area status is HAVE_BUFFER.

In client-reuse mode, also clear the buffer ID - we need an explicit
recycle call before recycling.

Change-Id: I139663068ef12669adc13b7e351666c8469dee72
2017-10-27 17:47:45 +02:00
Wim Taymans
ff242550c8 stream: update port_io before sending need_input
Update the port_io area to NEED_BUFFER right before starting
2017-10-27 17:45:29 +02:00
Wim Taymans
0662f3a3ea Small fixes for error handling 2017-10-26 15:13:33 +02:00
Wim Taymans
08aa175a20 client-node: use graph structures for scheduling
Use the graph structures in the RT thread to iterate ports etc.
2017-10-25 18:39:56 +02:00
Wim Taymans
b25985a2b2 client-node: split setup of transport and fds
We can initialize the transport as soon as we get async notify
from the client when setup completes. Node initialization happens
after that and then finaly the node is initialized and we can send
the transport and fds.
Small cleanups
2017-10-25 17:00:25 +02:00
Wim Taymans
4f33a37ac6 alsa: report underrun better 2017-10-24 18:04:03 +02:00
Wim Taymans
5b4a4922db client-node: only pull once
When we pull, don't pull again until we get the reply or else we
might overwrite the result in progress.
2017-10-24 18:02:54 +02:00
Wim Taymans
7f5c6ddd46 volume: only queue output buffers
Fix volume function, we try to write as many bytes as we can to the
output buffer and set the offset and size in the chunk;
Add some logging
2017-10-24 13:01:13 +02:00
Wim Taymans
eef6f380c1 remote: handle per port buffers and memory 2017-10-24 13:00:32 +02:00
Wim Taymans
e969e8854b alsa-utils: calculate size correctly 2017-10-24 12:59:52 +02:00
Wim Taymans
a691d07531 use spa_list_append when we can 2017-10-24 12:58:10 +02:00
Wim Taymans
4aaa2cbc6b alsa: we can always signal that there is a buffer 2017-10-22 16:08:30 +02:00
Wim Taymans
a3b614fff6 Implement explicit buffer-reuse in stream API 2017-10-22 15:12:04 +02:00
Wim Taymans
0f4142f879 v4l2: always emit have_output, recycle what was not collected 2017-10-22 14:23:50 +02:00
Wim Taymans
827f0763ef scheduler: we can schedule ready elements directly 2017-10-22 14:17:14 +02:00
Wim Taymans
df59183a66 scheduler: add new scheduler
Make port status SPA_RESULT_OK until events changes it and data
processing can start
Only start pulling on ports in the OK state
Change we way we handle client-nodes, handle them async and continue
processing after they signaled completion
Add a new scheduler that decouples push and pull. It pushes to peer
elements when all inputs are provided and pulls from nodes when all
peer outputs are processed.
2017-10-22 13:12:34 +02:00
Wim Taymans
3315de187c connection: don't error when not enough data
When there is not enough data available yet, don't fail but try again
next time.
2017-10-20 17:04:21 +02:00
Reverend Homer
ffd7b5a743 core: remove redundant return 2017-10-19 22:45:39 +02:00
Harry van Haaren
ac37d0f180 readme: add section on building with make or meson
Add a short paragraph to indicate that there are two methods
to build pipewire.

Signed-off-by: Harry van Haaren <harryhaaren@gmail.com>
2017-10-19 22:45:19 +02:00
Rasmus Thomsen
6a0ee7a298 meson.build: remove automagic docs and manpages 2017-10-19 22:44:37 +02:00