Commit graph

249 commits

Author SHA1 Message Date
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
Wim Taymans
0662f3a3ea Small fixes for error handling 2017-10-26 15:13:33 +02:00
Wim Taymans
4f33a37ac6 alsa: report underrun better 2017-10-24 18:04:03 +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
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
0f4142f879 v4l2: always emit have_output, recycle what was not collected 2017-10-22 14:23:50 +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
530caf35db *testsrc: async == live for now 2017-10-18 10:04:31 +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
323c644084 fix crashes and leaks on shutdown 2017-10-17 10:14:56 +02:00
Wim Taymans
c386eda653 volume: mark input busy while processing output 2017-10-16 18:13:11 +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
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
6af4f08c6e cli: small cleanups
Add make cli to start the cli
Only print changes once
Notify of changed objects
2017-09-18 22:23:18 +02:00
Wim Taymans
304a6d1796 alsa-source: fix class 2017-09-18 19:15:09 +02:00
Wim Taymans
e641914c2f volume: improve negotiation and params 2017-09-15 13:29:53 +02:00
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
Wim Taymans
21cd5a2918 Add example to play sine wave
Various build fixes and cleanups
Move port_add to private and make node ports based on implementation.
Improve pull based scheduling on remote nodes
2017-09-07 10:22:32 +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
577f86be0d graph: use spa_node as implementation
Always use a spa_node as the graph implementation, implementing the
methods is just as easy.
Plug some mem leaks in remote
2017-08-27 12:12:14 +02:00
Wim Taymans
6953642ed5 small cleanups 2017-08-27 09:16:03 +02:00
Wim Taymans
80cf20a255 monitor: fix some leaks 2017-08-22 19:22:04 +02:00
Wim Taymans
c25834a692 Work on cleanup
Add signal handlers for daemon to shut down
Add destroy listeners for modules and do cleanup
Fix some leaks
Simplify port registration in new nodes
Hide some more data structures
Let the node implementation take care of the reuse_buffer signal because
then we can get to the graph nodes to find the destination port.
Destroy modules in core cleanup. Modules should undo everything they
have done.
Activate the link after we negotiated format and buffers.
2017-08-22 18:30:10 +02:00
Wim Taymans
12e2fae8ab jack: add midi format
Add midi format
Handle ore requests
Clean semaphore and socket names
2017-08-21 20:19:09 +02:00
Wim Taymans
c3d63983e1 alsa: don't read timerfd when stopped
We only start the timerfd when we are started
2017-08-18 18:53:45 +02:00
Wim Taymans
9ad1f911b2 Improve loop callbacks
Pass just one data item to the callbacks.
Add properties to port.
Add user data to link
Handle autolink with multiple ports
More work on jack support
2017-08-11 19:21:31 +02:00
Wim Taymans
eeda53dbef Fix leaks
Add some docs
Add properties to loop objects for future use
2017-08-08 18:24:15 +02:00
Wim Taymans
600055bd68 Move listeners to spa and rename to hooks
The listeners are generally useful in spa, move it there and rename
to hooks. Implement loop hooks with it.
Fix some cleanup issues in stream and remote
2017-08-08 16:56:29 +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
91d54364fc loop: add signal count to callback
Don't try to signal too many times
2017-07-19 10:44:03 +02:00
Wim Taymans
465f12241e Implement protocol extensions
Add hooks that contain protocol specific interfaces that can be used
to extend the protocol. This makes it possible to add new interfaces
to the protocol and implement the protocol specific data transport.
Move these protocol specific extension to the extensions directory.
2017-07-12 18:04:00 +02:00
Wim Taymans
da94f65493 fix some compiler warnings 2017-07-04 12:21:01 +02:00
Wim Taymans
8886f5d373 build fixes 2017-07-04 11:30:49 +02:00
Wim Taymans
791137e9e5 loop: fix ringbuffer handling 2017-07-04 10:18:24 +02:00
Wim Taymans
9fa1df6f2c link: work on activate/deactivate
Recursively activate links when activating nodes
2017-07-03 17:34:30 +02:00
Wim Taymans
9ee0cd7d8d fix last_port 2017-06-28 16:53:10 +02:00
Wim Taymans
d8cac792f4 spa: small performance fixes 2017-06-28 16:33:11 +02:00
Wim Taymans
7fbe811a03 audiomixer: separate mixer functions 2017-06-27 17:48:34 +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
3b5a308645 link: improve renegotiation
Only suspend an idle node when we need to configure a different format.
2017-06-20 16:22:25 +02:00
Wim Taymans
4a6b1b42bc Don't hardcode plugin path
Use SPA_PLUGIN_DIR to get the plugin path.
Install plugins in subdirectory to make it match the build tree.
2017-06-19 12:19:22 +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
4a219e81dd loop: move to plugin
Move the loop implementation to a plugin.
Organize the hooks in a list so that we can add many.
2017-06-14 16:27:04 +02:00