Commit graph

23 commits

Author SHA1 Message Date
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
7cdb980b1a debug: allow custom type root 2018-08-30 12:01:52 +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
a6ad8f747f remove spalib 2018-08-14 15:29:25 +02:00
Wim Taymans
440f681f4b Improve enum_param
Add an argument to pass the result param to the caller instead of
having the caller have to pick it up from the builder.
Improve docs for node, clock and monitor
Pass spa_pod everywhere instead of spa_pod_object.
Pass result argument to spa_pod_filter to make things a little
nicer.
2017-11-13 17:57:38 +01:00
Wim Taymans
737b428077 builder: make deref safer
Don't try to deref objects that did not fit into the memory.
Deref now returns the object
2017-11-13 11:50:50 +01:00
Wim Taymans
caaeaff223 Reorganise SPA tree
Reorganise the SPA includes to make it more extensible later
Simplify the naming of the buffer and meta params
2017-11-10 13:36:14 +01:00
Wim Taymans
cc47fb7e3a clean up pod_builder
Remove the frame argument from the builder, we can use the builder
allocated frames.
Add deref function to builder to make it more flexible later.
Add some more recursion depth checks in the parser.
Improve props filter, also filter other types.
2017-11-08 15:48:31 +01:00
Wim Taymans
f3bca48398 Unify props, params and formats
Make enum_params and set_param to configure properties, format
and other parameters. This allows us to remove some duplicate
code and make the properties and parameters much more extensible.
Use the object id to mark the id of the parameter.
Remove the spa_format and spa_props.
We can now make the client-node easier by merging the various
format methods into the params.
Make the stream API more powerful now that we can pass params
around.
2017-11-07 17:48:40 +01: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
b4fdcbd322 Debug: remove logger
Make a default logger and mapper in a .h file to be used by examples
Remove logger and mapper from libs
Make method to set the default mapper for the debug methods
2017-06-06 13:30:34 +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
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
29cb7bf39a format: improve format parsing 2017-03-24 18:11:11 +01:00
Wim Taymans
5825c62d6d types: more work on types 2017-03-24 11:40:58 +01:00
Wim Taymans
905743dac6 Improve padding
Write out 0 while padding to make sure all memory is initialized
Remove the fd from the loop before destroying the node.
2017-03-09 09:48:41 +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
41399b0b25 Rework serialization
Move serialization to the protocol, we now just send blocks of bytes
over the connection and let the protocol deserialize them.
2017-03-06 15:48:04 +01:00
Wim Taymans
f02f93cda9 pod: make format like other PODs 2017-02-27 17:07:48 +01:00
Wim Taymans
e79a294816 tests: add static caps example
Add example of how to define a static caps.
2017-02-24 18:46:30 +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
7fc73953cd Add POD helper objects
POD (plain old data) objects are similar to LV2 Atoms and allows storage
and construction of datastructures in memory or on the stack. They can
be copied with a simple memcpy.

The idea is to use this to construct the network messages and to replace
the structures used for describing formats and properties.
2017-02-22 13:12:32 +01:00