Commit graph

175 commits

Author SHA1 Message Date
Wim Taymans
03292fd80f audio: make audio format an uri type 2017-03-21 16:50:44 +01:00
Wim Taymans
ff62c1b9ce format: make formats as uri 2017-03-21 13:36:22 +01:00
Wim Taymans
6f0a12462b format: add format utils 2017-03-21 11:37:18 +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
ee470fc6c6 iter: fix return value 2017-03-20 15:34:56 +01:00
Wim Taymans
08194ec982 pod: optimize a little 2017-03-20 11:26:55 +01:00
Wim Taymans
1588b9df8d serialize: remove serialization
Remove obsolete serialization code. Merge last bits into stream buffer
reconstruction. Use POD copy for the allocation params.
Small cleanups
2017-03-17 17:09:16 +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
b1f7df52e3 format: use padding attribute 2017-03-15 17:09:28 +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
997aa036ba id-map: add get_size method 2017-03-14 20:17:51 +01:00
David Svensson Fors
6e4a7c779a props: filter range against fixed value or enum
Fix start of iteration when a range is filtered against a fixed value
or an enum.
2017-03-13 11:42:34 +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
a1dad30fd1 Use new builder for props and formats 2017-03-07 19:40:51 +01:00
Wim Taymans
78a3cd61b8 pod-builder: make more generic builder
Make a vararg based builder that produces much smaller code.
Catch demarshal errors.
Simplify array handling
2017-03-07 17:23:35 +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
9b7debbfd3 pod: fix padding 2017-03-01 20:00:11 +01:00
Wim Taymans
c063e206f4 v4l2: fix encoded formats 2017-03-01 14:59:49 +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
282995d0d0 intersection improvements
Add uri type
2017-02-28 16:38:23 +01:00
Wim Taymans
7a7ede96e5 Format: implement intersection and fixate 2017-02-28 15:09:34 +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
f02f93cda9 pod: make format like other PODs 2017-02-27 17:07:48 +01:00
Wim Taymans
e2d930e394 props: move prop builder to pod-builder.h 2017-02-26 19:52:21 +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
825cbbbdd6 v4l2: fix negotiation 2017-02-24 17:15:29 +01:00
Wim Taymans
7a66af71ca pinosformat: rewrite format conversion 2017-02-24 16:27:36 +01:00
Wim Taymans
47714886c0 prop-builder: remove propbuilder
Replaced by more flexible POD
2017-02-24 09:53:40 +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
Wim Taymans
922997175d add new header 2017-02-21 15:02:54 +01:00
Wim Taymans
808d6b6fca prop-builder: add helper to make properties and formats
Use this to make a format filter. Use the filter to negotiate
a format automatically.
2017-02-20 17:22:46 +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
1370fafd5b Fix renegotiation
When we are idle and are asked to negotiate, suspend first so that we
can do full negotiation again instead of using the old format.
Stability fixes.
2017-02-02 17:48:39 +01:00
Wim Taymans
fd54471249 Implement SYNC message
A sync message returns a notify-done after all request are finished and
can be used to wait for completion of a bunch of commands. Use it wait
for all proxy BIND requests to complete so that we can look at the
info immediately.
Copy the default value of unset properties.
2017-02-01 17:48:12 +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
8b84d8fde6 fix some leaks
Fix some leaks
Remove some unused fields
Install a loop so that plugins can use it
Start on adding format introspection
2017-01-31 09:57:58 +01:00
Wim Taymans
fd5f0d96f3 improve states 2017-01-19 20:07:03 +01:00
Wim Taymans
0398f997d7 cleanups
Update some docs
Remove special structs for some events
Remove some unused flags
Update some plugins
2017-01-19 18:10:00 +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
ee0aa6a2ac Implement access control
Move send and dispatch functions to the implementation. This makes it
possible to place an access check before sending and dispatching.
Add module-access that allows to bind and notify on globals owned by
the client.
2017-01-10 17:26:43 +01:00
Wim Taymans
85d375e4bb Implement subscription with a signal
Use a signal for subscription events
Work on handling OOM errors and other errors.
2016-12-22 16:50:01 +01:00
Wim Taymans
2f18af1fb2 plugins: small fixes 2016-12-20 19:13:04 +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
Wim Taymans
5b0b9c43d0 Improve upload
Only send a buffer when we have received a NEED_DATA message.
Add a signal to pulla buffer from the sink. Restructure the sink to use
a queue like the source and only push a buffer when we can.
Improve SpaData. Offset and size should be between 0 and maxsize, make
sure we clamp correctly when needed.
node_process_output completes the processing of the output after
receiving HAVE_OUTPUT for async elements. It instructs the node that
it now can produce more output.
2016-12-20 16:51:57 +01:00
Wim Taymans
0d0385b881 Rework buffer memory layout
Move offset, size and stride to separate chunk structure that we
can keep in shared memory.
Add shared metadata type to hold the memory block holding the
metadata.
2016-12-15 14:57:34 +01:00
Wim Taymans
b969623ec8 Work on introspection 2016-12-02 13:38:43 +01:00