Commit graph

73 commits

Author SHA1 Message Date
Wim Taymans
dc85a79786 Add more generic export-spa example
Replace the v4l2 example with a more generic version that can add
any spa node to a remote graph
Make the dictionary items const
Add some info to nodes and factories. Add the node info to the node
properties. We can then set the media.class directly on the node,
instead of letting the monitor set it.
Debug node info in spa-inspect.
Do async operation on the audiotestsrc and videotestsrc differently.
2017-09-07 19:55:22 +02:00
Marcos Paulo de Souza
b0c3936477 Fix clang warnings about comparing uint32 < 0 (#10)
* Fix clang warnings about comparing uint32 < 0

clangs complains about an uint32 compared to < 0:
warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]

So remove these comparisos and an uint32 never will be less than 0.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>

* module-jack.c: Differentiate error msg from protocol-native

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
2017-09-04 11:09:08 +02:00
Wim Taymans
6953642ed5 small cleanups 2017-08-27 09:16:03 +02:00
Wim Taymans
0602d76b9e Cleanups
Only pass data to callbacks.
Rename some structs
Provide methods to access structs
2017-08-06 06:42:26 +02:00
Wim Taymans
3d9f28c676 Use remote to join nodes on remote graphs
Make a new method that can take a local node and run it in a remote
pipeline. This basically replaces all functionality of the streams
and more.
Add 2 examples for exporting a sink and a v4l2 node
Make some more things const
Cleanups
Make it possible to do things when the node needs scheduling. The
default node will schedule the local pipeline but the remote node might
also schedule the remote pipeline.
2017-07-25 19:52:31 +02:00
Wim Taymans
bc56c59597 loop: add block flag to invoke
Remove async shutdown and block instead.
2017-06-26 10:41:19 +02:00
Wim Taymans
763bd1100e Add user_data to callbacks
Add user data to callbacks, it's more flexible and natural
2017-06-18 19:48:31 +02:00
Wim Taymans
c3b73ba47d Add versions to structures
Use versions instead of size
Remove user_data from callbacks, we can simply pass the callback struct.
2017-06-14 18:32:39 +02:00
Wim Taymans
34450ed7ed Make done event on node
Replace the AsyncDone event with an explicit done callback in the node
to signal completion of an async operation.
Pass read and write fd together with the transport
2017-06-09 17:24:18 +02:00
Wim Taymans
ded1ea69a1 indent 2017-05-26 18:19:51 +02:00
Wim Taymans
5b037661d9 indent 2017-05-26 08:05:01 +02:00
Wim Taymans
11f23a3ffa spa: don't use typedef for struct and enum 2017-05-25 13:28:15 +02:00
Wim Taymans
f12a5ffc80 Remove redundant fields from PortInfo 2017-05-22 18:02:31 +02:00
Wim Taymans
d1a6d6e03f param: add more generic port params
Remove port properties and replace them with port params. Move the
params from the PortInfo to enum_params.
Use the Param ranges to specify possible sizes etc.
2017-05-22 13:06:18 +02:00
Wim Taymans
6691eb7845 graph: add graph datastructure and scheduler
Improve event and command init so that it can be used more easily
as compound literals.
Improve volume
Make it possible to use graph scheduler in test-mixer
2017-05-18 17:16:48 +02:00
Wim Taymans
3b33e3d362 node: improve callbacks
Make separate callbacks for events and RT notifications.
2017-05-11 10:29:20 +02:00
Wim Taymans
fe68ca1be3 audiomixer: small improvements
Improve the audiomixer state handling
Improve PortIO status handling.
2017-04-28 17:22:23 +02:00
Wim Taymans
b51d3e4862 buffer: make data and meta types dynamic
Use dynamic types for the data and meta types.
Move the meta into a separate header.
Remove port state, we can keep track of that ourselves.
Add size to MetaDataEnable params
2017-04-26 18:54:18 +02:00
Wim Taymans
d3682067fa node: remove node state
Remove the node state. The state of the node is based on the state
of the ports, which can be derived directly from calling the port
methods. Track this state in the Port instead.
Add a mixer module that puts a mixer in from of audio sinks. This allows
multiple clients to play on one sink (still has some bugs). do some
fixes in the mixer and the scheduler to make this work.
2017-04-08 20:33:54 +02:00
Wim Taymans
8594d28f59 alsa: rework monitor
Enumerate all playback and capture devices
2017-04-05 18:37:12 +02:00
Wim Taymans
4bdbb58276 alsa: implement enum_format 2017-04-04 19:44:00 +02:00
Wim Taymans
8071b76e41 alsa: improve default buffer size
Fix sample size
2017-04-04 12:05:35 +02:00
Wim Taymans
b05d82d514 plugins: use macros for input checks
That way we can compile them out if we want
2017-04-04 09:00:49 +02:00
Wim Taymans
5c32690cc8 Add sync and async support in *testsrc
Make minumum alsa latency configurable.
2017-04-03 16:54:44 +02:00
Wim Taymans
01c13adab5 improve node io
Unify input and output io areas.
Add support for ranges in the io area.
Automatically recycle buffers in the output areas in process_output
Improve the mixer, add use_buffer support, use a queue of input buffers,
fix mixing, add support for ranges.
Fix mixer and v4l2 tests
2017-04-03 14:56:04 +02:00
Wim Taymans
29fbf2e841 props: improve prop flags
Only keep the READONLY prop flag.
Work on test-mixer
2017-03-31 11:48:24 +02:00
Wim Taymans
7b8bb8da6b implement alsa capture with timers
Add timer based alsa capture support
Improve format negotiation in alsa
Better track buffer owner in the links
2017-03-30 17:30:28 +02:00
Wim Taymans
29cb7bf39a format: improve format parsing 2017-03-24 18:11:11 +01:00
Wim Taymans
25b7ede0bc uri -> type
Clean up some more types.
2017-03-24 13:11:57 +01:00
Wim Taymans
5825c62d6d types: more work on types 2017-03-24 11:40:58 +01:00
Wim Taymans
acedfe71c0 clean up types 2017-03-23 21:15:52 +01:00
Wim Taymans
e28b5f91b8 props: make properties dynamic keys and values 2017-03-23 12:38:00 +01:00
Wim Taymans
048a4b81a8 alloc-params: use dynamic types for alloc-params 2017-03-23 10:12:20 +01:00
Wim Taymans
c44a7c9735 command: make commands dynamic
Ensure format object type.
2017-03-22 10:04:24 +01:00
Wim Taymans
4d9f2c5161 event: make events dynamic
Use uri for the events.
2017-03-21 20:39:20 +01:00
Wim Taymans
03292fd80f audio: make audio format an uri type 2017-03-21 16:50:44 +01:00
Wim Taymans
3f5a3e215b format: make media types and properties dynamic
Use URI properties to dynamically register the media types/subtypes and
property names. Add some helpers to set up the mappings.
2017-03-21 11:28:23 +01:00
Wim Taymans
8a6ce3b179 Make AllocParams into POD objects
Make allocparams into pod objects. This makes it easy to serialize,
copy, create and intersect them.
Add convenience macros for properties
Add helper function to collect object properties.
2017-03-17 11:58:09 +01:00
Wim Taymans
c951264fff spa: make events and commands as objects
So we can serialize and introspect them more easily
2017-03-15 16:21:05 +01:00
Wim Taymans
a1dad30fd1 Use new builder for props and formats 2017-03-07 19:40:51 +01:00
Wim Taymans
f92b68c3c3 Use types with known sizes where we can, easier to serialize
Add iterator for POD and use it to implement some demarshalling.
2017-03-07 11:56:43 +01:00
Wim Taymans
710a1a41e6 Improve negotiation
Fix selection of the default property value by restricting it to
something in the valid range of the property.
Fix audio/videotestsrc reuse
Fix format enum with filters.
Fix module property configuration
Fix connection refill
2017-03-01 14:07:02 +01:00
Wim Taymans
9dd826136d update properties 2017-02-28 10:48:53 +01:00
Wim Taymans
dbae2e3f96 rework props with pod 2017-02-27 21:25:33 +01:00
Wim Taymans
16b62de53a Rework formats
Use a POD for the format body. This allows us to more easily build
and copy the formats.
Remove obsolete code to make video and audio formats.
Use SpaVideo/AudioInfo to keep track of formats. Make functions to parse
the format into the structures.
Update plugins
2017-02-24 09:28:18 +01:00
Wim Taymans
df86fcec10 Improve negotiation
Try to link ports based on compatible formats
Add methods to filter formats.
2017-02-10 10:17:07 +01:00
Wim Taymans
b38ecafe81 Use int counters for iterating items
Use counters instead of void* to iterate items. This simplifies some
things and makes it easier to do over the wire.
Add format description to NodeInfo and use this to add format
descriptions to pinos devices.
Small fixes to fix leaks and crashes.
2017-02-01 08:58:21 +01:00
Wim Taymans
7a9dc2c4fd optimize data transport
Remove queue and ringbuffer between nodes. transfer the buffer id
directly between the io areas when possible.
Let only pinos send push or pull requests for now.
Allow polling multiple fds, like how alsa wants it
Remove port_id from events.
2017-01-18 18:29:15 +01:00
Wim Taymans
cae971e106 improve error reporting
Move signals from core to the objects themselves
Use per object info to track object signals
Use periods in alsasink and source
2017-01-17 10:27:58 +01:00
Wim Taymans
f5dbdbc0df Improve process_output
process_output is now to finish processing of the output in async nodes,
which means we need to fill the io area before sending the HAVE_OUTPUT
event. This simplifies some things and improves performance because we
don't need to deal with queues and additional checks.
2016-12-20 18:10:50 +01:00