Commit graph

1239 commits

Author SHA1 Message Date
Wim Taymans
a7341ce583 node: fix support for remote driver nodes 2018-04-03 16:29:36 +02:00
Wim Taymans
c725f1f7b6 stream: rewrite using remote node 2018-04-03 16:29:36 +02:00
Wim Taymans
97952e9312 video-src: mark as driver node 2018-04-03 16:29:36 +02:00
Wim Taymans
811ea2b1c9 client-node: manage io areas
Manage the memory of io areas
2018-04-03 16:29:36 +02:00
Wim Taymans
76ed4e9468 node: add finish hook
Add a finish hook to signal when the graph of a driver node
finished.
2018-04-03 16:29:36 +02:00
Wim Taymans
99d94044d1 small cleanups 2018-04-03 16:29:36 +02:00
Wim Taymans
33a322b96e graph: new scheduling model
Make explicit links between elements that are used to activate the
next element in the graph.
Make subgraphs a special regular node. Make a link from the
subgraph children to the parent so that the subgraph completes when
all the children completed.
Implement a single process function in plugins
Remove many messages in the client node
2018-04-03 16:29:36 +02:00
Wim Taymans
9b0a880afb simplify things with just 1 process function
Make just one process function in spa node. With the io area states
we can do more complicated io patterns.
2018-04-03 16:29:36 +02:00
Wim Taymans
e8d0281982 control: undo done work in case of error 2018-04-03 16:29:36 +02:00
Wim Taymans
3a9df8096b WIP add subgraph 2018-04-03 16:29:36 +02:00
Wim Taymans
933635f63f WIP: work on per driver graphs
Make a graph per driver node and let nodes that link to this join this
graph
Work on an idea for an even simpler scheduling mechanism.
2018-04-03 16:29:36 +02:00
Wim Taymans
2d77c4dc34 stream: keep track of io area and release mem 2018-04-03 16:29:36 +02:00
Wim Taymans
60150d67f1 remote: there is no need to init the io area 2018-04-03 16:29:36 +02:00
Wim Taymans
dc091c7c00 node: remove old code 2018-04-03 16:29:36 +02:00
Wim Taymans
f2edfacf09 link: update graph on activate/deactivate
Add the mixer ports to the graph when activating and remove in
deactivate.
2018-04-03 16:29:36 +02:00
Wim Taymans
05b3c666d9 improve debug 2018-04-03 16:29:36 +02:00
Wim Taymans
f599120433 mix: keep track of mix id 2018-04-03 16:29:36 +02:00
Wim Taymans
a50ea4c929 client-node: we need io on the mixer nodes 2018-04-03 16:29:36 +02:00
Wim Taymans
52efeb5181 alsa: only pull once 2018-04-03 16:29:36 +02:00
Wim Taymans
6eea9247ea graph: add new scheduler
Move the activation state to the graph
Replace an old scheduler with a new one that works with the new
activation states.
Remove the DISABLED port flags, we explicitly add and remove to
make ports enabled/disabled.
Find first compatible port for link
Remove the node based scheduler and use the spa one.
2018-04-03 16:29:36 +02:00
Wim Taymans
c547baf952 client-node: remove the area
Remove the share node area, we don't need it
2018-04-03 16:29:36 +02:00
Wim Taymans
2a159c04ff video-play: let stream map for us 2018-04-03 16:29:36 +02:00
Wim Taymans
40d2451718 examples: add example audio source 2018-04-03 16:29:36 +02:00
Wim Taymans
0bf03abafb stream: add option to map buffers
Add an option to automatically map the buffers
Cleanups to the memory mapping
2018-04-03 16:29:36 +02:00
Wim Taymans
6f095f4cc5 link: improve clear_buffers
Clear the right mix port
Don't clear ouput ports when busy
2018-04-03 16:29:36 +02:00
Wim Taymans
533c299244 link: try to improve passive links 2018-04-03 16:29:36 +02:00
Wim Taymans
e85f7501b5 node: improve scheduling
Do a pull in links that need a buffer.
When pulling, stop when we find a node that has buffers.
2018-04-03 16:29:36 +02:00
Wim Taymans
ad6ecf6be8 audio-dsp: use flag to check if buffer is filled
Only produce a filled buffer otherwise produce an empty buffer.
Handle different buffer sizes.
Also link to a mixer
2018-04-03 16:29:36 +02:00
Wim Taymans
c018d27078 alsa-sink: cleanup 2018-04-03 16:29:36 +02:00
Wim Taymans
a3033ee2b7 client-node: improve debug 2018-04-03 16:29:36 +02:00
Wim Taymans
9758e37279 mixer: add properties
Use the propeties from the sink we are mixing and set Audio/Mixer
as the media.class.
2018-04-03 16:29:36 +02:00
Wim Taymans
1fec67086d audiomixer: debug port id 2018-04-03 16:29:36 +02:00
Wim Taymans
b6239fb1ab node: improve scheduling
Don't use the graph scheduler anymore, instead use a more simple
method using the nodes directly. The idea is that when a node
pulls, we walk the graph backwards and collect nodes to process.
Searching stops on a node with output. Then we process the nodes,
each one in turn calling process on the next one when all dependend
nodes are processed. This is quite similar to jack2 and with some
modifications seems to work well for more complicated input/output
patterns.
Set per mix input/output buffers.
Implement mixing in the audio-dsp node.
remote: handle mix ports a little better
2018-04-03 16:29:36 +02:00
Wim Taymans
1f077c7e0a client-node: fix mem_offset of io areas 2018-04-03 16:29:36 +02:00
Wim Taymans
e7bff4293d alsa: small cleanups
Use flags for buffers
2018-04-03 16:29:36 +02:00
Wim Taymans
5bff143eaf audiomixer: update io states more correctly 2018-04-03 16:29:36 +02:00
Wim Taymans
1aa960ad54 link: fall back to local io 2018-04-03 16:29:36 +02:00
Wim Taymans
b9880dbd5f Add some more debug 2018-04-03 16:29:36 +02:00
Wim Taymans
1704c6756b remote: cleanups 2018-04-03 16:29:36 +02:00
Wim Taymans
3bb988820e remote: work directly with the port mixers
Add port_mixer on the ports
Work directly with the port mixers
simplify scheduling
2018-04-03 16:29:36 +02:00
Wim Taymans
c0865581b9 port: don't schedule disabled ports 2018-04-03 16:29:36 +02:00
Wim Taymans
2ea9addcf2 port: delegate initialization of mix ports to port 2018-04-03 16:29:36 +02:00
Wim Taymans
319098b4c8 client-node: implement set_io on mixer and regular node 2018-04-03 16:29:36 +02:00
Wim Taymans
28a094a65b client-node: free io_area 2018-04-03 16:29:36 +02:00
Wim Taymans
4f680c224b make per mix port io and buffers
Move the io areas to a separate memory block.
Make per link io areas for the ports
Send per mix port io area and buffers
2018-04-03 16:29:36 +02:00
Giovanni Campagna
07f12c9713 v4l2: fix enumerating frame interval for continuous/step-wise devices
A device that supports continuous/step-wise frame interval will
report the correct frame intervals for index 0 and EINVAL for
every other index.
(https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/vidioc-enum-frameintervals.html)

