Commit graph

25 commits

Author SHA1 Message Date
Wim Taymans
ca7d08c406 Work on sink
Remove _remove from properties, we can do the same with set of a NULL
value.
Add signals to the stream API to manage the buffers. Wrap those buffers
in a GstBuffer in the pinossrc and pinossink elements and pool them in a
bufferpool.
Remove SPA_EVENT_TYPE_PULL_INPUT, we can do the same with NEED_INPUT and
by using a ringbuffer.
Do more complete allocation of buffers in the link. Use the buffer
allocator if none of the nodes can allocate.
Follow the node state to trigger negotiation and allocation.
Remove offset and size when refering to buffers, we want to always deal
with the complete buffer and use a ringbuffer for ranges or change the
offset/size in the buffer data when needed.
Serialize port_info structures as part of the port_update
Print both the enum number and the name when debuging properties or
formats.
2016-08-24 16:38:51 +02:00
Wim Taymans
a03352353f work on sink 2016-08-18 12:43:25 +02:00
Wim Taymans
ac5d22ec79 Work on negotiation
Add helpers to convert between pinos and gstreamer formats.
Use pinos formats in the API.
Work on removing some hardcoded stuff and instead use the real format
from the pinos server.
Use memfd and sealing.
2016-08-05 16:39:26 +02:00
Wim Taymans
8f9222bf9e implement set_format
Serialize the formats
Use SpaMemoryRef where we can
Add more debug
2016-08-04 17:33:49 +02:00
Wim Taymans
1169c2419b Make buffer data point to memory blocks
Make buffer data point to a registered memory block by its mem_id.
Add some more helpers to allocate memfd backed memory.
Allocate buffers in memfd so that we easily share them between client
and server.
Update pts and seq in v4l2 now that this change will actually be visible
at the client.
2016-08-03 21:33:57 +02:00
Wim Taymans
98993c680b Make buffer structure sharable
Use stucture offsets instead of pointers so that we can share the buffer
structure between client and server.
We can then pass an fd wrapping the memory of the buffer to the client.
Add beginnings of a memory pool
2016-08-03 15:59:17 +02:00
Wim Taymans
3ace7e9648 More work on implementing remote protocol
Rework things so that we negotiate buffer pools beforehand and only pass
buffer ids around We can then remove the refcount of buffers, events and
commands.
More work on buffer reuse
Use the node state changes to trigger the next step in the configuration
sequence.
Move most of the client-node to a plugin
Do buffer allocation in the port link.
2016-08-02 16:34:44 +02:00
Wim Taymans
4cb90f3b86 Rework transport protocol
Remove the old PinosBuffer object and replace it with SpaControl, this
communication protocol is designed to make it possible to implement
remote nodes and so it is moved to Spa.
Move SpaBuffer into to API
Work on easier API to make formats, implement enumeration and support
for all formats in v4l2.
Improve format output in -inspect
2016-07-28 21:19:20 +02:00
Wim Taymans
b795fb851f stream: work on stream upload 2016-07-25 15:55:56 +02:00
Wim Taymans
3c029cba53 more hacking
Move plugin API to separate directory for now
Add ringbuffer and way to get ringbuffer from a port
2016-07-25 10:50:05 +02:00
Wim Taymans
af3de36416 work on stream negotiation and start
Add more buffer types to add and remove memory shared memory between the
server and client. We would like to send buffers only once and then
simply reference them by index.
Do format negotiation and stream start with a START message.
2016-07-21 18:38:24 +02:00
Wim Taymans
323b0c55f2 Fix upload mode
Add autoconnect property to the ports
Remove the upload-node, clients that want to upload media just create a
node with an (unconnected) output port. Other clients can then connect
to this new output port.
Copy formats on newly linked ports.
2016-05-26 12:25:07 +02:00
Wim Taymans
89f8f41045 remove READY state on context
Now that we don't need to register anymore to the daemon we can just
remove this state.
2016-05-19 11:29:11 +02:00
Wim Taymans
0f67434ae8 buffer: improve memory management
Add refcounting to buffers.
Use static memory on ports for buffer input and output memory.
Improve negotiation, let format and properties be negotiated on ports as
the data passes.
Improve some debug info.
2016-05-17 20:14:06 +02:00
Wim Taymans
4a5ed1e1f5 Rework how clients connect.
Add buffer flags. The idea is to make it possible to easily check when a
buffer contains control information that we need to parse to update the
port fields.
Make the client create remote nodes and ports and set up proxies for
them.
Make a port base class implementing most of the logic to pass buffers
locally and remotely.
Remove most code from stream.c, it's now in the port.
Make a portsink and portsrc that can write and read to/from any port. We
use these in the server to send and receive data.
Rework format negotiation. The final format is now sent in-line before
the data. The server will select a format on output ports.
2016-05-17 09:38:30 +02:00
Wim Taymans
c67d3d7f04 buffer: allow building into custom memory
Make it possible to pass custom memory to the builder so that it can
construct packets directly into specified memory and avoid allocs.
Remove GError and GSocketControlMessage in the buffer API to make it
possible to use other (rt-safe) API later.
2016-05-09 18:48:18 +02:00
Wim Taymans
20c50772fa Add provide mode to pinossink
Add a mode to provide a stream to pinossink
Small improvements, leak fixes.
2016-05-06 17:54:23 +02:00
Wim Taymans
ba4ef9b5d9 Introduce the concept of a Port
A port is an input or output on a Node.
Channels are created from the ports and inherit the direction of the
port.
do automatic port selection based on the direction and caps and
node/port name.
Simplify stream_connect by passing the direction.
Fix pinossink to connect in setcaps so that we know the format and can
select a good sink to connect to.
2016-05-06 13:01:52 +02:00
Wim Taymans
b885d40390 Introduce the concept of a Node
Make an object for a processing node.
Implement a sink node. Make it possible to implement Sink and Source
interfaces to provide input/output from the node.
Improve pinosdepay to track fds and handle format changes.
2016-05-05 13:31:18 +02:00
Wim Taymans
7597e48e02 source-output -> channel
Rename the source-output object to channel because it is used for both
input and output.
Start the beginnings of sink support. This will make it possible to make
pinos consume data as well as provide data.
2016-05-03 18:00:56 +02:00
Wim Taymans
c8f34750e2 pinossocketsink: add new socket sink
Add a new sink that replaces the pinospay ! multisocketsink element
pair. This would allow us to track the fds per client more closely.
2016-04-27 12:05:45 +02:00
Wim Taymans
d5e333ac4b add refresh message
Add a new refresh message to request a keyframe from the pinos server.
pinospay: pass the refresh-request message upstream
pinossink: turn refresh-request messages into events
pinossrc: turn a keyframe event into a refresh-request message
2016-04-13 13:04:32 +02:00
Wim Taymans
2af64edd29 pinossink: send format change messages
Rework stream connect/disconnect from start/stop
Start the stream in setcaps when the format is known.
When the stream is already started in setcaps, send a format_change
message instead.
2016-04-07 11:39:52 +02:00
Wim Taymans
50228dddf8 pinossink: stop and disconnect the old stream when renegotiating
When we get a new format, stop, disconnect and unref the old stream.
In the future we should try to send a format change on the existing stream.
2016-04-06 21:05:44 +02:00
Wim Taymans
cdb2028f9b src -> pinos and fix include paths
Rename src to pinos and fix all the include paths so that they contain
pinos/ to avoid conflicts
2016-02-01 15:40:48 +01:00
Renamed from src/gst/gstpinossink.c (Browse further)