Commit graph

319 commits

Author SHA1 Message Date
Wim Taymans
b8fb7aeaad media-session: handle disconnect better 2018-09-26 13:22:21 +02:00
Wim Taymans
650f9eb9a7 media-session: make device links passive again 2018-09-26 10:52:33 +02:00
Wim Taymans
59f10ad453 Add proxy destroy
Make the current destroy method on the core for proxies to remove the
server side resource.
Make a new destroy method on the registry to destroy globals.
Remove the destroy method on the client-node
media-session: monitor the dsp and device node states to manage the
session state
2018-09-21 16:43:11 +02:00
Wim Taymans
3d1acf3032 media-session: also link source to DSP 2018-09-20 10:12:04 +02:00
Wim Taymans
27cacaaa2e video-play: free SDL data 2018-09-19 15:01:11 +02:00
Wim Taymans
3dc2254196 media-session: add suspend 2018-09-18 09:28:52 +02:00
Wim Taymans
96a84d09df media-session: remove session when the driver node is removed 2018-09-17 17:17:08 +02:00
Wim Taymans
fcd90b25d3 More work on multichannel
Reorder channels to a more common default order.
Only add channel layout when channels > 1
Don't try to link to a session that is still starting
Small sse fixes.
2018-09-14 15:23:12 +02:00
Wim Taymans
5196f7f053 audio: remove layout from audio
Make special format types for planar and interleaved instead of
having a field.
Add enum for audio channel positions
Add some default audio channel layouts
Place the channel layout in the audio format when possible
alsa: place audio channel positions in format
Add sse optimized channel mixing for some common cases
Remove name from port info, it's not mandatory and in the properties
Add direction to port info
2018-09-13 17:03:56 +02:00
Wim Taymans
fb3379e587 Pass channelmask around and use it to name ports
Use the channel name in the port names of the dsp
2018-09-11 18:09:45 +02:00
Wim Taymans
7aae01fe15 media-session: handle object remove
Improve debug
Deal with removed objects, handle node cleanup
Classify nodes with a type ans get rid of stream struct.
2018-09-11 15:25:35 +02:00
Wim Taymans
45807e804a media-session: also link sinks correctly 2018-09-11 12:02:35 +02:00
Wim Taymans
593daa36d4 connection: split messages to work around fd limit
Split messages in multiple parts when there are too many fds to
send in one message.
2018-09-11 12:01:19 +02:00
Wim Taymans
968192f9a9 media-session: implement more
Track the state of nodes and ports.
Make streams for nodes tagged as stream
Make sessions for nodes that are sinks and sources and make a DSP
node for those
Rescan when a change happens and reconfigure
Link streams to sessions
2018-09-11 10:26:19 +02:00
Wim Taymans
cc842cbdc8 Type changes
Only allow properties inside objects, this makes it easier to
iterate the object, which is needed for efficiently processing
control streams.
Add a choice type to mark variable properties.
SPA_TYPE_Enum -> SPA_TYPE_Id to avoid confusion with choice enum
Make it easier to allocate and initialize properties on the stack
Make more efficient methods to make objects.
2018-09-05 16:41:07 +02:00
Wim Taymans
05d3502c84 control: rework for spa_io_sequence
Put a pw_control object on all ports that support control messages.
Allow linking of control objects (and thus ports).
Make export-sink generate control messages to update the contrast
property.
2018-08-30 09:54:54 +02:00
Wim Taymans
ff6a244d8f Make media type and subtype properties
This is easier to debug and we only want properties in objects
in the future.
2018-08-29 18:08:52 +02:00
Wim Taymans
514528f2c7 format: make helper functions to create formats
Use helper functions to create a fully specified format.
2018-08-29 15:53:26 +02:00
Wim Taymans
90c1a95eef More type cleanups
SPA_ID_* -> SPA_TYPE_*. We use 'type' for all registered types.
ID refers to either a registered type or an enum.
Improve introspection of object ids. Make 0 an invalid enum and
use it to look up the object id type.
Move some type-info files together.
Swap type and id of the object, we first specify the type and then
the id because the meaning of the id depends on the object type.
2018-08-27 15:03:11 +02:00
Wim Taymans
d26aecfef2 More type fixes
Param ids and IO ids are now simple enums.
Move some type info in one place, delete some type-info files
Fix type debug
Make audio layout an enum
Mark more enums as enums in types so they show us with their names in
the debug.
2018-08-25 12:08:29 +02:00
Wim Taymans
805e3bb6c1 types: work on types
Move static pod types to type system
work on type info for types
Move the event and command ids to an enum to make it easier to extend
later.
2018-08-24 10:53:09 +02:00
Wim Taymans
fca3e1d85d Remove dynamic types
Do not use dynamic types anymore. The reason is that it's difficult:

