Fields common to general and sub-layer profile_tier_levels. This
factorization of a syntax structure is backed by the paragraph following the
definition of reserved_zero_2bits in 7.4.4
Get a frame.
The caller can pass a mbuf_mem object to hold the frame. If not given, this
call will allocate a memory internally.
@param self: pdraw_vsink instance handle
@param frame_memory: memory used by the frame (optional)
@param frame_info: frame information (output)
@param ret_frame: frame (output)
@return 0 on success, negative errno value in case of error
Create a pdraw_vsink instance and connect to a URL.
The instance handle is returned through the ret_obj parameter.
When no longer needed, the instance must be freed using the
pdraw_vsink_stop() function.
@param url: URL to open (network URL or local file)
@param media_info: media info pointer to fill if not NULL.
Note: mdeia_info will be freed in pdraw_vsink_stop().
@param ret_obj: pdraw_vsink instance handle (output)
@return 0 on success, negative errno value in case of error
Format a socket address into a string.
@param buf: destination buffer
@param buflen: maximum size of destination buffer.
@param addr: address to format.
@param addrlen: size of address.
@return 0 in case of success, negative errno value in case of error.
Prepend the product root path to a unix local address with file system name.
@param buf: input string.
@param dst: destination buffer, which will be allocated to a suitable size
dynamically. Must be freed with free(), after usage.
@return 0 in case of success, negative errno value in case of error.
Determine if a socket address is a unix local one.
@param addr: address to check.
@param addrlen: size of address.
@return 1 if socket is unix local, 0 otherwise.
Parse a socket address given as a string and convert it to sockaddr.
@param buf: input string.
@param addr: destination structure.
@param addrlen: maximum size of destination structure as input, real size
converted as output. Should be at least sizeof(struct sockaddr_storage)
@return 0 in case of success, negative errno value in case of error.
Append source buffer data to the buffer.
@param buf : destination buffer.
@param src : source buffer to append.
@return 0 in case of success, negative errno value in case of error.
-EPERM is returned if the buffer is shared.
Append data to the buffer.
@param buf : buffer.
@param data : data to append.
@param len : length of the data to append.
@return 0 in case of success, negative errno value in case of error.
-EPERM is returned if the buffer is shared.
Read data from buffer without copy.
@param buf : buffer.
@param pos : read position. It will be updated in case of success.
@param cdata : will receive pointer to data inside buffer. It is valid as
long as the buffer is valid and no write or resize operation is performed.
@param len : number of bytes to read.
@return 0 in case of success, negative errno value in case of error.
Make sure internal data has enough room for the given size.
@param buf : buffer.
@param capacity : new capacity of buffer.
@return 0 in case of success, negative errno value in case of error.
-EPERM is returned if the buffer is shared (ref count is greater than 1).
Get internal buffer data for read-only.
@param buf : buffer
@param cdata : data of buffer (optional can be NULL).
@param len : used length of buffer (optional can be NULL).
@param capacity : capacity of buffer (optional can be NULL).
@return 0 in case of success, negative errno value in case of error.
Get internal buffer data for read/write.
@param buf : buffer.
@param data : data of buffer (optional can be NULL).
@param len : used length of buffer (optional can be NULL).
@param capacity : capacity of buffer (optional can be NULL).
@return 0 in case of success, negative errno value in case of error.
-EPERM is returned if the buffer is shared.
Create a new buffer with content copied from another buffer.
@param buf : buffer to copy.
@return new buffer with initial ref count at 1 and internal data copied from
given buffer or NULL in case of error.
Same as pomp_buffer_new but retrieved internal data pointer at the same time.
@param capacity : initial capacity of the buffer.
@param data : data of buffer (optional can be NULL).
@return new buffer with initial ref count at 1 or NULL in case of error.
Create a new buffer with content copied from given data. Internal length and
capacity will be set to given data length.
@param data : data to copy.
@param len : length to copy.
@return new buffer with initial ref count at 1 and internal data copied from
given buffer or NULL in case of error.
Read data from buffer at the given position.
@param buf : buffer.
@param pos : read position. It will be updated in case of success.
@param data : pointer to data to read.
@param len : number of bytes to read.
@return 0 in case of success, negative errno value in case of error.
Set the capacity of the buffer.
@param buf : buffer.
@param capacity : new capacity of buffer (shall be greater than used length).
@return 0 in case of success, negative errno value in case of error.
-EPERM is returned if the buffer is shared (ref count is greater than 1).
Set the used length of the buffer.
@param buf : buffer.
@param len : used length of data (shall be lesser than allocated size).
@return 0 in case of success, negative errno value in case of error.
-EPERM is returned if the buffer is shared (ref count is greater than 1) or
readonly.
Write data to the buffer at the given position.
@param buf : buffer.
@param pos : position in the buffer (will be updated after success)
@param data : data to write.
@param len : length of the data to write.
@return 0 in case of success, negative errno value in case of error.
-EPERM is returned if the buffer is shared.
Get connection remote peer address.
@param conn : connection
@param addrlen : returned address size.
@return remote peer address or NULL in case of error.
Get connection remote peer credentials for local sockets.
@param conn : connection
@return connection remote peer credentials or NULL if not a local socket.
Format and send a message to the peer of the connection.
@param conn : connection.
@param msgid : message id.
@param fmt : format string. Can be NULL if no arguments given.
@param … : message arguments.
@return 0 in case of success, negative errno value in case of error.
Send a message to the peer of the connection.
@param conn : connection.
@param msg : message to send.
@return 0 in case of success, negative errno value in case of error.
Send a buffer to the peer of the raw connection.
@param conn : connection.
@param buf : buffer to send.
@return 0 in case of success, negative errno value in case of error.
Format and send a message to the peer of the connection.
@param conn : connection.
@param msgid : message id.
@param fmt : format string. Can be NULL if no arguments given.
@param args : message arguments.
@return 0 in case of success, negative errno value in case of error.
Set the connection read buffer length
@param conn : connection.
@param len : the length in bytes of the read buffer.
@return 0 in case of success, negative errno value in case of error.
Bind a connection-less context (inet-udp).
@param ctx : context.
@param addr : address to bind to.
@param addrlen : address size.
@return 0 in case of success, negative errno value in case of error.
Start a client.
If connection can not be completed immediately, it will try again later
automatically. Call pomp_ctx_stop to disconnect and stop everything.
@param ctx : context.
@param addr : remote address to connect to.
@param addrlen : remote address size.
@return 0 in case of success, negative errno value in case of error.
Destroy a context.
@param ctx : context.
@return 0 in case of success, negative errno value in case of error.
If the client or server is still running, -EBUSY is returned.
Get the connection structure for a client context.
@param ctx : context (shall be a client one).
@return connection structure or NULL if there is no connection with server.
Get context local address (for server or udp context started with listen or
bind ).
@param ctx : context (shall be a server or udp one).
@param addrlen : returned address size.
@return local address or NULL in case of error.
Get next connection structure for a server context.
@param ctx : context (shall be a server one).
@param prev : previous connection structure or NULL to get the first one.
@return connection structure or NULL if there is no more connection.
Start a server.
@param ctx : context.
@param addr : local address to listen on.
@param addrlen : local address size.
@return 0 in case of success, negative errno value in case of error.
Start a server, but changing the access mode for unix socket address.
@param ctx : context.
@param addr : local address to listen on.
@param addrlen : local address size.
@param mode : acces mode to set (see CHMOD(2)). if 0 is given this effect is
the same as simply calling pomp_ctx_listen, it will use default access mode
depending on current value of UMASK(2).
@return 0 in case of success, negative errno value in case of error.
@remarks the ‘mode’ argument is ignored for non unix socket address.
Create a new context structure.
@param cb : function to be called when connection/disconnection/message
events occur.
@param userdata : user data to give in cb.
@return context structure or NULL in case of error.
Create a new context structure in an existing loop.
@param cb : function to be called when connection/disconnection/message
events occur.
@param userdata : user data to give in cb.
@param loop: loop to use.
@return context structure or NULL in case of error.
Function to be called when the loop of the context is signaled.
@param ctx : context.
@return 0 in case of success, negative errno value in case of error.
@remarks this is equivalent to calling pomp_ctx_wait_and_process with a
timeout of 0 (no wait).
Format and send a message to a context.
For server it will broadcast to all connected clients. If there is no
connection, no message is sent and no error is returned.
For client, if there is no connection, -ENOTCONN is returned.
@param ctx : context.
@param msgid : message id.
@param fmt : format string. Can be NULL if no arguments given.
@param … : message arguments.
@return 0 in case of success, negative errno value in case of error.
Send a message to a context.
For server it will broadcast to all connected clients. If there is no
connection, the message is lost and no error is returned.
For client, if there is no connection, -ENOTCONN is returned.
@param ctx : context.
@param msg : message to send.
@return 0 in case of success, negative errno value in case of error.
Send a message on dgram context to a remote address.
@param ctx : context.
@param msg : message to send.
@param addr : destination address.
@param addrlen : address size.
@return 0 in case of success, negative errno value in case of error.
Send a buffer to a raw context.
For server it will broadcast to all connected clients. If there is no
connection, no buffer is sent and no error is returned.
For client, if there is no connection, -ENOTCONN is returned.
@param ctx : context.
@param buf : buffer to send.
@return 0 in case of success, negative errno value in case of error.
Send a buffer on dgram raw context to a remote address.
@param ctx : context.
@param buff : buffer to send.
@param addr : destination address.
@param addrlen : address size.
@return 0 in case of success, negative errno value in case of error.
Format and send a message to a context.
For server it will broadcast to all connected clients. If there is no
connection, the message is lost and no error is returned.
For client, if there is no connection, -ENOTCONN is returned.
@param ctx : context.
@param msgid : message id.
@param fmt : format string. Can be NULL if no arguments given.
@param args : message arguments.
@return 0 in case of success, negative errno value in case of error.
Mark the context as raw. Internal message protocol serialization will not
be used, only raw data can be sent/received. Connection/Disconnection
events will be notified with the generic context event callback.
message API.
@param ctx : context.
@param cb : function to call when data has been received. The userdata
argument will be the same as the one set when creating the context.
@return 0 in case of success, negative errno value in case of error.
Set the context default read buffer length.
For server and client contexts, this value can be overriden for each
connection with pomp_conn_set_read_buffer_len.
@note The default read buffer length is 4096 bytes.
@note Read buffers of existing connections are not affected by this function,
use pomp_conn_set_read_buffer_len() instead for them.
@param ctx : context.
@param len : the length in bytes of the read buffer.
@return 0 in case of success, negative errno value in case of error.
Set the function to call when send operations are completed. This allows
application to be notified of actual completion in case operations are
internally queued.
@param ctx : context.
@param cb : function to call when send operations are completed. The userdata
argument will be the same as the one set when creating the context.
@return 0 in case of success, negative errno value in case of error.
Set the function to call when socket fd are created. This allows application
to configure socket before it is used.
@param ctx : context.
@param cb : function to call when socket are created. The userdata
argument will be the same as the one set when creating the context.
@return 0 in case of success, negative errno value in case of error.
Setup TCP keepalive. Settings will be applied to all future TCP connections.
Current connections (if any) will not be affected.
@param ctx : context.
@param enable : 1 to enable, 0, to disable.
@param idle : start keepalives after this period (in seconds).
@param interval : Interval between keepalives (in seconds).
@param count : number of keepalives before death.
@return 0 in case of success, negative errno value in case of error.
Stop the context. It will disconnects all peers (with notification). The
context structure itself is not freed. It can be used again with listen or
connect.
@param ctx : context.
@return 0 in case of success, negative errno value in case of error.
Wait for events to occur in the context and process them.
@param ctx : context.
@param timeout : timeout of wait (in ms) or -1 for infinite wait.
@return 0 in case of success, -ETIMEDOUT if timeout occurred,
negative errno value in case of error.
Dump arguments in a human readable form. Similar to pomp_decoder_dump() but
allocates the output buffer dynamically.
@param dec : decoder.
@param dst : destination buffer, which will be allocated to a suitable size
dynamically. Must be freed with free(), after usage.
@return 0 in case of success, negative errno value in case of error.
Dump arguments in a human readable form.
@param dec : decoder.
@param dst : destination buffer.
@param maxdst : max length of destination buffer.
@return 0 in case of success, negative errno value in case of error.
Initialize a decoder object before starting to decode a message.
@param dec : encoder.
@param msg : message to decode.
@return 0 in case of success, negative errno value in case of error.
Decode arguments according to given format string.
@param dec : decoder.
@param fmt : format string. Can be NULL if no arguments given.
@param … : arguments.
@return 0 in case of success, negative errno value in case of error.
Decode a buffer.
@param dec : decoder.
@param v : decoded buffer. Call ‘free’ when done.
@param n : decoded buffer size.
@return 0 in case of success, negative errno value in case of error.
Decode a buffer without any extra allocation or copy.
@param dec : decoder.
@param v : decoded buffer. Shall NOT be modified or freed as it points
directly to internal storage. Scope is the same as the associated message.
@param n : decoded buffer size.
@return 0 in case of success, negative errno value in case of error.
Decode a string without any extra allocation or copy.
@param dec : decoder.
@param v : decoded string. Shall NOT be modified or freed as it points
directly to internal storage. Scope is the same as the associated message.
@return 0 in case of success, negative errno value in case of error.
Decode a string.
@param dec : decoder.
@param v : decoded string. Call ‘free’ when done.
@return 0 in case of success, negative errno value in case of error.
Decode arguments according to given format string.
@param dec : decoder.
@param fmt : format string. Can be NULL if no arguments given.
@param args : arguments.
@return 0 in case of success, negative errno value in case of error.
Initialize an encoder object before starting to encode a message.
@param enc : encoder.
@param msg : message to encode.
@return 0 in case of success, negative errno value in case of error.
Encode arguments according to given format string.
@param enc : encoder.
@param fmt : format string. Can be NULL if no arguments given.
@param … : arguments.
@return 0 in case of success, negative errno value in case of error.
Encode arguments according to given format string.
@param enc : encoder.
@param fmt : format string. Can be NULL if no arguments given.
@param argc : number of arguments.
@param argv : array of arguments as strings. Each string will be converted
according to its real type specified in format.
@return 0 in case of success, negative errno value in case of error.
Encode a buffer.
@param enc : encoder.
@param v : buffer to encode.
@param n : buffer size.
@return 0 in case of success, negative errno value in case of error.
Encode a file descriptor. It will be internally duplicated and close when
associated message is released.
@param enc : encoder.
@param v : value to encode.
@return 0 in case of success, negative errno value in case of error.
Encode a 8-bit unsigned integer.
@param enc : encoder.
@param v : value to encode.
@return 0 in case of success, negative errno value in case of error.
Encode a 16-bit unsigned integer.
@param enc : encoder.
@param v : value to encode.
@return 0 in case of success, negative errno value in case of error.
Encode a 32-bit unsigned integer.
@param enc : encoder.
@param v : value to encode.
@return 0 in case of success, negative errno value in case of error.
Encode a 64-bit unsigned integer.
@param enc : encoder.
@param v : value to encode.
@return 0 in case of success, negative errno value in case of error.
Encode arguments according to given format string.
@param enc : encoder.
@param fmt : format string. Can be NULL if no arguments given.
@param args : arguments.
@return 0 in case of success, negative errno value in case of error.
Attach a pomp_evt to a loop.
@param evt : event to attach.
@param loop : loop to attach to.
@param cb : callback for notifications.
@param userdata user data for callback.
@return 0 in case of success, negative errno value in case of error.
Check if the event is attached to the given loop.
@param evt : event to check.
@param loop : loop to check.
If NULL, check if the event is attached to any loop.
@return 1 if event is attached to the given loop, 0 otherwise.
Register a new fd in loop.
@param loop : loop.
@param fd : fd to register.
@param events : events to monitor. @see pomp_fd_event.
@param cb : callback for notifications.
@param userdata user data for callback.
@return 0 in case of success, negative errno value in case of error.
Register a function to be called when loop is idle, i.e. there is no event
to be processed. The registered function will be called only once and in
the order they are registered.
@param loop : loop.
@param cb : callback to call.
@param userdata : user data for callback.
@return 0 in case of success, negative errno value in case of error.
Similar to pomp_loop_idle_add but associate a cookie with the idle entry
that can be used with pomp_loop_idle_remove_by_cookie or
pomp_loop_idle_flush_by_cookie.
@param loop : loop.
@param cb : callback to call.
@param userdata : user data for callback.
@param cookie : cookie to better identify the idle entry.
@return 0 in case of success, negative errno value in case of error.
Similar to pomp_loop_idle_flush but with a filter on the cookie.
@param loop : loop.
@param cookie : cookie given in pomp_loop_idle_add.
@return 0 in case of success, negative errno value in case of error.
Unregister a function registered with pomp_loop_idle_add.
@param loop : loop.
@param cb : callback given in pomp_loop_idle_add.
@param userdata : user data given in pomp_loop_idle_add.
@return 0 in case of success, negative errno value in case of error.
Similar to pomp_loop_idle_remove but remove all idle functions registered
with the given cookie.
@param loop : loop.
@param cookie : cookie given in pomp_loop_idle_add_with_cookie.
@return 0 in case of success, negative errno value in case of error.
Function to be called when the loop is signaled for readiness.
@param loop : loop.
@return 0 in case of success, negative errno value in case of error.
@remarks this is equivalent to calling pomp_loop_wait_and_process with a
timeout of 0 (no wait).
Modify the set of events to monitor for a registered fd.
@param loop : loop.
@param fd : fd to modify.
@param events : new events to monitor. @see pomp_fd_event.
@return 0 in case of success, negative errno value in case of error.
Modify the set of events to monitor for a registered fd.
@param loop : loop.
@param fd : fd to modify.
@param events_to_add : events to add. @see pomp_fd_event.
@param events_to_remove : events to remove. @see pomp_fd_event.
@return 0 in case of success, negative errno value in case of error.
Wait for events to occur in loop and process them.
@param loop : loop.
@param timeout : timeout of wait (in ms) or -1 for infinite wait.
@return 0 in case of success, -ETIMEDOUT if timeout occurred,
negative errno value in case of error.
Enable watchdog on the loop. If the dispatch of the events on the loop takes
longer than the given delay, the given function will be called
(in an internal thread) to notify that processing is stuck.
@param loop : loop.
@param delay : maximum time (in ms allowed for the processing of events)
@param cb : function to call when the processing took too long.
@param userdata : user data for the callback.
@return 0 in case of success, negative errno value in case of error.
Dump a message in a human readable form. Similar to pomp_msg_dump() but
allocates the output buffer dynamically.
Dump a message in a human readable form.
@param msg : message.
@param dst : destination buffer, which will be allocated to a suitable size
dynamically. Must be freed with free(), after usage.
@return 0 in case of success, negative errno value in case of error.
Clear message object. It only free the internal data, not the message itself.
It shall be called before pomp_msg_init can be called again after a previous
encoding.
@param msg : message.
@return 0 in case of success, negative errno value in case of error.
Dump a message in a human readable form.
@param msg : message.
@param dst : destination buffer.
@param maxdst : max length of destination buffer.
@return 0 in case of success, negative errno value in case of error.
Finish message encoding by writing the header. It shall be called after
encoding is done and before sending it. Any write operation on the message
will return -EPERM after this function is called.
@param msg : message.
@return 0 in case of success, negative errno value in case of error.
Initialize a message object before starting to encode it.
@param msg : message.
@param msgid : message id.
@return 0 in case of success, negative errno value in case of error.
Create a new message structure.
Message will be a copy of given message (with internal buffer copied as
well, not just shared).
@param msg : message to copy.
@return new message structure or NULL in case of error.
Create a new message structure from a buffer with data.
@param buf : buffer with message content (header + playload).
@return new message structure or NULL in case of error.
Read and decode a message.
If the format is shorter (less arguments) than the message written, the last
arguments written will be silently ignored and only the first arguments in
the read format will be filled.
@param msg : message.
@param fmt : format string. Can be NULL if no arguments given.
@param … : message arguments.
@return 0 in case of success, negative errno value in case of error.
Read and decode a message.
If the format is shorter (less arguments) than the message written, the last
arguments written will be silently ignored and only the first arguments in
the read format will be filled.
@param msg : message.
@param fmt : format string. Can be NULL if no arguments given.
@param args : message arguments.
@return 0 in case of success, negative errno value in case of error.
Write and encode a message.
@param msg : message.
@param msgid : message id.
@param fmt : format string. Can be NULL if no arguments given.
@param … : message arguments.
@return 0 in case of success, negative errno value in case of error.
Write and encode a message.
@param msg : message.
@param msgid : message id.
@param fmt : format string. Can be NULL if no arguments given.
@param argc : number of arguments.
@param argv : array of arguments as strings. Each string will be converted
according to its real type specified in format.
@return 0 in case of success, negative errno value in case of error.
Write and encode a message.
@param msg : message.
@param msgid : message id.
@param fmt : format string. Can be NULL if no arguments given.
@param args : message arguments.
@return 0 in case of success, negative errno value in case of error.
Try to decode a message with given input data.
@param prot : protocol decoder.
@param buf : input data.
@param len : size of input data.
@param msg : will receive decoded message. If more input data is required
to decode the message, NULL will be returned. The message needs to be
released either by calling ‘pomp_msg_destroy’ or ‘pomp_prot_release_msg’.
Calling ‘pomp_prot_release_msg’ allows reuse of allocated message structure.
@return number of bytes processed. It can be less that input size in which
case caller shall call again this function with remaining bytes.
Release a previously decoded message. This is to reuse message structure
if possible and avoid some malloc/free at each decoded message. If there
is already a internal message structure, it is simply destroyed.
@param prot : protocol decoder.
@param msg : message to release.
@return 0 in case of success, negative errno value in case of error.
Create a new timer.
@param loop : fd loop to use for notifications.
@param cb : callback to use for notifications.
@param userdata : user data for callback.
@return new timer or NULL in case of error.
Set a one shot timer.
@param timer : timer to set.
@param delay : expiration delay in milliseconds.
@return 0 in case of success, negative errno value in case of error.
Set a periodic timer.
@param timer : timer to set.
@param delay : initial expiration delay in milliseconds.
@param period : period in milliseconds.
@return 0 in case of success, negative errno value in case of error.
Calculate the total raw frame size for a given raw frame format.
This function will calculate the total raw frame size for a frame stored
contiguously in memory.
For more details, please see vdef_calc_raw_frame_size().
@param format: raw frame format
@param resolution: the resolution of the frame in pixels
@param plane_stride: an array of VDEF_RAW_MAX_PLANE_COUNT plane strides in
bytes, can be NULL (for NULL or value of 0, default stride value is
calculated)
@param plane_stride_align: an array of VDEF_RAW_MAX_PLANE_COUNT plane stride
alignment constraints, can be NULL (for NULL or value of 0, no
alignment is applied)
@param plane_scanline: an array of VDEF_RAW_MAX_PLANE_COUNT plane scanlines
in lines, can be NULL (for NULL or value of 0, default scanline
value is calculated)
@param plane_scanline_align: an array of VDEF_RAW_MAX_PLANE_COUNT plane
scanline alignment constraints, can be NULL (for NULL or value of 0,
no alignment is applied)
@param plane_size_align: an array of VDEF_RAW_MAX_PLANE_COUNT for plane size
alignment constraints, can be NULL (for NULL or value of 0, no
alignment is applied)
@return the raw frame size in bytes, or negative errno value in case of error
Calculate the raw frame plane stride and size for a given raw frame format.
This function can be used to calculate the stride and / or size of raw frame
planes.
If the plane_stride is set to NULL, the default stride value is calculated
and used for size calculation.
If the plane_stride_align is not NULL and values are different from 0, the
plane strides will be aligned.
If the plane_size is set to NULL, only stride calculation will be performed.
If the plane_size_align is not NULL and values are different from 0, the
plane size will be aligned.
@param format: raw frame format
@param resolution: the resolution of the frame in pixels
@param plane_stride: an array of VDEF_RAW_MAX_PLANE_COUNT plane strides in
bytes, can be NULL (for NULL or value of 0, default stride value is
calculated)
@param plane_stride_align: an array of VDEF_RAW_MAX_PLANE_COUNT plane stride
alignment constraints, can be NULL (for NULL or value of 0, no
alignment is applied)
@param plane_scanline: an array of VDEF_RAW_MAX_PLANE_COUNT plane scanlines
in lines, can be NULL (for NULL or value of 0, default scanline
value is calculated)
@param plane_scanline_align: an array of VDEF_RAW_MAX_PLANE_COUNT plane
scanline alignment constraints, can be NULL (for NULL or value of 0,
no alignment is applied)
@param plane_size: an array of VDEF_RAW_MAX_PLANE_COUNT for plane sizes in
bytes, can be NULL
@param plane_size_align: an array of VDEF_RAW_MAX_PLANE_COUNT for plane size
alignment constraints, can NULL (for NULL or value of 0, no alignment
is applied)
@return 0 on success, negative errno value in case of error
Get an enum vdef_coded_data_format value from a string.
Valid strings are only the suffix of the coded data format name (eg.
‘BYTE_STREAM’). The case is ignored.
@param str: coded data format name to convert
@return the enum vdef_coded_data_format value or
VDEF_CODED_DATA_FORMAT_UNKNOWN if unknown
Get a string from an enum vdef_coded_data_format value.
@param format: coded data format value to convert
@return a string description of the coded data format
Compare two vdef_coded_format structs.
The components of both formats are compared and if one of them is
different, the function will return false.
@param f1: the first format to compare
@param f2: the second format to compare
@return true if both format are identical, false otherwise
Read a coded format structure from a CSV string.
The CSV separator is ‘;’ to use for example as MIME type parameters.
@param str: pointer to an input string
@param format: pointer to the coded format structure (output)
@return 0 on success, negative errno value in case of error
Fill a struct vdef_coded_format from a string.
The case is ignored.
@param str: raw format name to convert
@param format: raw format to fill
@return 0 on success, negative errno value in case of error
Check the intersection of a coded format against capabilities.
@param format: coded format
@param caps: coded capabilities array
@param count: coded capabilities count in array
@return true if the format and the capabilities intersect, or false otherwise
Write a coded format structure to a CSV string.
The CSV separator is ‘;’ to use for example as MIME type parameters.
The string is allocated and the ownership is transferred to the caller.
@param format: pointer to an input coded format structure
@param str: pointer to the allocated string (output)
@return 0 on success, negative errno value in case of error
Write a coded format structure to a JSON object.
The jobj JSON object must have been previously allocated.
The ownership of the JSON object stays with the caller.
@param format: pointer to an input coded format structure
@param jobj: pointer to the JSON object to write to (output)
@return 0 on success, negative errno value in case of error
Get a string from a struct enum vdef_coded_format.
@param format: raw format to convert
@return a string description of the coded format, the string should be freed
after usage
Get an enum vdef_coded_frame_type value from a string.
Valid strings are only the suffix of the coded frame type name (eg. ‘P’).
The case is ignored.
@param str: coded frame type name to convert
@return the enum vdef_coded_frame_type value or VDEF_CODED_FRAME_TYPE_UNKNOWN
if unknown
Get a string from an enum vdef_coded_frame_type value.
@param type: coded frame type value to convert
@return a string description of the coded frame type
Get an enum vdef_color_primaries value from an H.264 VUI colour_primaries
value (Rec. ITU-T H.264 E.1.1, also defined in Rec. ITU-T H.273).
@param color_primaries: H.264 VUI colour_primaries value to convert
@return the enum vdef_color_primaries value or VDEF_COLOR_PRIMARIES_UNKNOWN
if unknown
Get an enum vdef_color_primaries value from an H.265 VUI colour_primaries
value (Rec. ITU-T H.265 E.2.1, also defined in Rec. ITU-T H.273).
@param color_primaries: H.265 VUI colour_primaries value to convert
@return the enum vdef_color_primaries value or VDEF_COLOR_PRIMARIES_UNKNOWN
if unknown
Get an enum vdef_color_primaries value from a string.
Valid strings are only the suffix of the color primaries name (eg. ‘BT709’).
The case is ignored.
@param str: color primaries name to convert
@return the enum vdef_color_primaries value or VDEF_COLOR_PRIMARIES_UNKNOWN
if unknown
Get an enum vdef_color_primaries value from color primaries and white point
normalized chromacity coordinates.
@param val: color primaries and white point normalized
chromacity coordinates
@return the enum vdef_color_primaries value or VDEF_COLOR_PRIMARIES_UNKNOWN
if unknown
Get an H.264 VUI colour_primaries value from an enum vdef_color_primaries
value (Rec. ITU-T H.264 E.1.1, also defined in Rec. ITU-T H.273).
@param color: color primaries value
@return the H.264 VUI colour_primaries value
Get an H.265 VUI colour_primaries value from an enum vdef_color_primaries
value (Rec. ITU-T H.265 E.2.1, also defined in Rec. ITU-T H.273).
@param color: color primaries value
@return the H.265 VUI colour_primaries value
Get a string from an enum vdef_color_primaries value.
@param color: color primaries value to convert
@return a string description of the color primaries
Check if dimension components are aligned.
This function checks if all values of a dimension are aligned. It is very
useful to check hardware limitations.
@param dim: the dimension to check
@param align: the dimension with alignment restriction
@return true if the dimension is aligned, false otherwise
Get an enum vdef_dynamic_range value from a string.
Valid strings are only the suffix of the dynamic range name (eg. ‘HDR10’).
The case is ignored.
@param str: dynamic range name to convert
@return the enum vdef_dynamic_range value or VDEF_DYNAMIC_RANGE_UNKNOWN
if unknown
Get an enum vdef_encoding value from a string.
Valid strings are only the suffix of the encoding name (eg. ‘H264’).
The case is ignored.
@param str: encoding name to convert
@return the enum vdef_encoding value or VDEF_ENCODING_UNKNOWN
if unknown
Read a format information structure from a CSV string.
The CSV separator is ‘;’ to use for example as MIME type parameters.
All information is filled except the MDCV and CLL information.
@param str: pointer to an input string
@param info: pointer to the format information structure (output)
@return 0 on success, negative errno value in case of error
Write a format information structure to a CSV string.
The CSV separator is ‘;’ to use for example as MIME type parameters.
All information is written except the MDCV and CLL information.
The string is allocated and the ownership is transferred to the caller.
@param info: pointer to an input format information structure
@param str: pointer to the allocated string (output)
@return 0 on success, negative errno value in case of error
Write a format information structure to a JSON object.
The jobj JSON object must have been previously allocated.
The ownership of the JSON object stays with the caller.
@param info: pointer to an input format information structure
@param jobj: pointer to the JSON object to write to (output)
@return 0 on success, negative errno value in case of error
Map a format information structure to a frame information structure.
The fields in the frame information that are not present in the format
information are set to 0 or UNKNOWN values.
@param format: pointer to an input format information structure
@param frame: pointer to an output frame information structure
Write a frame information structure to a JSON object.
If the min parameter is true, only information not common with struct
vdef_format_info is written.
The jobj JSON object must have been previously allocated.
The ownership of the JSON object stays with the caller.
@param info: pointer to an input format information structure
@param min: if true, write only information not common with struct
vdef_format_info
@param jobj: pointer to the JSON object to write to (output)
@return 0 on success, negative errno value in case of error
Map a frame information structure to a format information structure.
The fields in the format information that are not present in the frame
information are set to 0 or UNKNOWN values.
@param frame: pointer to an input frame information structure
@param format: pointer to an output format information structure
Get an enum vdef_frame_type value from a string.
Valid strings are only the suffix of the frame type name (eg. ‘RAW’).
The case is ignored.
@param str: frame type name to convert
@return the enum vdef_frame_type value or VDEF_FRAME_TYPE_UNKNOWN
if unknown
Get an enum vdef_matrix_coefs value from an H.264 VUI matrix_coefficients
value (Rec. ITU-T H.264 E.1.1, also defined in Rec. ITU-T H.273).
@param matrix_coefficients: H.264 VUI matrix_coefficients
value to convert
@return the enum vdef_matrix_coefs value or VDEF_MATRIX_COEFS_UNKNOWN
if unknown
Get an enum vdef_matrix_coefs value from an H.265 VUI matrix_coeffs
value (Rec. ITU-T H.265 E.2.1, also defined in Rec. ITU-T H.273).
@param matrix_coefficients: H.265 VUI matrix_coeffs value to convert
@return the enum vdef_matrix_coefs value or VDEF_MATRIX_COEFS_UNKNOWN
if unknown
Get an enum vdef_matrix_coefs value from a string.
Valid strings are only the suffix of the matrix coefficients name (eg.
‘BT709’). The case is ignored.
@param str: matrix coefficients name to convert
@return the enum vdef_matrix_coefs value or VDEF_MATRIX_COEFS_UNKNOWN
if unknown
Get an H.264 VUI matrix_coefficients value from an enum vdef_matrix_coefs
value (Rec. ITU-T H.264 E.1.1, also defined in Rec. ITU-T H.273).
@param matrix: matrix coefficients value
@return the H.264 VUI matrix_coefficients value
Get an H.265 VUI matrix_coefficients value from an enum vdef_matrix_coefs
value (Rec. ITU-T H.265 E.2.1, also defined in Rec. ITU-T H.273).
@param matrix: matrix coefficients value
@return the H.265 VUI matrix_coefficients value
Get a string from an enum vdef_matrix_coefs value.
@param matrix: matrix coefficients value to convert
@return a string description of the matrix coefficients
Get an enum vdef_raw_data_layout value from a string.
The case is ignored.
@param str: data layout name to convert
@return the enum vdef_raw_data_layout value or VDEF_RAW_PIX_LAYOUT_UNKNOWN if
unknown
Compare two vdef_raw_format structs.
The components of both formats are compared and if one of them is
different, the function will return false.
@param f1: the first format to compare
@param f2: the second format to compare
@return true if both format are identical, false otherwise
Read a raw format structure from a CSV string.
The CSV separator is ‘;’ to use for example as MIME type parameters.
@param str: pointer to an input string
@param format: pointer to the raw format structure (output)
@return 0 on success, negative errno value in case of error
Fill a struct vdef_raw_format from a string.
The case is ignored.
@param str: raw format name to convert
@param format: raw format to fill
@return 0 on success, negative errno value in case of error
Check the intersection of a raw format against capabilities.
@param format: raw format
@param caps: raw capabilities array
@param count: raw capabilities count in array
@return true if the format and the capabilities intersect, or false otherwise
Write a raw format structure to a CSV string.
The CSV separator is ‘;’ to use for example as MIME type parameters.
The string is allocated and the ownership is transferred to the caller.
@param format: pointer to an input raw format structure
@param str: pointer to the allocated string (output)
@return 0 on success, negative errno value in case of error
Write a raw format structure to a JSON object.
The jobj JSON object must have been previously allocated.
The ownership of the JSON object stays with the caller.
@param format: pointer to an input raw format structure
@param jobj: pointer to the JSON object to write to (output)
@return 0 on success, negative errno value in case of error
Get a string from a struct enum vdef_raw_format.
@param format: raw format to convert
@return a string description of the raw format, the string should be freed
after usage
Get an enum vdef_raw_pix_format value from a string.
The case is ignored.
@param str: pixel format name to convert
@return the enum vdef_raw_pix_format value or VDEF_RAW_PIX_FORMAT_UNKNOWN if
unknown
Get an enum vdef_raw_pix_layout value from a string.
The case is ignored.
@param str: pixel layout name to convert
@return the enum vdef_raw_pix_layout value or VDEF_RAW_PIX_LAYOUT_UNKNOWN if
unknown
Get an enum vdef_raw_pix_order value from a string.
The case is ignored.
@param str: pixel order name to convert
@return the enum vdef_raw_pix_order value or VDEF_RAW_PIX_ORDER_UNKNOWN if
unknown
Align components of a rectangle.
@param rect: the rectangle to align
@param align: the rectangle with restriction to apply
@param align_lower: true to align left and top on lower values, false to
align on upper values
@param enlarge: true to enlarge the rectangle, false to shrink the rectangle
Check if a rectangle fits in another rectangle.
The function checks if rect fits inside the rectangle bounds.
@param rect: the rectangle to check (the left and top can be set to -1, which
means the rectangle is centered)
@param bound: the rectangle in which rect should fit
@return true if the rectangle fits inside the boundaries, false otherwise
Check if rectangle components are aligned.
This function checks if all values of a rectangle are aligned. It is very
useful to check hardware limitations.
@param rect: the rectangle to check
@param align: the rectangle with alignment restriction
@return true if the rectangle is aligned, false otherwise
Get an enum vdef_tone_mapping value from a string.
Valid strings are only the suffix of the tone mapping name (eg. ‘PLOG’).
The case is ignored.
@param str: tone mapping name to convert
@return the enum vdef_tone_mapping value or VDEF_TONE_MAPPING_UNKNOWN
if unknown
Get an enum vdef_transfer_function value from an H.264 VUI
transfer_characteristics value (Rec. ITU-T H.264 E.1.1, also defined
in Rec. ITU-T H.273).
@param transfer_characteristics: H.264 VUI transfer_characteristics
value to convert
@return the enum vdef_transfer_function value or
VDEF_TRANSFER_FUNCTION_UNKNOWN if unknown
Get an enum vdef_transfer_function value from an H.265 VUI
transfer_characteristics value (Rec. ITU-T H.265 E.2.1, also defined
in Rec. ITU-T H.273).
@param transfer_characteristics: H.265 VUI transfer_characteristics
value to convert
@return the enum vdef_transfer_function value or
VDEF_TRANSFER_FUNCTION_UNKNOWN if unknown
Get an enum vdef_transfer_function value from a string.
Valid strings are only the suffix of the transfer function name (eg.
‘BT709’). The case is ignored.
@param str: transfer function name to convert
@return the enum vdef_transfer_function value or
VDEF_TRANSFER_FUNCTION_UNKNOWN if unknown
Get an H.264 VUI transfer_characteristics value from an enum
vdef_transfer_function value (Rec. ITU-T H.264 E.1.1, also defined
in Rec. ITU-T H.273).
@param transfer: transfer function value
@return the H.264 VUI transfer_characteristics value
Get an H.265 VUI transfer_characteristics value from an enum
vdef_transfer_function value (Rec. ITU-T H.265 E.2.1, also defined
in Rec. ITU-T H.273).
@param transfer: transfer function value
@return the H.265 VUI transfer_characteristics value
Get a string from an enum vdef_transfer_function value.
@param transfer: transfer function value to convert
@return a string description of the transfer function
ToString function for enum vmeta_automation_anim.
@param val: automation animation value to convert
@return a string description of the automation animation
Get an enum vmeta_camera_model_type value from a string.
Valid strings are only the suffix of the camera model type (eg. ‘FISHEYE’).
The case is ignored.
@param str: camera model type string to convert
@return the enum vmeta_camera_model_type value or
VMETA_CAMERA_MODEL_TYPE_UNKNOWN if unknown
Get a string from an enum vmeta_camera_model_type value.
@param val: camera model type value to convert
@return a string description of the camera model type
Get an enum vmeta_camera_type value from a string.
Valid strings are only the suffix of the camera type (eg. ‘FRONT’).
The case is ignored.
@param str: camera type string to convert
@return the enum vmeta_camera_type value or
VMETA_CAMERA_TYPE_UNKNOWN if unknown
Get an enum vmeta_dynamic_range value from a string
Valid strings are only the suffix of the dynamic range (eg. ‘HDR10’).
The case is ignored.
@param str: dynamic range string to convert
@return the enum vmeta_dynamic_range value or
VMETA_DYNAMIC_RANGE_UNKNOWN if unknown
ToString function for enum vmeta_followme_anim.
@param val: follow-me animation value to convert
@return a string description of the follow-me animation
Write a frame metadata CSV file header string for the given type.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param type: frame metadata type
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written on success, negative errno value
in case of error
Get the drone air speed from a frame metadata structure.
The function fills the speed value with the air speed if it is available
according to the metadata type. If the air speed is not available for the
given type, -ENOENT is returned. When an air speed is available it can
still be invalid (-1 value).
@param meta: pointer to a frame metadata structure
@param speed: pointer to an air speed value (output)
@return 0 on success, negative errno value in case of error
Get the frame AWB (Auto White Balance) blue gain from a frame metadata
structure.
The function fills the gain value with the frame AWB blue gain if it is
available according to the metadata type. If the frame AWB blue gain is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param gain: pointer to a frame AWB blue gain value (output)
@return 0 on success, negative errno value in case of error
Get the frame AWB (Auto White Balance) red gain from a frame metadata
structure.
The function fills the gain value with the frame AWB red gain if it is
available according to the metadata type. If the frame AWB red gain is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param gain: pointer to a frame AWB red gain value (output)
@return 0 on success, negative errno value in case of error
Get the battery charge percentage from a frame metadata structure.
The function fills the bat value with the battery charge percentage if
it is available according to the metadata type. If the battery charge
percentage is not available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param bat: pointer to a battery charge percentage value (output)
@return 0 on success, negative errno value in case of error
Get the camera location from a frame metadata structure.
The function fills the loc structure with the camera location if it is
available according to the metadata type. If the location is not available
for the given type, -ENOENT is returned. When a location is available it
can still be invalid (valid field in the loc structure).
@param meta: pointer to a frame metadata structure
@param loc: pointer to a camera location structure (output)
@return 0 on success, negative errno value in case of error
Get the camera pan angle from a frame metadata structure.
The function fills the pan value with the camera pan angle if it is
available according to the metadata type. If the camera pan angle is
not available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param pan: pointer to a camera pan value (output)
@return 0 on success, negative errno value in case of error
Get the camera principal point from a frame metadata structure.
The function fills the vec structure with the camera principal point
coordinates if it is available according to the metadata type. If the
principal point is not available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param vec: pointer to a principal point coordinates structure (output)
@return 0 on success, negative errno value in case of error
Get the camera tilt angle from a frame metadata structure.
The function fills the tilt value with the camera tilt angle if it is
available according to the metadata type. If the camera tilt angle is
not available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param pan: pointer to a camera tilt value (output)
@return 0 on success, negative errno value in case of error
Get the drone attitude Euler angles from a frame metadata structure.
The function fills the euler structure with the drone attitude if it is
available according to the metadata type. If the attitude is not available
for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param euler: pointer to a euler structure (output)
@return 0 on success, negative errno value in case of error
Get the drone attitude quaternion from a frame metadata structure.
The function fills the quat structure with the drone attitude if it is
available according to the metadata type. If the attitude is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param quat: pointer to a quaternion structure (output)
@return 0 on success, negative errno value in case of error
Get the frame exposure time in milliseconds from a frame metadata structure.
The function fills the exp value with the frame exposure time if it is
available according to the metadata type. If the frame exposure time is
not available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param exp: pointer to a frame exposure time value in ms (output).
@return 0 on success, negative errno value in case of error
Get the flying state from a frame metadata structure.
The function fills the state value with the flying state if it is
available according to the metadata type. If the flying state is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param state: pointer to a flying state value (output)
@return 0 on success, negative errno value in case of error
Get the frame base orientation Euler angles from a frame metadata structure.
The function fills the euler structure with the frame base orientation if
it is available according to the metadata type. If the base orientation is
not available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param euler: pointer to a euler structure (output)
@return 0 on success, negative errno value in case of error
Get the frame base orientation quaternion from a frame metadata structure.
The function fills the quat structure with the frame base orientation if
it is available according to the metadata type. If the base orientation is
not available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param quat: pointer to a quaternion structure (output)
@return 0 on success, negative errno value in case of error
Get the frame orientation Euler angles from a frame metadata structure.
The function fills the euler structure with the frame orientation if it is
available according to the metadata type. If the orientation is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param euler: pointer to a euler structure (output)
@return 0 on success, negative errno value in case of error
Get the frame orientation quaternion from a frame metadata structure.
The function fills the quat structure with the frame orientation if it is
available according to the metadata type. If the orientation is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param quat: pointer to a quaternion structure (output)
@return 0 on success, negative errno value in case of error
Get the frame capture timestamp from a frame metadata structure.
The function fills the timestamp value with the frame timestamp if it
is available according to the metadata type. If the timestamp is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param timestamp: pointer to a timestamp value (output)
@return 0 on success, negative errno value in case of error
Get the frame gain from a frame metadata structure.
The function fills the gain value with the frame gain if it is available
according to the metadata type. If the frame gain is not available for
the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param gain: pointer to a frame gain value (output)
@return 0 on success, negative errno value in case of error
Get the drone ground distance from a frame metadata structure.
The function fills the dist value with the ground distance if it is
available according to the metadata type. If the ground distance is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param dist: pointer to a ground distance value (output)
@return 0 on success, negative errno value in case of error
Get the link goodput (throughput estimation) from a frame metadata structure.
The function fills the goodput value with the link goodput if it is
available according to the metadata type. If the link goodput is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param goodput: pointer to a link goodput value (output)
@return 0 on success, negative errno value in case of error
Get the link quality (0 to 5, 5 is best) from a frame metadata structure.
The function fills the quality value with the link quality if it is
available according to the metadata type. If the link quality is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param quality: pointer to a link quality value (output)
@return 0 on success, negative errno value in case of error
Get the drone location from a frame metadata structure.
The function fills the loc structure with the drone location if it is
available according to the metadata type. If the location is not available
for the given type, -ENOENT is returned. When a location is available it
can still be invalid (valid field in the loc structure).
@param meta: pointer to a frame metadata structure
@param loc: pointer to a drone location structure (output)
@return 0 on success, negative errno value in case of error
Get the recording metadata MIME type.
The function returns the MIME type string for a given recording frame
metadata type.
The library has ownership of the returned string and it must not be freed.
@param type: frame metadata type
@return the MIME type or NULL if not appliable or if an error occurred
Get the picture horizontal field of view from a frame metadata structure.
The function fills the fov value with the picture horizontal field of view
in degrees if it is available according to the metadata type. If the FOV is
not available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param fov: pointer to a FOV value (output)
@return 0 on success, negative errno value in case of error
Get the picture vertical field of view from a frame metadata structure.
The function fills the fov value with the picture vertical field of view
in degrees if it is available according to the metadata type. If the FOV is
not available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param fov: pointer to a FOV value (output)
@return 0 on success, negative errno value in case of error
Get the piloting mode from a frame metadata structure.
The function fills the mode value with the piloting mode if it is
available according to the metadata type. If the piloting mode is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param mode: pointer to a piloting mode value (output)
@return 0 on success, negative errno value in case of error
Read the reference counter of a vmeta_frame structure.
If the reference counter is greater than INT_MAX, INT_MAX will be returned.
@param meta: pointer to the frame metadata structure
@return the current reference count of the metadata on success
(0 or greater), negative errno value in case of error
Get the drone speed in NED (North-East-Down) from a frame metadata structure.
The function fills the speed structure with the drone speed if it is
available according to the metadata type. If the speed is not available
for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param speed: pointer to a drone speed structure (output)
@return 0 on success, negative errno value in case of error
Get the wifi RSSI from a frame metadata structure.
The function fills the rssi value with the wifi RSSI if it is
available according to the metadata type. If the wifi RSSI is not
available for the given type, -ENOENT is returned.
@param meta: pointer to a frame metadata structure
@param rssi: pointer to a wifi RSSI value (output)
@return 0 on success, negative errno value in case of error
Create a vmeta_frame structure for writing.
The returned structure has a reference count of 1.
@param type: vmeta_frame type to create.
@param ret_obj: pointer filled with the new vmeta_frame structure
@return 0 on success, negative errno value in case of error
Read frame metadata.
This function allocates a new metadata structure, deserializing data from
the provided buffer, and detecting the metadata type when possible.
Providing the MIME type is mandatory for protobuf-based metadata or metadata
from recording files (MP4).
The pos field in the buf structure must be set to the starting position for
reading (can be 0 if no previous data is present in the buffer). The size
of the buffer (len field) must be sufficient to allow reading the metadata
otherwise an error is returned. The ownership of the buffer stays with
the caller.
The allocated structure has a reference count of 1, and is converted to
protobuf-based metadata when possible.
@param buf: pointer to the buffer structure
@param mime_type: pointer to the metadata MIME type, if known;
if NULL, the type will be automatically detected when
possible.
@param ret_obj: pointer filled with the new vmeta_frame structure
@return 0 on success, negative errno value in case of error
Read frame metadata.
This function allocates a new metadata structure, deserializing data from
the provided buffer, and detecting the metadata type when possible.
Providing the MIME type is mandatory for protobuf-based metadata or metadata
from recording files (MP4).
The pos field in the buf structure must be set to the starting position for
reading (can be 0 if no previous data is present in the buffer). The size
of the buffer (len field) must be sufficient to allow reading the metadata
otherwise an error is returned. The ownership of the buffer stays with
the caller.
The allocated structure has a reference count of 1.
If convert is set to a non-zero value, this function has the same behavior as
`vmeta_frame_read(…)’: the allocated structure is converted to
protobuf-based metadata when possible. If convert is zero, the raw
deserialized metadata is returned.
@param buf: pointer to the buffer structure
@param mime_type: pointer to the metadata MIME type, if known;
if NULL, the type will be automatically detected when
possible.
@param convert: if non-zero, ret_obj will be converted to protobuf-based
metadata, when possible.
@param ret_obj: pointer filled with the new vmeta_frame structure
@return 0 on success, negative errno value in case of error
Increment the reference counter of a vmeta_frame structure.
@param meta: pointer to the frame metadata structure
@return 0 on success, negative errno value in case of error
Write frame metadata as a CSV string.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param meta: pointer to a frame metadata structure
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written on success, negative errno value
in case of error
Write frame metadata to a JSON object.
The jobj JSON object must have been previously allocated.
The ownership of the JSON object stays with the caller.
@param meta: pointer to a frame metadata structure
@param jobj: pointer to the JSON object to write to (output)
@return 0 on success, negative errno value in case of error
Write frame metadata to a JSON string.
This function fills the str array with the null-terminated JSON string.
The string must have been previously allocated. The function writes
up to len characters.
@param meta: pointer to a frame metadata structure
@param output: pointer to the string to write to
@param len: maximum length of the string
@return 0 on success, negative errno value in case of error
Decrement the reference counter of a vmeta_frame structure.
When the reference counter reaches zero, the vmeta_frame structure will be
released. The caller shoud no longer use the meta structure after calling
this.
@param meta: pointer to the frame metadata structure
@return 0 on success, negative errno value in case of error
Write a “Parrot Video Recording Metadata” v1 frame metadata CSV file
header string.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written
Read “Parrot Video Recording Metadata” v1 frame metadata.
This function fills the supplied structure with the deserialized metadata.
The pos field in the buf structure must be set to the starting position for
reading (can be 0 if no previous data is present in the buffer). The size
of the buffer (len field) must be sufficient to allow reading the metadata
otherwise an error is returned. The ownership of the buffer stays with
the caller.
@param buf: pointer to the buffer structure
@param meta: pointer to the frame metadata structure (output)
@return 0 on success, negative errno value in case of error
Write “Parrot Video Recording Metadata” v1 frame metadata as a CSV string.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param meta: pointer to a frame metadata structure
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written
Write “Parrot Video Recording Metadata” v1 frame metadata to a JSON object.
The jobj JSON object must have been previously allocated.
The ownership of the JSON object stays with the caller.
@param meta: pointer to a frame metadata structure
@param jobj: pointer to the JSON object to write to (output)
@return 0 on success, negative errno value in case of error
Write “Parrot Video Recording Metadata” v1 frame metadata.
This function fills the supplied buffer with the serialized metadata.
The size of the data written is returned through the pos field in the buf
structure.
The buf structure must have been previously initialized using the
vmeta_buffer_set_data() function with a previously allocated buffer and
its size. The pos field in the buf structure does not need to be 0 prior
to calling the function (i.e. data can already be present in the buffer).
The ownership of the buffer stays with the caller.
@param buf: pointer to the buffer structure (output)
@param meta: pointer to the frame metadata structure
@return 0 on success, negative errno value in case of error
Write a “Parrot Video Streaming Metadata” v1 basic frame metadata CSV
file header string.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written
Read “Parrot Video Streaming Metadata” v1 basic frame metadata.
This function fills the supplied structure with the deserialized metadata.
The pos field in the buf structure must be set to the starting position for
reading (can be 0 if no previous data is present in the buffer). The size
of the buffer (len field) must be sufficient to allow reading the metadata
otherwise an error is returned. The ownership of the buffer stays with
the caller.
@param buf: pointer to the buffer structure
@param meta: pointer to the frame metadata structure (output)
@return 0 on success, negative errno value in case of error
Write “Parrot Video Streaming Metadata” v1 basic frame metadata as a
CSV string.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param meta: pointer to a frame metadata structure
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written
Write “Parrot Video Streaming Metadata” v1 basic frame metadata to a
JSON object.
The jobj JSON object must have been previously allocated.
The ownership of the JSON object stays with the caller.
@param meta: pointer to a frame metadata structure
@param jobj: pointer to the JSON object to write to (output)
@return 0 on success, negative errno value in case of error
Write “Parrot Video Streaming Metadata” v1 basic frame metadata.
This function fills the supplied buffer with the serialized metadata.
The size of the data written is returned through the pos field in the buf
structure.
The buf structure must have been previously initialized using the
vmeta_buffer_set_data() function with a previously allocated buffer and
its size. The pos field in the buf structure does not need to be 0 prior
to calling the function (i.e. data can already be present in the buffer).
The ownership of the buffer stays with the caller.
@param buf: pointer to the buffer structure (output)
@param meta: pointer to the frame metadata structure
@return 0 on success, negative errno value in case of error
Write a “Parrot Video Streaming Metadata” v1 extended frame metadata CSV
file header string.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written
Read “Parrot Video Streaming Metadata” v1 extended frame metadata.
This function fills the supplied structure with the deserialized metadata.
The pos field in the buf structure must be set to the starting position for
reading (can be 0 if no previous data is present in the buffer). The size
of the buffer (len field) must be sufficient to allow reading the metadata
otherwise an error is returned. The ownership of the buffer stays with
the caller.
@param buf: pointer to the buffer structure
@param meta: pointer to the frame metadata structure (output)
@return 0 on success, negative errno value in case of error
Write “Parrot Video Streaming Metadata” v1 extended frame metadata as a
CSV string.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param meta: pointer to a frame metadata structure
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written
Write “Parrot Video Streaming Metadata” v1 extended frame metadata to a
JSON object.
The jobj JSON object must have been previously allocated.
The ownership of the JSON object stays with the caller.
@param meta: pointer to a frame metadata structure
@param jobj: pointer to the JSON object to write to (output)
@return 0 on success, negative errno value in case of error
Write “Parrot Video Streaming Metadata” v1 extended frame metadata.
This function fills the supplied buffer with the serialized metadata.
The size of the data written is returned through the pos field in the buf
structure.
The buf structure must have been previously initialized using the
vmeta_buffer_set_data() function with a previously allocated buffer and
its size. The pos field in the buf structure does not need to be 0 prior
to calling the function (i.e. data can already be present in the buffer).
The ownership of the buffer stays with the caller.
@param buf: pointer to the buffer structure (output)
@param meta: pointer to the frame metadata structure
@return 0 on success, negative errno value in case of error
Write a “Parrot Video Metadata” v2 frame metadata CSV file header string.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written
Read “Parrot Video Metadata” v2 frame metadata.
This function fills the supplied structure with the deserialized metadata.
The pos field in the buf structure must be set to the starting position for
reading (can be 0 if no previous data is present in the buffer). The size
of the buffer (len field) must be sufficient to allow reading the metadata
otherwise an error is returned. The ownership of the buffer stays with
the caller.
@param buf: pointer to the buffer structure
@param meta: pointer to the frame metadata structure (output)
@return 0 on success, negative errno value in case of error
Write “Parrot Video Metadata” v2 frame metadata as a CSV string.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param meta: pointer to a frame metadata structure
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written
Write “Parrot Video Metadata” v2 frame metadata to a JSON object.
The jobj JSON object must have been previously allocated.
The ownership of the JSON object stays with the caller.
@param meta: pointer to a frame metadata structure
@param jobj: pointer to the JSON object to write to (output)
@return 0 on success, negative errno value in case of error
Write “Parrot Video Metadata” v2 frame metadata.
This function fills the supplied buffer with the serialized metadata.
The size of the data written is returned through the pos field in the buf
structure.
The buf structure must have been previously initialized using the
vmeta_buffer_set_data() function with a previously allocated buffer and
its size. The pos field in the buf structure does not need to be 0 prior
to calling the function (i.e. data can already be present in the buffer).
The ownership of the buffer stays with the caller.
@param buf: pointer to the buffer structure (output)
@param meta: pointer to the frame metadata structure
@return 0 on success, negative errno value in case of error
Write a “Parrot Video Metadata” v3 frame metadata CSV file header string.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written
Read “Parrot Video Metadata” v3 frame metadata.
This function fills the supplied structure with the deserialized metadata.
The pos field in the buf structure must be set to the starting position for
reading (can be 0 if no previous data is present in the buffer). The size
of the buffer (len field) must be sufficient to allow reading the metadata
otherwise an error is returned. The ownership of the buffer stays with
the caller.
@param buf: pointer to the buffer structure
@param meta: pointer to the frame metadata structure (output)
@return 0 on success, negative errno value in case of error
Write “Parrot Video Metadata” v3 frame metadata as a CSV string.
The str string must have been previously allocated. The function writes
up to maxlen characters. The CSV separator is a space character.
@param meta: pointer to a frame metadata structure
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return the number of characters written
Write “Parrot Video Metadata” v3 frame metadata to a JSON object.
The jobj JSON object must have been previously allocated.
The ownership of the JSON object stays with the caller.
@param meta: pointer to a frame metadata structure
@param jobj: pointer to the JSON object to write to (output)
@return 0 on success, negative errno value in case of error
Write “Parrot Video Metadata” v3 frame metadata.
This function fills the supplied buffer with the serialized metadata.
The size of the data written is returned through the pos field in the buf
structure.
The buf structure must have been previously initialized using the
vmeta_buffer_set_data() function with a previously allocated buffer and
its size. The pos field in the buf structure does not need to be 0 prior
to calling the function (i.e. data can already be present in the buffer).
The ownership of the buffer stays with the caller.
@param buf: pointer to the buffer structure (output)
@param meta: pointer to the frame metadata structure
@return 0 on success, negative errno value in case of error
Write frame metadata.
This function fills the supplied buffer with the serialized metadata,
according to the metadata type. The size of the data written is returned
through the pos field in the buf structure.
The buf structure must have been previously initialized using the
vmeta_buffer_set_data() function with a previously allocated buffer and
its size. The pos field in the buf structure does not need to be 0 prior
to calling the function (i.e. data can already be present in the buffer).
The ownership of the buffer stays with the caller.
@param buf: pointer to the buffer structure (output)
@param meta: pointer to the frame metadata structure
@return 0 on success, negative errno value in case of error
Read a date string.
The date is returned through the date and gmtoff parameters. date is
a value in seconds since the Epoch (1970-01-01 00:00:00 +0000 UTC);
gmtoff is the GMT offset in seconds east (eg. GMT-6 is -21600).
@param str: pointer to the string to read
@param date: pointer to the date in seconds since the Epoch (output)
@param gmtoff: pointer to the GMT offset in seconds increasing
eastbound (output)
@return 0 on success, negative errno value in case of error
Write a date string.
The str string must have been previously allocated.
The function writes up to len chars.
@param str: pointer to the string to write to (output)
@param len: maximum length of the string
@param date: date in seconds since the Epoch
@param gmtoff: GMT offset in seconds increasing eastbound
@return the length of the string written on success,
negative errno value in case of error
Read a fisheye affine matrix coefficients string.
The fisheye affine matrix coefficients are returned through the 4 float
pointer parameters.
@param str: pointer to the string to read
@param c: pointer to the fisheye affine matrix coefficient C (output)
@param d: pointer to the fisheye affine matrix coefficient D (output)
@param e: pointer to the fisheye affine matrix coefficient E (output)
@param f: pointer to the fisheye affine matrix coefficient F (output)
@return 0 on success, negative errno value in case of error
Write a fisheye affine matrix coefficients string.
The str string must have been previously allocated.
The function writes up to len chars.
@param str: pointer to the string to write to (output)
@param len: maximum length of the string
@param c: fisheye affine matrix coefficient C
@param d: fisheye affine matrix coefficient D
@param e: fisheye affine matrix coefficient E
@param f: fisheye affine matrix coefficient F
@return the length of the string written on success,
negative errno value in case of error
Read a fisheye polynomial coefficients string.
The fisheye polynomial coefficients are returned through the 3 float
pointer parameters.
@param str: pointer to the string to read
@param p2: pointer to the fisheye polynomial coefficient p2 (output)
@param p3: pointer to the fisheye polynomial coefficient p3 (output)
@param p4: pointer to the fisheye polynomial coefficient p4 (output)
@return 0 on success, negative errno value in case of error
Write a fisheye polynomial coefficients string.
The str string must have been previously allocated.
The function writes up to len chars.
@param str: pointer to the string to write to (output)
@param len: maximum length of the string
@param p2: fisheye polynomial coefficient p2
@param p3: fisheye polynomial coefficient p3
@param p4: fisheye polynomial coefficient p4
@return the length of the string written on success,
negative errno value in case of error
Read a field of view string.
The field of view is returned in the fov structure parameter.
@param str: pointer to the string to read
@param fov: pointer to the field of view structure (output)
@return 0 on success, negative errno value in case of error
Write a field of view string.
The str string must have been previously allocated.
The function writes up to len chars.
@param str: pointer to the string to write to (output)
@param len: maximum length of the string
@param fov: pointer to a field of view structure
@return the length of the string written on success,
negative errno value in case of error
Read a location string.
The location is returned in the loc structure parameter. The supported
formats are those in enum vmeta_session_location_format.
@param str: pointer to the string to read
@param loc: pointer to the location structure (output)
@return 0 on success, negative errno value in case of error
Write a location string.
The str string must have been previously allocated.
The function writes up to len chars.
The supported formats are those in enum vmeta_session_location_format.
@param str: pointer to the string to write to (output)
@param len: maximum length of the string
@param format: location format
@param loc: pointer to a location structure
@return the length of the string written on success,
negative errno value in case of error
Read a perspective distortion parameters string.
The perspective distortion parameters are returned through the 5 float
pointer parameters.
@param str: pointer to the string to read
@param r1: pointer to the radial distortion parameter R1 (output)
@param r2: pointer to the radial distortion parameter R2 (output)
@param r3: pointer to the radial distortion parameter R3 (output)
@param t1: pointer to the tangential distortion parameter T1 (output)
@param t2: pointer to the tangential distortion parameter T2 (output)
@return 0 on success, negative errno value in case of error
Write a perspective distortion parameters string.
The str string must have been previously allocated.
The function writes up to len chars.
@param str: pointer to the string to write to (output)
@param len: maximum length of the string
@param r1: radial distortion parameter R1
@param r2: radial distortion parameter R2
@param r3: radial distortion parameter R3
@param t1: tangential distortion parameter T1
@param t2: tangential distortion parameter T2
@return the length of the string written on success,
negative errno value in case of error
Read session metadata from MP4 file ‘meta’ or ‘udta’ items.
The function should be called for each key/value pair. Both key and value
must be null-terminated. The meta structure is filled with values
corresponding to the input key/value pairs when recognized.
@param key: pointer to a null-terminated key string
@param value: pointer to a null-terminated value string
@param meta: pointer to the session metadata structure to fill (output)
@return 0 on success, negative errno value in case of error
Write session metadata as MP4 file ‘meta’ or ‘udta’ items.
The function is called for a whole session metadata structure and calls the
cb callback function for each ‘meta’ or ‘udta’ item that should be written.
For each call to the cb function, the item type, key and value are given.
Both key and value are null-terminated.
@param meta: pointer to the session metadata structure
@param cb: ‘meta’ or ‘udta’ item writing callback function
@param userdata: ‘meta’ or ‘udta’ item writing callback function user data
@return 0 on success, negative errno value in case of error
Read session metadata from RTCP SDES items.
The function should be called for each RTCP SDES item with its type and
value, along with the prefix (only for PRIV SDES items). Both value and
prefix must be null-terminated. The meta structure is filled with values
corresponding to the input SDES items when recognized.
@param type: SDES item type
@param value: pointer to a null-terminated SDES item value string
@param prefix: pointer to a null-terminated SDES PRIV item prefix string
(NULL if the item is not PRIV)
@param meta: pointer to the session metadata structure to fill (output)
@return 0 on success, negative errno value in case of error
Write session metadata as RTCP SDES items.
The function is called for a whole session metadata structure and calls the
cb callback function for each RTCP SDES item that should be written.
For each call to the cb function, the RTCP SDES item type and value are
given, along with the prefix (only for PRIV SDES items). Both value and
prefix are null-terminated.
@param meta: pointer to the session metadata structure
@param cb: SDES item writing callback function
@param userdata: SDES item writing callback function user data pointer
@return 0 on success, negative errno value in case of error
Read session metadata from SDP items.
The function should be called for each SDP ‘s=’, ‘i=’, ‘a=tool:’ and
‘a=X-:’ item with its type and value, along with the key (only for
‘a=X-:’ attribute extensions). Other SDP items do not apply to enum
vmeta_stream_sdp_type and must not be passed to this function.
Both value and key must be null-terminated. The value is the string without
the leading ‘s=’, ‘i=’, ‘a=tool:’ or ‘a=X-:’. The key is the ‘X-’ string
(only for ‘a=X-*:’ attribute extensions).
SDP items can be either session-level or media-level items (determined by
the type parameter).
The meta structure is filled with values corresponding to the input SDP
items when recognized.
@param type: SDP item type
@param value: pointer to a null-terminated SDP item value string
@param prefix: pointer to a null-terminated SDP attribute extension key
string (NULL if the item is not an attribute extension)
@param meta: pointer to the session metadata structure to fill (output)
@return 0 on success, negative errno value in case of error
Write session metadata as SDP items.
The function is called for a whole session metadata structure and calls the
cb callback function for each SDP item that should be written.
For each call to the cb function, the SDP item type and value are
given, along with the key (only for ‘a=X-*:’ attribute extensions).
Both value and key are null-terminated. If media_level is 0, session-level
SDP items are written, otherwise media-level items are written.
@param meta: pointer to the session metadata structure
@param media_level: session-level items if 0, media-level otherwise
@param cb: SDP item writing callback function
@param userdata: SDP item writing callback function user data pointer
@return 0 on success, negative errno value in case of error
Read a thermal camera alignment parameters string.
The alignment parameters are returned in the align structure parameter.
@param str: pointer to the string to read
@param loc: pointer to the thermal camera alignment parameters
structure (output)
@return 0 on success, negative errno value in case of error
Write a thermal camera alignment parameters string.
The str string must have been previously allocated.
The function writes up to len chars.
@param str: pointer to the string to write to (output)
@param len: maximum length of the string
@param align: pointer to a thermal camera alignment parameters structure
@return the length of the string written on success,
negative errno value in case of error
Read a thermal camera temperature conversion parameters string.
The conversion parameters are returned in the conv structure parameter.
@param str: pointer to the string to read
@param conv: pointer to the thermal camera temperature conversion parameters
structure (output)
@return 0 on success, negative errno value in case of error
Write a thermal camera temperature conversion parameters string.
The str string must have been previously allocated.
The function writes up to len chars.
@param str: pointer to the string to write to (output)
@param len: maximum length of the string
@param conv: pointer to a thermal camera temperature conversion parameters
structure
@return the length of the string written on success,
negative errno value in case of error
Read a thermal camera scale factor string.
The scale factor is returned in the value parameter.
@param str: pointer to the string to read
@param value: pointer to the thermal camera scale factor (output)
@return 0 on success, negative errno value in case of error
Write a thermal camera scale factor string.
The str string must have been previously allocated.
The function writes up to len chars.
@param str: pointer to the string to write to (output)
@param len: maximum length of the string
@param value: thermal camera scale factor
@return the length of the string written on success,
negative errno value in case of error
Write session metadata to a JSON object.
The jobj JSON object must have been previously allocated.
@param meta: pointer to a session metadata structure
@param jobj: pointer to the JSON object to write to (output)
@return 0 on success, negative errno value in case of error
Write session metadata as a string.
The str string must have been previously allocated. The function writes
up to maxlen characters.
@param meta: pointer to a session metadata structure
@param str: pointer to the string to write to (output)
@param maxlen: maximum length of the string
@return 0 on success, negative errno value in case of error
ToString function for enum vmeta_thermal_calibration_state.
@param val: thermal calibration state value to convert
@return a string description of the thermal calibration state
Get an enum vmeta_tone_mapping value from a string
Valid strings are only the suffix of the tone mapping (eg. ‘plog’).
The case is ignored.
@param str: tone mapping string to convert
@return the enum vmeta_tone_mapping value or
VMETA_TONE_MAPPING_UNKNOWN if unknown
Get an enum vmeta_video_mode value from a string.
Valid strings are only the suffix of the video mode (eg. ‘STANDARD’).
The case is ignored.
@param str: video mode string to convert
@return the enum vmeta_video_mode value or
VMETA_VIDEO_MODE_UNKNOWN if unknown
Get an enum vmeta_video_stop_reason value from a string
Valid strings are only the suffix of the stop reason (eg. ‘USER’).
The case is ignored.
@param str: stop reason string to convert
@return the enum vmeta_video_stop_reason value or
VMETA_VIDEO_STOP_REASON_UNKNOWN if unknown
Pool behavior when a memory chunk is requested while the pool is empty.
For all policies, if the number of buffers is already equal to the maximum,
the pool will return -EAGAIN (and issue a warning log).
Context raw data reception callback prototype.
@param ctx : context.
@param conn : connection on which the event occurred.
@param buf : received data.
@param userdata : user data given in pomp_ctx_new.
Context event callback prototype.
@param ctx : context.
@param event : event that occurred.
@param conn : connection on which the event occurred.
@param msg : received message when event is POMP_EVENT_MSG.
@param userdata : user data given in pomp_ctx_new.
pomp_evt event callback.
@note The event will be cleared automatically before calling this.
@param evt : triggered event.
@param userdata : callback user data.
Send callback. If set, it is called to indicate that the given buffer has
been sent (or not).
@param ctx : context.
@param conn : connection on which the event occurred.
@param buf : buffer whose send status id notified. If in raw mode is it the
one given in send operation, otherwise it is the internal buffer associated
with the message sent.
@param status : set of flags (enum pomp_send_status) indicating the status.
one of OK, ERROR or ABORTED is always set. QUEUE_EMPTY indicates that there
is no more buffer queued internally.
@param cookie : NULL, reserved for future use.
@param userdata : user data given in pomp_ctx_new.
Context socket callback. If set, will be called after socket is created.
@param ctx : context.
@param fd : socket fd.
@param kind : socket kind.
@param userdata : user data given in pomp_ctx_new.
‘meta’ or ‘udta’ item writing callback function.
See the vmeta_session_recording_write() function.
@param type: item type
@param key: item key
@param value: item value
@param userdata: user data pointer
RTCP SDES item writing callback function.
See the vmeta_session_streaming_sdes_write() function.
@param type: item type
@param value: item value
@param key: item key (only for PRIV SDES items, NULL otherwise)
@param userdata: user data pointer
SDP item writing callback function.
See the vmeta_session_streaming_sdp_write() function.
@param type: item type
@param value: item value
@param key: item key (only for ‘a=X-*:’ attribute extensions)
@param userdata: user data pointer