1 This documents the protocol used to pass data over fds between ipcpipelinesrc
4 The protocol is used in both directions. However, some combinations do
5 not make sense (eg, a buffer going from ipcpipelinesrc to ipcpipelinesink).
7 The protocol consists of an arbitrary number of variable sized chunks
8 with a type. Each chunk has a request ID which can be used to match a
9 request with its reply (ack / query result).
11 Each chunk consists of:
22 10: error/warning/info message
23 - a request ID, 4 bytes, little endian
24 - the payload size, 4 bytes, little endian
27 Depending on the type, the payload can contain:
30 result: 4 bytes, little endian
31 interpreted as GstFlowReturn for buffers, boolean for events and
32 GstStateChangeReturn for state changes
34 result boolean: 1 byte
35 query type: 4 bytes, little endian
36 returned query string representation, NUL terminated
38 pts: 8 bytes, little endian
39 dts: 8 bytes, little endian
40 duration: 8 bytes, little endian
41 offset: 8 bytes, little endian
42 offset end: 8 bytes, little endian
43 flags: 8 bytes, little endian
44 buffer size: 4 bytes, little endian
45 data: contents of the buffer data, size specified in "buffer size"
46 number of GstMeta: 4 bytes, little endian
48 bytes: 4 bytes, little endian
49 this is the number of bytes before the string representation
50 at the end of this block, including the 4 bytes of itself
51 flags: 4 bytes, little endian
52 length of the GstMetaInfo::api name: 4 bytes, little endian
53 GstMetaInfo::api name: string, NUL terminated
54 GstMetaInfo::size: 8 bytes, little endian
55 length of the string representation: 4 bytes, little endian
56 string representation, NUL terminated
58 event type: 4 bytes, little endian
59 sequence number: 4 bytes, little endian
61 whether the event is going upstream (1) or downstream (0)
62 string representation, NUL terminated
63 - 5: sink message event
64 message type: 4 bytes, little endian
65 event sequence number: 4 bytes, little endian
66 message sequence number: 4 bytes, little endian
67 length: 4 bytes, little endian
68 event structure name: length bytes, NUL terminated
69 message structure string representation: remaining bytes, NUL terminated
71 query type: 4 bytes, little endian
73 whether the query is going upstream (1) or downstream (0)
74 string representation, NUL terminated
76 GstStateChange: 4 bytes, little endian
80 message type: 4 bytes, little endian
81 string representation, NUL terminated
82 - 10: error/warning/info message
83 message type (2 = error, 1 = warning, 0 = info): 1 byte
84 error domain string length: 4 bytes, little endian
85 string representation of the error domain, NUL terminated
86 error code: 4 bytes, little endian
87 length: 4 bytes, little endian
88 if zero: no error message
89 if non zero: As many bytes as this length: the error message, NUL terminated
90 length: 4 bytes, little endian
91 if zero: no extra message
92 if non zero: As many bytes as this length: the error extra debug message, NUL terminated