- to maintain a shared type database over a network.
- the extra overhead when translating between processes and for
  maintaining the translation tables.
- race conditions in translating in RT-threads, this is a problem
  because we want to make event streams.

We now have simple enums with types and extension points for all
types. This is also nicer to use in general.
We don't need the mapper anymore or pass strings around as types.
There is a parallel type info system to get more info about ids and
enums and their hierarchy. It can also be used for debugging.
2018-08-23 17:47:57 +02:00
Wim Taymans
f36fa5d2cb example: improve debug 2018-08-15 13:48:49 +02:00
Wim Taymans
a6ad8f747f remove spalib 2018-08-14 15:29:25 +02:00
Wim Taymans
17cc9d2039 add media session example beginnings
Add an example media session that runs as a separate program instead
of a module
2018-08-09 11:07:41 +02:00
Wim Taymans
ca898a00db work on separating port mixers
Make it possible to assign an arbitary node as the port mixer.
Also remove dynamically added ports.
Improve negotiation and allocation on the mixer ports
Add some more SSE optimisations
Move float mixer from the audio dsp to the port
Remove pw_node_get_free_port() and do things more explicitly.
Handle mixer ports in client-node
2018-07-31 12:23:35 +02:00
Wim Taymans
d3c203b744 spa: use clock info
Use the port clock io area to get timing info and use this as
the time in the graph when we wake up.
2018-07-17 17:37:55 +02:00
Wim Taymans
fdc3d5c0f7 export-sink: be less verbose
Only report region once and only accept 1 region
2018-07-09 12:14:01 +02:00
Wim Taymans
f49ab32874 meta: add video damage region metadata
Add damage region meta
Implement damage region in video-src and export-sink
2018-07-09 12:07:30 +02:00
Wim Taymans
710f0f59cf limit buffers to 16 until we can send more fds in one message 2018-07-02 12:04:38 +02:00
Wim Taymans
6025b30a46 audio-src: add volume 2018-06-22 17:30:19 +02:00
Wim Taymans
43e3ecdb3b video-src: improve properties
Mark ourselves as a video source so that a session is created for
us.
2018-06-18 11:13:36 +02:00
Wim Taymans
057da435da stream; use const params in finish_format 2018-06-08 12:29:26 +02:00
Wim Taymans
e02b3181da audio-session - >media-session
Also implement video in the media session
Small cleanups
Improve exclusive mode
2018-05-14 13:07:01 +02:00
Wim Taymans
7bb0e4da85 small cleanups 2018-05-08 10:42:17 +02:00
Wim Taymans
b160d81d2f stream: fix driver mode 2018-05-02 11:42:04 +02:00
Wim Taymans
30d8df7d25 add layout to format 2018-04-19 20:09:10 +02:00
Wim Taymans
eea05cc139 improve format 2018-04-13 19:58:55 +02:00
Wim Taymans
03b914405d client-node: remove transport area
We don't need the area anymore
2018-04-12 10:12:40 +02:00
Wim Taymans
10fff4b2f8 node: add better node autolink
Add node media, category and role properties and use those to select
the target node.
Tag the DSP node with the right media.class
2018-04-12 09:55:03 +02:00
Wim Taymans
8b74a3c0d2 small cleanups 2018-04-12 09:42:19 +02:00
Wim Taymans
ba518c0d9b small fixes 2018-04-05 15:37:34 +02:00
Wim Taymans
36f7578aa8 export-sink: small cleanup 2018-04-03 16:29:36 +02:00
Wim Taymans
8481356f4b stream: add const to format event 2018-04-03 16:29:36 +02:00
Wim Taymans
41a3a924ef stream: add pw_stream_new_simple
Make a new method that also makes a remote and connects to it
transparently. This saves some lines of code.
2018-04-03 16:29:36 +02:00
Wim Taymans
f9ceedb714 stream: improve stream API
Simplify the stream API. make just 2 methods to queue and dequeue
buffers. Make just one callback when new buffers can be dequeued.
Add support for driver nodes such as the video-src.
Pass a pw_buffer structure to add/remove_buffer and make it possible
to attach metadata to it. This makes it a lot easier to implement
the gstreamer pipewire pool.
Call the stream process function from the main loop and use a lockfree
ringbuffer to pass buffers between the threads. Make it possible to
also call process from the RT thread.
unmap the buffer data when needed.
2018-04-03 16:29:36 +02:00
Wim Taymans
a7341ce583 node: fix support for remote driver nodes 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
99d94044d1 small cleanups 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