Commit graph

841 commits

Author SHA1 Message Date
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
Thomas Hindoe Paaboel Andersen
fa5c2000f9 cli: use a signed type for return value
read() returns ssize_t where a negative number is used for errors.
The value was read into a size_t and then checked for <0.

Change to ssize_t to handle the negative number.
2017-10-19 22:43:31 +02:00
Wim Taymans
127d69e4a0 jack: remove nodes we created 2017-10-19 17:52:24 +02:00
Wim Taymans
177ffd766c jack: fix buffer reuse 2017-10-19 16:50:39 +02:00
Wim Taymans
d3d557c166 cli: don't try to destroy NULL 2017-10-19 15:48:40 +02:00
Wim Taymans
f19edc16ab link: activate before start
Activate the link before we start the nodes to make sure we are
linked when the nodes start to push things.
2017-10-18 10:05:06 +02:00
Wim Taymans
530caf35db *testsrc: async == live for now 2017-10-18 10:04:31 +02:00
Wim Taymans
65a8bc8b34 graph: improve debug 2017-10-18 10:03:55 +02:00
Wim Taymans
5e21edd8d5 spa-node: parse bool properties
Add some more helpers to parse property values
2017-10-18 10:02:55 +02:00
Wim Taymans
5a9c4981d8 mixer: remove nodes we created 2017-10-17 16:57:26 +02:00
Wim Taymans
c818ab78cf alsa: safely remove the source 2017-10-17 16:56:44 +02:00
Wim Taymans
c5385805bd alsa: reuse_buffer is without buffer_id in port_io 2017-10-17 15:38:30 +02:00
Wim Taymans
b589b7062d Add support for NULL strings 2017-10-17 12:16:53 +02:00
Wim Taymans
323c644084 fix crashes and leaks on shutdown 2017-10-17 10:14:56 +02:00
Wim Taymans
f817aabe24 Work on better scheduling
Also use double buffering for the client-node input, we process the
output of the previous cycle.
Only process the reuse_buffer if the client is explicitly going to
send them otherwise, recycle right after sending.
Let the tee and mix pass the io status upstream.
Initialize io area with NEED_BUFFER for inputs.
Implement reuse_buffer for the remote.
2017-10-16 18:14:35 +02:00
Wim Taymans
957a03e3f8 export-source: implement reuse_buffer 2017-10-16 18:13:43 +02:00
Wim Taymans
c386eda653 volume: mark input busy while processing output 2017-10-16 18:13:11 +02:00
Wim Taymans
630dbd2c90 jack: Use latency of sink as buffer size 2017-10-16 18:12:20 +02:00
Wim Taymans
ce6b75cf63 Small cleanups 2017-10-16 18:09:59 +02:00
Wim Taymans
574c6d4b90 v4l2: only produce data when needed
We should only produce data when the io area status is NEED_BUFFER.
2017-10-16 13:23:20 +02:00
Wim Taymans
9706c191b9 client-node: don't misuse ASYNC flag
When the client is explicitly going to send reuse_buffer messages,
set the consumed buffer to INVALID so it doesn't automatically get
reused.
ASYNC is for when the node emits events to signal input and output it
has nothing to do with reuse_buffer
Remove weird PROCESS_INPUT code.
2017-10-13 18:12:06 +02:00
David Svensson Fors
28bf6137d3 Support for "client-reuse" streams
Add a PW property "pipewire.client.reuse". If set, the client-node
doesn't immediately reuse a buffer after sending
PW_CLIENT_NODE_MESSAGE_PROCESS_INPUT to the client. Instead, it waits
for reuse-buffer from the client. The SPA_GRAPH_NODE_FLAG_ASYNC is
used for this, together with adapted logic in process_input().

In stream.c, if the property is set, the handling of incoming buffers
for PW_DIRECTION_INPUT streams is changed. Each buffer has to be
recycled, so we make sure new_buffer is emitted for each intermediate
buffer, if buffer_id in the IO area has moved past some buffers.

Change-Id: I137a12b702b857cc73369930d7029ecbd69d63ff
2017-10-13 17:47:29 +02:00
David Svensson Fors
de8e0c8f8c stream: let recycle_buffer() have effect for input streams
For PW_DIRECTION_INPUT streams, set the used flag for buffers before
emitting new_buffer. This makes recycle_buffer() effective.

Change-Id: I869c2bd303e19974de79e8ada334a485c58f6592
2017-10-13 16:39:06 +02:00
David Svensson Fors
46b738282c pipewiresrc: recycle each buffer
Change-Id: Id0d415d830c6e7a27245102db6eb1068aa3c5f41
2017-10-13 16:36:16 +02:00
Wim Taymans
caca6dffd0 port: optimize tee reuse_buffer a bit 2017-10-13 16:35:31 +02:00
David Svensson Fors
ed9851ab0f port: schedule reuse-buffer
Handle reuse-buffer in output-port tee nodes and input-port mix
nodes. In both cases, reuse-buffer is forwarded to the input ports of
the tee/mix node.

Change-Id: Ifbe8bcf07f0adc6400accc64a9bfb63a5c70e215
2017-10-13 16:31:37 +02:00
Wim Taymans
d96d40e30a Add set_active method on node
Require that nodes need to be activated before they are scheduled.
Make method to activate remote node.
Add method to pause/resume stream.
2017-10-13 16:18:42 +02:00
Wim Taymans
acfdc63f26 don't include stdio 2017-09-29 13:39:26 +02:00
Wim Taymans
4fb97f78f7 Fix compilation with older SDL2 2017-09-29 13:35:37 +02:00
Wim Taymans
93bd18ccc5 fix build of test 2017-09-29 12:18:38 +02:00
Wim Taymans
d65012ff21 remove json stuff
using JSON for formats or properties is not a good idea because we can't
add more types like pointers, fd, rectangles without weird hacks. Our
PODs are more easy to parse and extend and now there is an easy way
to parse and create them as well.
2017-09-28 17:07:43 +02:00
Wim Taymans
81e5708442 move type remap to native protocol 2017-09-28 17:01:01 +02:00
Wim Taymans
24d80e5c00 Add new pod parser and builder
Add a new pod builder and parser that is less verbose and
a little more powerful.
2017-09-28 17:00:51 +02:00
Wim Taymans
3e49aec61b json tests: add properties and 2017-09-21 18:03:48 +02:00
Wim Taymans
b93ecb70fc more experiments: add json pattern matcher 2017-09-20 20:33:15 +02:00
Wim Taymans
86c8955c3a more json tests 2017-09-20 13:06:52 +02:00
Wim Taymans
ac382c052a Work on JSON based format descriptions 2017-09-20 08:03:56 +02:00