Previously, the code would exit from the loop after successfully
reading index 0, without marking that the iteration of frame
interval completed. Therefore, the next time the function was
called the same frame intervals would be read, instead of advancing
to the next frame size or format type.
Instead, mark that we need to try and read the next format size.

Fixes #56
2018-04-03 16:28:23 +02:00
Eike Rathke
871dd2743b __STDC_VERSION__ may be undefined
Clang++ (and g++) don't define __STDC_VERSION__ which results in

 include/spa/support/log.h:101:5: error: '__STDC_VERSION__' is not defined, evaluates to 0 [-Werror,-Wundef]
 #if __STDC_VERSION__ >= 199901L
 include/pipewire/log.h:64:5: error: '__STDC_VERSION__' is not defined, evaluates to 0 [-Werror,-Wundef]
 #if __STDC_VERSION__ >= 199901L

so check if __STDC_VERSION__ is defined before comparing.
Also, include/feature.h additionally defines __USE_ISOC99 (and
__USE_ISOC11 for C11 extension), so check these as well.
2018-04-03 16:27:58 +02:00
Philipp Zabel
e38cba4e13 v4l2: check device caps
If V4L2_CAP_DEVICE_CAPS is set, device_caps must be checked for the
V4L2_CAP_VIDEO_CAPTURE flag instead of capabilities.
2018-04-03 16:27:43 +02:00
Wim Taymans
187b6d4bf9 alsa: update the offset after each copy 2018-03-14 16:03:58 +01:00
Wim Taymans
8cadcd7f56 hook: return number of hooks called
Do finish_format ourselved when nobody was listening for the
format change.
2018-03-14 16:03:33 +01:00