Rework the wire protocol

Send a command stream over the socket.
Implement a new buffer object that holds the data and commands.
Make iterator and builders to parse and construct buffers.
Rework gstreamer elements to use new API for creating and parsing
buffers.
Add _release_buffer to notify a stream when we are done processing the
buffer. This will eventually go all the way to the server and will allow
us to do more complicated buffer management.
This commit is contained in:
Wim Taymans 2015-08-24 16:41:04 +02:00
parent d0f3f3125b
commit c47fcd8105
14 changed files with 937 additions and 229 deletions

View file

@ -55,29 +55,31 @@ Wire
Fixed header
<flags> : 4 bytes
<seq> : 4 bytes
<pts> : 8 bytes
<dts-offset> : 8 bytes
<flags> : 4 bytes : buffer flags
<seq> : 4 bytes : sequence number
<pts> : 8 bytes : presentation time
<dts-offset> : 8 bytes : dts-offset
<length> : 8 bytes : total message length
Followed by 1 or more type-length-data sections
<type> : 1 byte
<length> : variable length, 7 bits, hight bit is continuation marker
<data> : <length> bytes
<data> : <length> bytes, see below for contents based on <type>
Types:
0: format change
0: fd-payload section
<offset> : 8 bytes : offset
<size> : 8 bytes : size
<fd-index> : 4 bytes : index of fd
1: format change
<format-id> : 1 byte : format id
<format> : 0-terminated : contains serialized format
1: fd-payload section
<offset> : 8 bytes : offset
<size> : 8 bytes : size
<fd-index> : 1 byte : index of fd
2: property changes