Media Over QUIC (MoQ) stack (headers) More...
#include <stddef.h>#include <stdint.h>#include <glib.h>#include "../imquic/imquic.h"#include "../imquic/moq.h"#include "utils.h"#include "buffer.h"#include "qlog.h"#include "refcount.h"

Go to the source code of this file.
Data Structures | |
| struct | imquic_moq_setup_options |
| MoQ setup parameters. More... | |
| struct | imquic_moq_context |
| MoQ context. More... | |
| struct | imquic_moq_stream |
| MoQ stream. More... | |
| struct | imquic_moq_subscription |
| MoQ subscription, whether this is a publisher or a subscriber. More... | |
| struct | imquic_moq_callbacks |
| MoQ public callbacks. More... | |
Macros | |
| #define | IMQUIC_MOQ 7171953 |
Typedefs | |
| typedef enum imquic_moq_message_type | imquic_moq_message_type |
| MoQ messages. | |
| typedef enum imquic_moq_datagram_message_type | imquic_moq_datagram_message_type |
| MoQ datagram messages. | |
| typedef enum imquic_moq_data_message_type | imquic_moq_data_message_type |
MoQ STREAM data messages. | |
| typedef enum imquic_moq_fetch_subgroup_type | imquic_moq_fetch_subgroup_type |
MoQ FETCH subgroup flags. | |
| typedef enum imquic_moq_setup_option_type | imquic_moq_setup_option_type |
| MoQ setup option type. | |
| typedef enum imquic_moq_request_parameter_type | imquic_moq_request_parameter_type |
| MoQ request parameter types. | |
| typedef struct imquic_moq_setup_options | imquic_moq_setup_options |
| MoQ setup parameters. | |
| typedef enum imquic_moq_fetch_type | imquic_moq_fetch_type |
| MoQ FETCH types. | |
| typedef struct imquic_moq_context | imquic_moq_context |
| MoQ context. | |
| typedef enum imquic_media_stream_request_state | imquic_media_stream_request_state |
| MoQ stream request state. | |
| typedef struct imquic_moq_stream | imquic_moq_stream |
| MoQ stream. | |
| typedef struct imquic_moq_subscription | imquic_moq_subscription |
| MoQ subscription, whether this is a publisher or a subscriber. | |
| typedef struct imquic_moq_callbacks | imquic_moq_callbacks |
| MoQ public callbacks. | |
Functions | |
| void | imquic_moq_init (void) |
| Initialize the native MoQ stack at startup. | |
| void | imquic_moq_deinit (void) |
| Uninitialize the native MoQ stack. | |
| const char * | imquic_moq_message_type_str (imquic_moq_message_type type, imquic_moq_version version) |
| Helper function to serialize to string the name of a imquic_moq_message_type value. | |
| gboolean | imquic_moq_is_datagram_message_type_valid (imquic_moq_version version, uint8_t type) |
Helper function to check if a type used for OBJECT_DATAGRAM or OBJECT_DATAGRAM_STATUS is valid. | |
| uint8_t | imquic_moq_datagram_message_type_return (imquic_moq_version version, gboolean payload, gboolean prop, gboolean eog, gboolean oid, gboolean priority) |
Helper function to return the imquic_moq_datagram_message_type value for OBJECT_DATAGRAM or OBJECT_DATAGRAM_STATUS out of the individual properties. | |
| void | imquic_moq_datagram_message_type_parse (imquic_moq_version version, uint8_t type, gboolean *payload, gboolean *prop, gboolean *eog, gboolean *oid, gboolean *priority, gboolean *violation) |
Helper function to parse a imquic_moq_datagram_message_type value for OBJECT_DATAGRAM or OBJECT_DATAGRAM_STATUS to the individual properties. | |
| const char * | imquic_moq_datagram_message_type_str (imquic_moq_datagram_message_type type, imquic_moq_version version) |
| Helper function to serialize to string the name of a imquic_moq_datagram_message_type value. | |
| gboolean | imquic_moq_is_data_message_type_valid (imquic_moq_version version, imquic_moq_data_message_type type) |
Helper function to check if a type used for SUBRGOUP_HEADER is valid. | |
| uint8_t | imquic_moq_data_message_type_from_subgroup_header (imquic_moq_version version, gboolean subgroup, gboolean sgid0, gboolean prop, gboolean eog, gboolean priority, gboolean first_object) |
Helper function to return the type to use for SUBRGOUP_HEADER out of the individual properties. | |
| void | imquic_moq_data_message_type_to_subgroup_header (imquic_moq_version version, uint8_t type, gboolean *subgroup, gboolean *sgid0, gboolean *prop, gboolean *eog, gboolean *priority, gboolean *first_object, gboolean *violation) |
Helper function to parse a type value for SUBRGOUP_HEADER to the individual properties. | |
| const char * | imquic_moq_data_message_type_str (imquic_moq_data_message_type type, imquic_moq_version version) |
| Helper function to serialize to string the name of a imquic_moq_data_message_type value. | |
| imquic_moq_delivery | imquic_moq_data_message_type_to_delivery (imquic_moq_data_message_type type, imquic_moq_version version) |
| Helper function to return the imquic_moq_delivery mode associated to a imquic_moq_data_message_type type. | |
| gboolean | imquic_moq_is_fetch_serialization_flags_valid (imquic_moq_version version, uint64_t flags) |
Helper function to check if serialization flags used for FETCH are valid. | |
| uint64_t | imquic_moq_generate_fetch_serialization_flags (imquic_moq_version version, imquic_moq_fetch_subgroup_type subgroup, gboolean oid, gboolean group, gboolean priority, gboolean prop, gboolean datagram, gboolean end_ne_range, gboolean end_uk_range) |
Helper function to return the serialization flags to use for FETCH out of the individual properties. | |
| void | imquic_moq_parse_fetch_serialization_flags (imquic_moq_version version, uint64_t flags, imquic_moq_fetch_subgroup_type *subgroup, gboolean *oid, gboolean *group, gboolean *priority, gboolean *prop, gboolean *datagram, gboolean *end_ne_range, gboolean *end_uk_range, gboolean *violation) |
Helper function to parse serialozation flags for FETCH to the individual properties. | |
| const char * | imquic_moq_setup_option_type_str (imquic_moq_setup_option_type type) |
| Helper function to serialize to string the name of a imquic_moq_setup_option_type value. | |
| const char * | imquic_moq_request_parameter_type_str (imquic_moq_request_parameter_type type, imquic_moq_version version) |
| Helper function to serialize to string the name of a imquic_moq_request_parameter_type value. | |
| GList * | imquic_moq_parse_properties (imquic_moq_version version, uint8_t *properties, size_t plen) |
| Helper mode to parse a properties buffer to a GList of imquic_moq_property. | |
| size_t | imquic_moq_build_properties (imquic_moq_version version, GList *properties, uint8_t *bytes, size_t blen) |
| Helper mode to craft a properties buffer out of a GList of imquic_moq_property. | |
| const char * | imquic_moq_fetch_type_str (imquic_moq_fetch_type type) |
| Helper function to serialize to string the name of a imquic_moq_fetch_type value. | |
| const char * | imquic_media_stream_request_state_str (imquic_media_stream_request_state state) |
| Helper function to serialize to string the name of a imquic_media_stream_request_state value. | |
| imquic_moq_stream * | imquic_moq_stream_create (void) |
| Create a new MoQ stream. | |
| void | imquic_moq_stream_destroy (imquic_moq_stream *moq_stream) |
| Destroy an existing MoQ stream. | |
| imquic_moq_subscription * | imquic_moq_subscription_create (uint64_t request_id, uint64_t track_alias) |
| Helper to create a new subscription instance. | |
| void | imquic_moq_subscription_destroy (imquic_moq_subscription *moq_sub) |
| Destroy an existing MoQ subscription. | |
Parsing MoQ messages | |
| int | imquic_moq_parse_message (imquic_moq_context *moq, uint64_t stream_id, uint8_t *bytes, size_t blen, gboolean complete, gboolean datagram) |
| Parse an incoming MoQ message. | |
| size_t | imquic_moq_parse_client_setup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a CLIENT_SETUP message. | |
| size_t | imquic_moq_parse_server_setup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SERVER_SETUP message. | |
| size_t | imquic_moq_parse_setup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SETUP message. | |
| size_t | imquic_moq_parse_max_request_id (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a MAX_REQUEST_ID message. | |
| size_t | imquic_moq_parse_requests_blocked (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a REQUESTS_BLOCKED message. | |
| size_t | imquic_moq_parse_request_ok (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a REQUEST_OK message. | |
| size_t | imquic_moq_parse_request_error (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a REQUEST_ERROR message. | |
| size_t | imquic_moq_parse_publish_namespace (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_NAMESPACE message. | |
| size_t | imquic_moq_parse_publish_namespace_done (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_NAMESPACE_DONE message. | |
| size_t | imquic_moq_parse_publish_namespace_cancel (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_NAMESPACE_CANCEL message. | |
| size_t | imquic_moq_parse_publish (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH message. | |
| size_t | imquic_moq_parse_publish_ok (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_OK message. | |
| size_t | imquic_moq_parse_subscribe (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE message. | |
| size_t | imquic_moq_parse_request_update (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a REQUEST_UPDATE message. | |
| size_t | imquic_moq_parse_subscribe_ok (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_OK message. | |
| size_t | imquic_moq_parse_unsubscribe (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse an UNSUBSCRIBE message. | |
| size_t | imquic_moq_parse_publish_done (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_DONE message. | |
| size_t | imquic_moq_parse_subscribe_namespace (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_NAMESPACE message. | |
| size_t | imquic_moq_parse_subscribe_tracks (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_TRACKS message. | |
| size_t | imquic_moq_parse_namespace (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a NAMESPACE message. | |
| size_t | imquic_moq_parse_namespace_done (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a NAMESPACE_DONE message. | |
| size_t | imquic_moq_parse_publish_blocked (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_BLOCKED message. | |
| size_t | imquic_moq_parse_fetch (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a FETCH message. | |
| size_t | imquic_moq_parse_fetch_cancel (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a FETCH_CANCEL message. | |
| size_t | imquic_moq_parse_fetch_ok (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a FETCH_OK message. | |
| size_t | imquic_moq_parse_track_status (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a TRACK_STATUS message. | |
| size_t | imquic_moq_parse_object_datagram (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_datagram_message_type dtype, uint8_t *error) |
Helper to parse an OBJECT_DATAGRAM message. | |
| size_t | imquic_moq_parse_object_datagram_status (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_datagram_message_type dtype, uint8_t *error) |
Helper to parse an OBJECT_DATAGRAM_STATUS message. | |
| size_t | imquic_moq_parse_subgroup_header (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, imquic_moq_data_message_type dtype, uint8_t *error) |
Helper to parse a SUBGROUP_HEADER message. | |
| int | imquic_moq_parse_subgroup_header_object (imquic_moq_context *moq, imquic_moq_stream *moq_stream, gboolean complete, uint8_t *error) |
Helper to parse a SUBGROUP_HEADER object. | |
| size_t | imquic_moq_parse_fetch_header (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a FETCH_HEADER message. | |
| int | imquic_moq_parse_fetch_header_object (imquic_moq_context *moq, imquic_moq_stream *moq_stream, gboolean complete, uint8_t *error) |
Helper to parse a FETCH_HEADER object. | |
| size_t | imquic_moq_parse_padding_datagram (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PADDING_DATAGRAM message. | |
| int | imquic_moq_parse_padding_stream (imquic_moq_context *moq, imquic_moq_stream *moq_stream, gboolean complete, uint8_t *error) |
Helper to parse a PADDING_STREAM message. | |
| size_t | imquic_moq_parse_goaway (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a GOAWAY message. | |
Building MoQ messages | |
| size_t | imquic_moq_add_client_setup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_setup_options *options) |
Helper method to add a CLIENT_SETUP message to a buffer. | |
| size_t | imquic_moq_add_server_setup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_setup_options *options) |
Helper method to add a SERVER_SETUP message to a buffer. | |
| size_t | imquic_moq_add_setup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_setup_options *options) |
Helper method to add a SETUP message to a buffer. | |
| size_t | imquic_moq_add_max_request_id (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t max_request_id) |
Helper method to add a MAX_REQUEST_ID message to a buffer. | |
| size_t | imquic_moq_add_requests_blocked (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t max_request_id) |
Helper method to add a REQUESTS_BLOCKED message to a buffer. | |
| size_t | imquic_moq_add_request_ok (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_request_parameters *parameters, GList *track_properties) |
Helper method to add a REQUEST_OK message to a buffer. | |
| size_t | imquic_moq_add_request_error (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t error, const char *reason, uint64_t retry_interval, imquic_moq_redirect *redirect) |
Helper method to add a REQUEST_ERROR message to a buffer. | |
| size_t | imquic_moq_add_publish_namespace (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_request_parameters *parameters) |
Helper method to add a PUBLISH_NAMESPACE message to a buffer. | |
| size_t | imquic_moq_add_publish_namespace_done (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id) |
Helper method to add a PUBLISH_NAMESPACE_DONE message to a buffer. | |
| size_t | imquic_moq_add_publish_namespace_cancel (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_request_error_code error, const char *reason) |
Helper method to add a PUBLISH_NAMESPACE_CANCEL message to a buffer. | |
| size_t | imquic_moq_add_publish (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_track *track_name, uint64_t track_alias, imquic_moq_request_parameters *parameters, GList *track_properties) |
Helper to add a PUBLISH message to a buffer. | |
| size_t | imquic_moq_add_publish_ok (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_request_parameters *parameters) |
Helper method to add a PUBLISH_OK message to a buffer. | |
| size_t | imquic_moq_add_subscribe (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_track *track_name, imquic_moq_request_parameters *parameters) |
Helper to add a SUBSCRIBE message to a buffer. | |
| size_t | imquic_moq_add_request_update (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t sub_request_id, imquic_moq_request_parameters *parameters) |
Helper method to add a REQUEST_UPDATE message to a buffer. | |
| size_t | imquic_moq_add_subscribe_ok (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t track_alias, imquic_moq_request_parameters *parameters, GList *track_properties) |
Helper method to add a SUBSCRIBE_OK message to a buffer. | |
| size_t | imquic_moq_add_unsubscribe (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id) |
Helper method to add an UNSUBSCRIBE message to a buffer. | |
| size_t | imquic_moq_add_publish_done (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_pub_done_code status, uint64_t streams_count, const char *reason) |
Helper method to add a PUBLISH_DONE message to a buffer. | |
| size_t | imquic_moq_add_subscribe_namespace (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_subscribe_namespace_options subscribe_options, imquic_moq_request_parameters *parameters) |
Helper to add a SUBSCRIBE_NAMESPACE message to a buffer. | |
| size_t | imquic_moq_add_subscribe_tracks (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_request_parameters *parameters) |
Helper to add a SUBSCRIBE_TRACKS message to a buffer. | |
| size_t | imquic_moq_add_namespace (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace_suffix) |
Helper method to add a NAMESPACE_DONE message to a buffer. | |
| size_t | imquic_moq_add_namespace_done (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace_suffix) |
Helper method to add a NAMESPACE_DONE message to a buffer. | |
| size_t | imquic_moq_add_publish_blocked (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace_suffix, imquic_moq_track *track) |
Helper method to add a PUBLISH_BLOCKED message to a buffer. | |
| size_t | imquic_moq_add_fetch (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, imquic_moq_fetch_type type, uint64_t request_id, uint64_t joining_request_id, uint64_t preceding_group_offset, imquic_moq_namespace *track_namespace, imquic_moq_track *track_name, imquic_moq_location_range *range, imquic_moq_request_parameters *parameters) |
Helper to add a FETCH message to a buffer. | |
| size_t | imquic_moq_add_fetch_cancel (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id) |
Helper method to add an FETCH_CANCEL message to a buffer. | |
| size_t | imquic_moq_add_fetch_ok (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, uint8_t end_of_track, imquic_moq_location *end_location, imquic_moq_request_parameters *parameters, GList *track_properties) |
Helper method to add a FETCH_OK message to a buffer. | |
| size_t | imquic_moq_add_track_status (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_track *track_name, imquic_moq_request_parameters *parameters) |
Helper to add a TRACK_STATUS message to a buffer. | |
| size_t | imquic_moq_add_goaway (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, const char *new_session_uri, uint64_t timeout) |
Helper method to add a GOAWAY message to a buffer. | |
| size_t | imquic_moq_add_object_datagram (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t track_alias, uint64_t group_id, uint64_t object_id, uint64_t object_status, uint8_t priority, uint8_t *payload, size_t plen, uint8_t *properties, size_t prlen) |
Helper to add an OBJECT_DATAGRAM message to a buffer. | |
| size_t | imquic_moq_add_object_datagram_status (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t track_alias, uint64_t group_id, uint64_t object_id, uint8_t priority, uint64_t object_status, uint8_t *properties, size_t prlen) |
Helper to add an OBJECT_DATAGRAM_STATUS message to a buffer. | |
| size_t | imquic_moq_add_subgroup_header (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t track_alias, uint64_t group_id, uint64_t subgroup_id, uint8_t priority) |
Helper to add a SUBGROUP_HEADER message to a buffer. | |
| size_t | imquic_moq_add_subgroup_header_object (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t object_id, uint64_t object_status, uint8_t *payload, size_t plen, uint8_t *properties, size_t prlen) |
Helper to add an object to a buffer, formatted as expected for SUBGROUP_HEADER objects (so not all IDs) | |
| size_t | imquic_moq_add_fetch_header (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id) |
Helper to add a FETCH_HEADER message to a buffer. | |
| size_t | imquic_moq_add_fetch_header_object (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t flags, uint64_t group_id, uint64_t subgroup_id, uint64_t object_id, uint8_t priority, uint64_t object_status, uint8_t *payload, size_t plen, uint8_t *properties, size_t prlen) |
Helper to add an object to a buffer, formatted as expected for FETCH_HEADER objects (so not all IDs) | |
| size_t | imquic_moq_add_padding (imquic_moq_context *moq, uint8_t *bytes, size_t blen, size_t padding, gboolean datagram) |
Helper to add padding data to a buffer, formatted as expected for PADDING_STREAM or PADDING_DATAGRAM. | |
| size_t | imquic_moq_add_properties (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *properties, size_t prlen, gboolean prefix) |
| Helper method to add properties to a buffer. | |
Parsing and building MoQ setup options (TLV) | |
| size_t | imquic_moq_setup_option_add_int (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t opt, uint64_t prev, uint64_t number) |
| Helper to add a MoQ setup option with a numeric value to a buffer. | |
| size_t | imquic_moq_setup_option_add_data (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t opt, uint64_t prev, uint8_t *buf, size_t buflen) |
| Helper to add a MoQ setup option with generic data to a buffer. | |
| size_t | imquic_moq_parse_setup_option (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_setup_options *params, uint64_t *param_type, uint8_t *error) |
| Helper method to parse a MoQ setup parameter. | |
| size_t | imquic_moq_setup_options_serialize (imquic_moq_context *moq, imquic_moq_setup_options *options, uint8_t *bytes, size_t blen, uint8_t *params_num) |
| Helper to serialize a imquic_moq_setup_options set to a buffer. | |
Parsing and building MoQ parameters (TLV or not, depending on version) | |
| size_t | imquic_moq_parameter_add_varint (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t param, uint64_t prev, uint64_t number) |
| Helper to add a MoQ parameter with a numeric value to a buffer as a varint. | |
| size_t | imquic_moq_parameter_add_uint8 (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t param, uint64_t prev, uint8_t number) |
| Helper to add a MoQ parameter with a numeric value to a buffer as a byte. | |
| size_t | imquic_moq_parameter_add_location (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t param, uint64_t prev, imquic_moq_location *location) |
| Helper to add a MoQ parameter with a location to a buffer. | |
| size_t | imquic_moq_parameter_add_data (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t param, uint64_t prev, uint8_t *buf, size_t buflen) |
| Helper to add a MoQ parameter with generic data to a buffer. | |
| size_t | imquic_moq_parse_request_parameter (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_request_parameters *params, uint64_t *param_type, uint8_t *error) |
| Helper method to parse a MoQ subscribe parameter. | |
| size_t | imquic_moq_request_parameters_serialize (imquic_moq_context *moq, imquic_moq_message_type request, imquic_moq_request_parameters *parameters, uint8_t *bytes, size_t blen, uint8_t *params_num) |
| Helper to serialize a imquic_moq_request_parameters set to a buffer. | |
Internal callbacks for MoQ endpoints | |
| void | imquic_moq_new_connection (imquic_connection *conn, void *user_data) |
| Callback the core invokes when a new QUIC connection using MoQ is available. | |
| void | imquic_moq_stream_incoming (imquic_connection *conn, uint64_t stream_id, uint8_t *bytes, uint64_t length, gboolean complete) |
Callback the core invokes when there's new incoming data on a STREAM. | |
| void | imquic_moq_datagram_incoming (imquic_connection *conn, uint8_t *bytes, uint64_t length) |
Callback the core invokes when there's new incoming data on a DATAGRAM. | |
| void | imquic_moq_reset_stream_incoming (imquic_connection *conn, uint64_t stream_id, uint64_t error_code) |
Callback the core invokes when there's an incoming RESET_STREAM. | |
| void | imquic_moq_stop_sending_incoming (imquic_connection *conn, uint64_t stream_id, uint64_t error_code) |
Callback the core invokes when there's an incoming STOP_SENDING. | |
| void | imquic_moq_connection_gone (imquic_connection *conn, uint64_t error_code, const char *reason) |
| Callback the core invokes when an existing MoQ connection is not available anymore. | |
QLOG events tracing for MoQT | |
| json_t * | imquic_qlog_moq_message_prepare (const char *type) |
| Helper to create a new QLOG MoQT message. | |
| void | imquic_qlog_moq_message_add_namespace (json_t *message, imquic_moq_namespace *track_namespace, const char *name) |
| Helper to add a stringified namespace tuple array to a message. | |
| void | imquic_qlog_moq_message_add_track (json_t *message, imquic_moq_track *track_name) |
| Helper to add a stringified track name to a message. | |
| void | imquic_qlog_moq_message_add_setup_options (json_t *message, imquic_moq_setup_options *options, const char *name) |
| Helper to add a stringified array of setup parameters to a message. | |
| void | imquic_qlog_moq_message_add_request_parameters (json_t *message, imquic_moq_version version, imquic_moq_request_parameters *parameters, const char *name) |
| Helper to add a stringified array of subscribe parameters to a message. | |
| void | imquic_qlog_moq_message_add_properties (json_t *message, GList *properties, const char *name) |
| Helper to add a stringified array of propertie headers to a message. | |
| void | imquic_moq_qlog_control_message_created (imquic_qlog *qlog, uint64_t stream_id, uint8_t *bytes, size_t length, json_t *message) |
Add a control_message_created event. | |
| void | imquic_moq_qlog_control_message_parsed (imquic_qlog *qlog, uint64_t stream_id, uint8_t *bytes, size_t length, json_t *message) |
Add a control_message_parsed event. | |
| void | imquic_moq_qlog_stream_type_set (imquic_qlog *qlog, gboolean local, uint64_t stream_id, const char *type) |
Add a stream_type_set event. | |
| void | imquic_moq_qlog_object_datagram_created (imquic_qlog *qlog, imquic_moq_object *object) |
Add a object_datagram_created event. | |
| void | imquic_moq_qlog_object_datagram_parsed (imquic_qlog *qlog, imquic_moq_object *object) |
Add a object_datagram_parsed event. | |
| void | imquic_moq_qlog_object_datagram_status_created (imquic_qlog *qlog, imquic_moq_object *object) |
Add a object_datagram_status_created event. | |
| void | imquic_moq_qlog_object_datagram_status_parsed (imquic_qlog *qlog, imquic_moq_object *object) |
Add a object_datagram_status_parsed event. | |
| void | imquic_moq_qlog_subgroup_header_created (imquic_qlog *qlog, imquic_moq_stream *stream, uint8_t *bytes, size_t length) |
Add a subgroup_header_created event. | |
| void | imquic_moq_qlog_subgroup_header_parsed (imquic_qlog *qlog, imquic_moq_stream *stream, uint8_t *bytes, size_t length) |
Add a subgroup_header_parsed event. | |
| void | imquic_moq_qlog_subgroup_object_created (imquic_qlog *qlog, uint64_t stream_id, imquic_moq_object *object) |
Add a subgroup_object_created event. | |
| void | imquic_moq_qlog_subgroup_object_parsed (imquic_qlog *qlog, uint64_t stream_id, imquic_moq_object *object) |
Add a subgroup_object_parsed event. | |
| void | imquic_moq_qlog_fetch_header_created (imquic_qlog *qlog, imquic_moq_stream *stream, uint8_t *bytes, size_t length) |
Add a fetch_header_created event. | |
| void | imquic_moq_qlog_fetch_header_parsed (imquic_qlog *qlog, imquic_moq_stream *stream, uint8_t *bytes, size_t length) |
Add a fetch_header_parsed event. | |
| void | imquic_moq_qlog_fetch_object_created (imquic_qlog *qlog, uint64_t stream_id, imquic_moq_object *object) |
Add a fetch_object_created event. | |
| void | imquic_moq_qlog_fetch_object_parsed (imquic_qlog *qlog, uint64_t stream_id, imquic_moq_object *object) |
Add a fetch_object_parsed event. | |
Media Over QUIC (MoQ) stack (headers)
Implementation of the Media Over QUIC (MoQ) stack as part of the library itself. At the time of writing, this implements (most of) versions from -16 to to -17 of the protocol.
| #define IMQUIC_MOQ 7171953 |
MoQ stream request state.
| typedef struct imquic_moq_callbacks imquic_moq_callbacks |
MoQ public callbacks.
| typedef struct imquic_moq_context imquic_moq_context |
MoQ context.
| typedef enum imquic_moq_data_message_type imquic_moq_data_message_type |
MoQ STREAM data messages.
MoQ datagram messages.
MoQ FETCH subgroup flags.
| typedef enum imquic_moq_fetch_type imquic_moq_fetch_type |
MoQ FETCH types.
| typedef enum imquic_moq_message_type imquic_moq_message_type |
MoQ messages.
MoQ request parameter types.
| typedef enum imquic_moq_setup_option_type imquic_moq_setup_option_type |
MoQ setup option type.
| typedef struct imquic_moq_setup_options imquic_moq_setup_options |
MoQ setup parameters.
| typedef struct imquic_moq_stream imquic_moq_stream |
MoQ stream.
| typedef struct imquic_moq_subscription imquic_moq_subscription |
MoQ subscription, whether this is a publisher or a subscriber.
MoQ STREAM data messages.
MoQ messages.
MoQ request parameter types.
| const char * imquic_media_stream_request_state_str | ( | imquic_media_stream_request_state | state | ) |
Helper function to serialize to string the name of a imquic_media_stream_request_state value.
| state | The imquic_media_stream_request_state value |
| size_t imquic_moq_add_client_setup | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_setup_options * | options ) |
Helper method to add a CLIENT_SETUP message to a buffer.
SETUP | moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| options | The setup options to send |
| size_t imquic_moq_add_fetch | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_fetch_type | type, | ||
| uint64_t | request_id, | ||
| uint64_t | joining_request_id, | ||
| uint64_t | preceding_group_offset, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_track * | track_name, | ||
| imquic_moq_location_range * | range, | ||
| imquic_moq_request_parameters * | parameters ) |
Helper to add a FETCH message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| type | The FETCH type |
| request_id | The request ID to put in the message |
| joining_request_id | The joining request ID to put in the message, if any |
| preceding_group_offset | The preceding group offset for joining fetches, if any |
| track_namespace | The namespace to put in the message |
| track_name | The track name to put in the message |
| range | The Start/End Locations to put in the message |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_fetch_cancel | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id ) |
Helper method to add an FETCH_CANCEL message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| size_t imquic_moq_add_fetch_header | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id ) |
Helper to add a FETCH_HEADER message to a buffer.
STREAM and send the header: after that, imquic_moq_add_fetch_header_object is used to send all objects that belong to this track. | moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| size_t imquic_moq_add_fetch_header_object | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | flags, | ||
| uint64_t | group_id, | ||
| uint64_t | subgroup_id, | ||
| uint64_t | object_id, | ||
| uint8_t | priority, | ||
| uint64_t | object_status, | ||
| uint8_t * | payload, | ||
| size_t | plen, | ||
| uint8_t * | properties, | ||
| size_t | prlen ) |
Helper to add an object to a buffer, formatted as expected for FETCH_HEADER objects (so not all IDs)
| moq | The imquic_moq_context generating the object |
| bytes | The buffer to add the object to |
| blen | The size of the buffer |
| flags | The serialization flags |
| group_id | The group ID |
| subgroup_id | The subgroup ID |
| object_id | The object ID |
| priority | The publisher priority to put in the message |
| object_status | The object status (only added if the payload length is 0) |
| payload | The buffer containing the payload of the object |
| plen | The size of the payload buffer |
| properties | The buffer containing the properties, if any |
| prlen | The size of the properties buffer |
| size_t imquic_moq_add_fetch_ok | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint8_t | end_of_track, | ||
| imquic_moq_location * | end_location, | ||
| imquic_moq_request_parameters * | parameters, | ||
| GList * | track_properties ) |
Helper method to add a FETCH_OK message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| end_of_track | Whether all objects have been published |
| end_location | End location to add to the message, if needed |
| parameters | The parameters to add, if any |
| track_properties | List of track properties to add, if any |
| size_t imquic_moq_add_goaway | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| const char * | new_session_uri, | ||
| uint64_t | timeout ) |
Helper method to add a GOAWAY message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for, if not on the control stream |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| new_session_uri | New uri value to put in the message, if any |
| timeout | Timeout to put in the message (added in v17, ignored for older versions) |
| size_t imquic_moq_add_max_request_id | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | max_request_id ) |
Helper method to add a MAX_REQUEST_ID message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| max_request_id | Maximum request ID to put in the message |
| size_t imquic_moq_add_namespace | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_namespace * | track_namespace_suffix ) |
Helper method to add a NAMESPACE_DONE message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| track_namespace_suffix | Namespace suffix that is advertised |
| size_t imquic_moq_add_namespace_done | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_namespace * | track_namespace_suffix ) |
Helper method to add a NAMESPACE_DONE message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| track_namespace_suffix | Namespace suffix that is done |
| size_t imquic_moq_add_object_datagram | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| uint64_t | group_id, | ||
| uint64_t | object_id, | ||
| uint64_t | object_status, | ||
| uint8_t | priority, | ||
| uint8_t * | payload, | ||
| size_t | plen, | ||
| uint8_t * | properties, | ||
| size_t | prlen ) |
Helper to add an OBJECT_DATAGRAM message to a buffer.
DATAGRAM support | moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_alias | The track alias to put in the message |
| group_id | The group ID to put in the message |
| object_id | The object ID to put in the message |
| object_status | The object status (only added if the payload length is 0) |
| priority | The publisher priority to put in the message |
| payload | The buffer containing the payload of the object |
| plen | The size of the payload buffer |
| properties | The buffer containing the properties, if any |
| prlen | The size of the properties buffer |
| size_t imquic_moq_add_object_datagram_status | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | track_alias, | ||
| uint64_t | group_id, | ||
| uint64_t | object_id, | ||
| uint8_t | priority, | ||
| uint64_t | object_status, | ||
| uint8_t * | properties, | ||
| size_t | prlen ) |
Helper to add an OBJECT_DATAGRAM_STATUS message to a buffer.
DATAGRAM support | moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| track_alias | The track alias to put in the message |
| group_id | The group ID to put in the message |
| object_id | The object ID to put in the message |
| priority | The publisher priority to put in the message |
| object_status | The object status (only added if the payload length is 0) |
| properties | The buffer containing the properties, if any |
| prlen | The size of the properties buffer |
| size_t imquic_moq_add_padding | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| size_t | padding, | ||
| gboolean | datagram ) |
Helper to add padding data to a buffer, formatted as expected for PADDING_STREAM or PADDING_DATAGRAM.
| moq | The imquic_moq_context generating the object |
| bytes | The buffer to add the data to |
| blen | The size of the buffer |
| padding | How much padding data to send |
| datagram | Whether this is meant to be sent on a DATAGRAM or STREAM |
| size_t imquic_moq_add_properties | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | properties, | ||
| size_t | prlen, | ||
| gboolean | prefix ) |
Helper method to add properties to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the properties to |
| blen | The size of the buffer |
| properties | The buffer containing the properties, if any |
| prlen | The size of the properties buffer |
| prefix | If we need the length prefix (for object properties) or not (track properties) |
| size_t imquic_moq_add_publish | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_track * | track_name, | ||
| uint64_t | track_alias, | ||
| imquic_moq_request_parameters * | parameters, | ||
| GList * | track_properties ) |
Helper to add a PUBLISH message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_namespace | The namespace to put in the message |
| track_name | The track name to put in the message |
| track_alias | The track alias to put in the message |
| parameters | The parameters to add, if any |
| track_properties | List of track properties to add, if any |
| size_t imquic_moq_add_publish_blocked | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_namespace * | track_namespace_suffix, | ||
| imquic_moq_track * | track ) |
Helper method to add a PUBLISH_BLOCKED message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| track_namespace_suffix | Namespace suffix that is impacted |
| track | Track that is blocked |
| size_t imquic_moq_add_publish_done | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_pub_done_code | status, | ||
| uint64_t | streams_count, | ||
| const char * | reason ) |
Helper method to add a PUBLISH_DONE message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| status | The status of the subscrption |
| streams_count | The streams count |
| reason | Verbose description of the status |
| size_t imquic_moq_add_publish_namespace | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_request_parameters * | parameters ) |
Helper method to add a PUBLISH_NAMESPACE message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_namespace | Namespace to publish_namespace |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_publish_namespace_cancel | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_request_error_code | error, | ||
| const char * | reason ) |
Helper method to add a PUBLISH_NAMESPACE_CANCEL message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| error | Error code associated to the message |
| reason | Verbose description of the error, if any |
| size_t imquic_moq_add_publish_namespace_done | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id ) |
Helper method to add a PUBLISH_NAMESPACE_DONE message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| size_t imquic_moq_add_publish_ok | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_request_parameters * | parameters ) |
Helper method to add a PUBLISH_OK message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_request_error | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | error, | ||
| const char * | reason, | ||
| uint64_t | retry_interval, | ||
| imquic_moq_redirect * | redirect ) |
Helper method to add a REQUEST_ERROR message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| error | Error code associated to the message |
| reason | Verbose description of the error, if any |
| retry_interval | Retry interval in ms |
| redirect | Redirect structure, if any |
| size_t imquic_moq_add_request_ok | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_request_parameters * | parameters, | ||
| GList * | track_properties ) |
Helper method to add a REQUEST_OK message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| parameters | The parameters to add, if any |
| track_properties | List of track properties to add, if any |
| size_t imquic_moq_add_request_update | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | sub_request_id, | ||
| imquic_moq_request_parameters * | parameters ) |
Helper method to add a REQUEST_UPDATE message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| sub_request_id | The subscription request ID to put in the message (not added to message starting in v17) |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_requests_blocked | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | max_request_id ) |
Helper method to add a REQUESTS_BLOCKED message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| max_request_id | Maximum request ID to put in the message |
| size_t imquic_moq_add_server_setup | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_setup_options * | options ) |
Helper method to add a SERVER_SETUP message to a buffer.
SETUP | moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| options | The setup options to send |
| size_t imquic_moq_add_setup | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_setup_options * | options ) |
Helper method to add a SETUP message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| options | The setup options to send |
| size_t imquic_moq_add_subgroup_header | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| uint64_t | group_id, | ||
| uint64_t | subgroup_id, | ||
| uint8_t | priority ) |
Helper to add a SUBGROUP_HEADER message to a buffer.
STREAM and send the header: after that, imquic_moq_add_stream_header_subgroup_object is used to send all objects that belong to this subgroup. | moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_alias | The track alias to put in the message |
| group_id | The group ID to put in the message |
| subgroup_id | The subgroup ID to put in the message |
| priority | The publisher priority to put in the message |
| size_t imquic_moq_add_subgroup_header_object | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | object_id, | ||
| uint64_t | object_status, | ||
| uint8_t * | payload, | ||
| size_t | plen, | ||
| uint8_t * | properties, | ||
| size_t | prlen ) |
Helper to add an object to a buffer, formatted as expected for SUBGROUP_HEADER objects (so not all IDs)
| moq | The imquic_moq_context generating the object |
| moq_stream | The imquic_moq_context instance the object is for |
| bytes | The buffer to add the object to |
| blen | The size of the buffer |
| object_id | The object ID |
| object_status | The object status (only added if the payload length is 0) |
| payload | The buffer containing the payload of the object |
| plen | The size of the payload buffer |
| properties | The buffer containing the properties, if any |
| prlen | The size of the properties buffer |
| size_t imquic_moq_add_subscribe | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_track * | track_name, | ||
| imquic_moq_request_parameters * | parameters ) |
Helper to add a SUBSCRIBE message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_namespace | The namespace to put in the message |
| track_name | The track name to put in the message |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_subscribe_namespace | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_subscribe_namespace_options | subscribe_options, | ||
| imquic_moq_request_parameters * | parameters ) |
Helper to add a SUBSCRIBE_NAMESPACE message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_namespace | The namespace to put in the message |
| subscribe_options | The subscribe options to put in the message (deprecated in v18) |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_subscribe_ok | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| imquic_moq_request_parameters * | parameters, | ||
| GList * | track_properties ) |
Helper method to add a SUBSCRIBE_OK message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_alias | The track alias to put in the message |
| parameters | The parameters to add, if any |
| track_properties | List of track properties to add, if any |
| size_t imquic_moq_add_subscribe_tracks | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_request_parameters * | parameters ) |
Helper to add a SUBSCRIBE_TRACKS message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_namespace | The namespace to put in the message |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_track_status | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_track * | track_name, | ||
| imquic_moq_request_parameters * | parameters ) |
Helper to add a TRACK_STATUS message to a buffer.
| moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_stream instance the message is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_namespace | The namespace to put in the message |
| track_name | The track name to put in the message |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_unsubscribe | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id ) |
Helper method to add an UNSUBSCRIBE message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| size_t imquic_moq_build_properties | ( | imquic_moq_version | version, |
| GList * | properties, | ||
| uint8_t * | bytes, | ||
| size_t | blen ) |
Helper mode to craft a properties buffer out of a GList of imquic_moq_property.
| [in] | version | The version of the connection |
| [in] | properties | The list of properties to serialize |
| [out] | bytes | The buffer to write the properties data to |
| [in] | blen | The size of the buffer to write to |
| void imquic_moq_connection_gone | ( | imquic_connection * | conn, |
| uint64_t | error_code, | ||
| const char * | reason ) |
Callback the core invokes when an existing MoQ connection is not available anymore.
| conn | The imquic_connection instance that is now gone |
| error_code | The error code associated with the event |
| reason | The reason string associated with the event, if any |
| uint8_t imquic_moq_data_message_type_from_subgroup_header | ( | imquic_moq_version | version, |
| gboolean | subgroup, | ||
| gboolean | sgid0, | ||
| gboolean | prop, | ||
| gboolean | eog, | ||
| gboolean | priority, | ||
| gboolean | first_object ) |
Helper function to return the type to use for SUBRGOUP_HEADER out of the individual properties.
| [in] | version | The version of the connection |
| [in] | subgroup | Whether the Subgroup ID field is present |
| [in] | sgid0 | Whether the default value of Subgroup ID is 0, in case the field is missing |
| [in] | prop | Whether there are properties |
| [in] | eog | Whether there is an End of Group |
| [in] | priority | Whether there is a Publisher Priority |
| [in] | first_object | Whether the first object in the stream contains the first object in the subgroup |
| const char * imquic_moq_data_message_type_str | ( | imquic_moq_data_message_type | type, |
| imquic_moq_version | version ) |
Helper function to serialize to string the name of a imquic_moq_data_message_type value.
| type | The imquic_data_moq_message_type value |
| version | The version of the connection |
| imquic_moq_delivery imquic_moq_data_message_type_to_delivery | ( | imquic_moq_data_message_type | type, |
| imquic_moq_version | version ) |
Helper function to return the imquic_moq_delivery mode associated to a imquic_moq_data_message_type type.
| type | The imquic_data_moq_message_type value |
| version | The version of the connection |
| void imquic_moq_data_message_type_to_subgroup_header | ( | imquic_moq_version | version, |
| uint8_t | type, | ||
| gboolean * | subgroup, | ||
| gboolean * | sgid0, | ||
| gboolean * | prop, | ||
| gboolean * | eog, | ||
| gboolean * | priority, | ||
| gboolean * | first_object, | ||
| gboolean * | violation ) |
Helper function to parse a type value for SUBRGOUP_HEADER to the individual properties.
| [in] | version | The version of the connection |
| [in] | type | The type to parse |
| [out] | subgroup | Output variable to write whether the Subgroup ID field is present |
| [out] | sgid0 | Output variable to write whether the default value of Subgroup ID is 0, in case the field is missing |
| [out] | prop | Output variable to write whether there are properties |
| [out] | eog | Output variable to write whether there is an End of Group |
| [out] | priority | Output variable to write whether there is a Publisher Priority |
| [in] | first_object | Output variable to write whether the first object in the stream contains the first object in the subgroup |
| [out] | violation | Whether the type has bits set that really shouldn't |
| void imquic_moq_datagram_incoming | ( | imquic_connection * | conn, |
| uint8_t * | bytes, | ||
| uint64_t | length ) |
Callback the core invokes when there's new incoming data on a DATAGRAM.
| conn | The imquic_connection instance for which new DATAGRAM data is available |
| bytes | The new data that is available |
| length | Size of the new data |
| void imquic_moq_datagram_message_type_parse | ( | imquic_moq_version | version, |
| uint8_t | type, | ||
| gboolean * | payload, | ||
| gboolean * | prop, | ||
| gboolean * | eog, | ||
| gboolean * | oid, | ||
| gboolean * | priority, | ||
| gboolean * | violation ) |
Helper function to parse a imquic_moq_datagram_message_type value for OBJECT_DATAGRAM or OBJECT_DATAGRAM_STATUS to the individual properties.
| [in] | version | The version of the connection |
| [in] | type | The type to parse |
| [out] | payload | Output variable to write whether there is a payload |
| [out] | prop | Output variable to write whether there are properties |
| [out] | eog | Output variable to write whether there is an End of Group |
| [out] | oid | Output variable to write whether there is an Object ID |
| [out] | priority | Output variable to write whether there is a Publisher Priority |
| [out] | violation | Whether the type has bits set that really shouldn't |
| uint8_t imquic_moq_datagram_message_type_return | ( | imquic_moq_version | version, |
| gboolean | payload, | ||
| gboolean | prop, | ||
| gboolean | eog, | ||
| gboolean | oid, | ||
| gboolean | priority ) |
Helper function to return the imquic_moq_datagram_message_type value for OBJECT_DATAGRAM or OBJECT_DATAGRAM_STATUS out of the individual properties.
| version | The version of the connection |
| payload | Whether there is a payload |
| prop | Whether there are properties |
| eog | Whether there is an End of Group |
| oid | Whether there is an Object ID |
| priority | Whether there is a Publisher Priority |
| const char * imquic_moq_datagram_message_type_str | ( | imquic_moq_datagram_message_type | type, |
| imquic_moq_version | version ) |
Helper function to serialize to string the name of a imquic_moq_datagram_message_type value.
| type | The type value |
| version | The version of the connection |
| void imquic_moq_deinit | ( | void | ) |
Uninitialize the native MoQ stack.
| const char * imquic_moq_fetch_type_str | ( | imquic_moq_fetch_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_fetch_type value.
| type | The imquic_moq_fetch_type value |
| uint64_t imquic_moq_generate_fetch_serialization_flags | ( | imquic_moq_version | version, |
| imquic_moq_fetch_subgroup_type | subgroup, | ||
| gboolean | oid, | ||
| gboolean | group, | ||
| gboolean | priority, | ||
| gboolean | prop, | ||
| gboolean | datagram, | ||
| gboolean | end_ne_range, | ||
| gboolean | end_uk_range ) |
Helper function to return the serialization flags to use for FETCH out of the individual properties.
| [in] | version | The version of the connection |
| [in] | subgroup | The type of subgroup |
| [in] | oid | Whether the Object ID field is present |
| [in] | group | Whether the Group ID field is present |
| [in] | priority | Whether the Publisher field is present |
| [in] | prop | Whether there are properties |
| [in] | datagram | Whether the forwarding preference is Datagram |
| [in] | end_ne_range | Whether this is the end of a non-existent range (ignores all other properties) |
| [in] | end_uk_range | Whether this is the end of an unknown range (ignores all other properties) |
| void imquic_moq_init | ( | void | ) |
Initialize the native MoQ stack at startup.
| gboolean imquic_moq_is_data_message_type_valid | ( | imquic_moq_version | version, |
| imquic_moq_data_message_type | type ) |
Helper function to check if a type used for SUBRGOUP_HEADER is valid.
| [in] | version | The version of the connection |
| [in] | type | The type to parse |
| gboolean imquic_moq_is_datagram_message_type_valid | ( | imquic_moq_version | version, |
| uint8_t | type ) |
Helper function to check if a type used for OBJECT_DATAGRAM or OBJECT_DATAGRAM_STATUS is valid.
| [in] | version | The version of the connection |
| [in] | type | The type to parse |
| gboolean imquic_moq_is_fetch_serialization_flags_valid | ( | imquic_moq_version | version, |
| uint64_t | flags ) |
Helper function to check if serialization flags used for FETCH are valid.
| [in] | version | The version of the connection |
| [in] | flags | The flags to parse |
| const char * imquic_moq_message_type_str | ( | imquic_moq_message_type | type, |
| imquic_moq_version | version ) |
Helper function to serialize to string the name of a imquic_moq_message_type value.
| type | The imquic_moq_message_type value |
| version | The version of the connection |
| void imquic_moq_new_connection | ( | imquic_connection * | conn, |
| void * | user_data ) |
Callback the core invokes when a new QUIC connection using MoQ is available.
| conn | The imquic_connection instance that is now available |
| user_data | Optional user data the user/application may have associated to the endpoint this connection belongs to |
| size_t imquic_moq_parameter_add_data | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | param, | ||
| uint64_t | prev, | ||
| uint8_t * | buf, | ||
| size_t | buflen ) |
Helper to add a MoQ parameter with generic data to a buffer.
| moq | The imquic_moq_context instance the parameter is for |
| bytes | Buffer to add the parameter to |
| blen | Size of the buffer |
| param | ID of the parameter to add |
| prev | ID of the previously added parameter, if we're delta-encoding |
| buf | The data acting as a value for the parameter to add |
| buflen | The size of the data value |
| size_t imquic_moq_parameter_add_location | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | param, | ||
| uint64_t | prev, | ||
| imquic_moq_location * | location ) |
Helper to add a MoQ parameter with a location to a buffer.
| moq | The imquic_moq_context instance the parameter is for |
| bytes | Buffer to add the parameter to |
| blen | Size of the buffer |
| param | ID of the parameter to add |
| prev | ID of the previously added parameter, if we're delta-encoding |
| location | The location parameter to add |
| size_t imquic_moq_parameter_add_uint8 | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | param, | ||
| uint64_t | prev, | ||
| uint8_t | number ) |
Helper to add a MoQ parameter with a numeric value to a buffer as a byte.
| moq | The imquic_moq_context instance the parameter is for |
| bytes | Buffer to add the parameter to |
| blen | Size of the buffer |
| param | ID of the parameter to add |
| prev | ID of the previously added parameter, if we're delta-encoding |
| number | The numeric value of the parameter to add |
| size_t imquic_moq_parameter_add_varint | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | param, | ||
| uint64_t | prev, | ||
| uint64_t | number ) |
Helper to add a MoQ parameter with a numeric value to a buffer as a varint.
| moq | The imquic_moq_context instance the parameter is for |
| bytes | Buffer to add the parameter to |
| blen | Size of the buffer |
| param | ID of the parameter to add |
| prev | ID of the previously added parameter, if we're delta-encoding |
| number | The numeric value of the parameter to add |
| size_t imquic_moq_parse_client_setup | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a CLIENT_SETUP message.
SETUP | [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_fetch | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a FETCH message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_fetch_cancel | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a FETCH_CANCEL message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_fetch_header | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a FETCH_HEADER message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the object is from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| int imquic_moq_parse_fetch_header_object | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| gboolean | complete, | ||
| uint8_t * | error ) |
Helper to parse a FETCH_HEADER object.
| [in] | moq | The imquic_moq_context instance the object is for |
| [in] | moq_stream | The imquic_moq_stream instance the object is from |
| [in] | complete | Whether this data marks the completion of the QUIC stream it came from |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_fetch_ok | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a FETCH_OK message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| void imquic_moq_parse_fetch_serialization_flags | ( | imquic_moq_version | version, |
| uint64_t | flags, | ||
| imquic_moq_fetch_subgroup_type * | subgroup, | ||
| gboolean * | oid, | ||
| gboolean * | group, | ||
| gboolean * | priority, | ||
| gboolean * | prop, | ||
| gboolean * | datagram, | ||
| gboolean * | end_ne_range, | ||
| gboolean * | end_uk_range, | ||
| gboolean * | violation ) |
Helper function to parse serialozation flags for FETCH to the individual properties.
| [in] | version | The version of the connection |
| [in] | flags | The serialization flags to parse |
| [out] | subgroup | Output variable to write the type of subgroup |
| [out] | oid | Output variable to write whether the Object ID field is present |
| [out] | group | Output variable to write whether the Group ID field is present |
| [out] | priority | Output variable to write whether there is a Publisher Priority |
| [out] | prop | Output variable to write whether there are properties |
| [out] | datagram | Output variable to write whether the forwarding preference is Datagram |
| [out] | end_ne_range | Output variable to write whether this is the end of a non-existent range |
| [out] | end_uk_range | Output variable to write whether this is the end of an unknown range |
| [out] | violation | Whether the type has bits set that really shouldn't |
| size_t imquic_moq_parse_goaway | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a GOAWAY message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the request data is from, if not from the control stream |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_max_request_id | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a MAX_REQUEST_ID message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| int imquic_moq_parse_message | ( | imquic_moq_context * | moq, |
| uint64_t | stream_id, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| gboolean | complete, | ||
| gboolean | datagram ) |
Parse an incoming MoQ message.
STREAM data), we move back to the beginning of the buffer and return, waiting for more data to arrive. | moq | The imquic_moq_context instance the message is for |
| stream_id | The QUIC stream ID the message came from |
| bytes | The buffer containing the message to parse |
| blen | Size of the buffer to parse |
| complete | Whether this data marks the completion of the QUIC stream it came from |
| datagram | Whether this is not coming from a STREAM but a DATAGRAM |
| size_t imquic_moq_parse_namespace | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a NAMESPACE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_namespace_done | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a NAMESPACE_DONE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_object_datagram | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_datagram_message_type | dtype, | ||
| uint8_t * | error ) |
Helper to parse an OBJECT_DATAGRAM message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [in] | dtype | Type of OBJECT_DATAGRAM |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_object_datagram_status | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_datagram_message_type | dtype, | ||
| uint8_t * | error ) |
Helper to parse an OBJECT_DATAGRAM_STATUS message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [in] | dtype | Type of OBJECT_DATAGRAM_STATUS |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_padding_datagram | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PADDING_DATAGRAM message.
| [in] | moq | The imquic_moq_context instance the padding data is for |
| [in] | bytes | The buffer containing the padding data to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| int imquic_moq_parse_padding_stream | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| gboolean | complete, | ||
| uint8_t * | error ) |
Helper to parse a PADDING_STREAM message.
| [in] | moq | The imquic_moq_context instance the padding data is for |
| [in] | moq_stream | The imquic_moq_stream instance the padding data is from |
| [in] | complete | Whether this data marks the completion of the QUIC stream it came from |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| GList * imquic_moq_parse_properties | ( | imquic_moq_version | version, |
| uint8_t * | properties, | ||
| size_t | plen ) |
Helper mode to parse a properties buffer to a GList of imquic_moq_property.
| version | The version of the connection |
| properties | The buffer containing the properties data |
| plen | The size of the buffer containing the properties data |
| size_t imquic_moq_parse_publish | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_blocked | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_BLOCKED message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_done | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_DONE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_namespace | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_NAMESPACE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_namespace_cancel | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_NAMESPACE_CANCEL message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_namespace_done | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_NAMESPACE_DONE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_ok | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_OK message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_request_error | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a REQUEST_ERROR message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_request_ok | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a REQUEST_OK message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_request_parameter | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_request_parameters * | params, | ||
| uint64_t * | param_type, | ||
| uint8_t * | error ) |
Helper method to parse a MoQ subscribe parameter.
| [in] | moq | The imquic_moq_context instance to update with the new parameter |
| [in] | bytes | Buffer containing the parameter to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | params | imquic_moq_request_parameters instance to put the parsed parameter in |
| [out] | param_type | Type of the parsed parameter, needed for delta-decoding |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_request_update | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a REQUEST_UPDATE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_requests_blocked | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a REQUESTS_BLOCKED message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_server_setup | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SERVER_SETUP message.
SETUP | [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_setup | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SETUP message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_setup_option | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_setup_options * | params, | ||
| uint64_t * | param_type, | ||
| uint8_t * | error ) |
Helper method to parse a MoQ setup parameter.
| [in] | moq | The imquic_moq_context instance to update with the new parameter |
| [in] | bytes | Buffer containing the parameter to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | params | imquic_moq_setup_options instance to put the parsed parameter in |
| [out] | param_type | Type of the parsed parameter, needed for delta-decoding |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subgroup_header | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_data_message_type | dtype, | ||
| uint8_t * | error ) |
Helper to parse a SUBGROUP_HEADER message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [in] | dtype | Type of SUBGROUP_HEADER |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| int imquic_moq_parse_subgroup_header_object | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| gboolean | complete, | ||
| uint8_t * | error ) |
Helper to parse a SUBGROUP_HEADER object.
| [in] | moq | The imquic_moq_context instance the object is for |
| [in] | moq_stream | The imquic_moq_stream instance the object is from |
| [in] | complete | Whether this data marks the completion of the QUIC stream it came from |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SUBSCRIBE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe_namespace | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SUBSCRIBE_NAMESPACE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe_ok | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SUBSCRIBE_OK message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe_tracks | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SUBSCRIBE_TRACKS message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_track_status | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a TRACK_STATUS message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_stream instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_unsubscribe | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse an UNSUBSCRIBE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| void imquic_moq_qlog_control_message_created | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| uint8_t * | bytes, | ||
| size_t | length, | ||
| json_t * | message ) |
Add a control_message_created event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this message |
| bytes | The content of the message |
| length | The length of the message |
| message | The message content |
| void imquic_moq_qlog_control_message_parsed | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| uint8_t * | bytes, | ||
| size_t | length, | ||
| json_t * | message ) |
Add a control_message_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this message |
| bytes | The content of the message |
| length | The length of the message |
| message | The message content |
| void imquic_moq_qlog_fetch_header_created | ( | imquic_qlog * | qlog, |
| imquic_moq_stream * | stream, | ||
| uint8_t * | bytes, | ||
| size_t | length ) |
Add a fetch_header_created event.
| qlog | The imquic_qlog instance to add the event to |
| stream | The stream used for this header |
| bytes | The content of the message |
| length | The length of the message |
| void imquic_moq_qlog_fetch_header_parsed | ( | imquic_qlog * | qlog, |
| imquic_moq_stream * | stream, | ||
| uint8_t * | bytes, | ||
| size_t | length ) |
Add a fetch_header_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| stream | The stream used for this header |
| bytes | The content of the message |
| length | The length of the message |
| void imquic_moq_qlog_fetch_object_created | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| imquic_moq_object * | object ) |
Add a fetch_object_created event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this object |
| object | The object instance |
| void imquic_moq_qlog_fetch_object_parsed | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| imquic_moq_object * | object ) |
Add a fetch_object_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this object |
| object | The object instance |
| void imquic_moq_qlog_object_datagram_created | ( | imquic_qlog * | qlog, |
| imquic_moq_object * | object ) |
Add a object_datagram_created event.
| qlog | The imquic_qlog instance to add the event to |
| object | The object instance |
| void imquic_moq_qlog_object_datagram_parsed | ( | imquic_qlog * | qlog, |
| imquic_moq_object * | object ) |
Add a object_datagram_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| object | The object instance |
| void imquic_moq_qlog_object_datagram_status_created | ( | imquic_qlog * | qlog, |
| imquic_moq_object * | object ) |
Add a object_datagram_status_created event.
| qlog | The imquic_qlog instance to add the event to |
| object | The object instance |
| void imquic_moq_qlog_object_datagram_status_parsed | ( | imquic_qlog * | qlog, |
| imquic_moq_object * | object ) |
Add a object_datagram_status_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| object | The object instance |
| void imquic_moq_qlog_stream_type_set | ( | imquic_qlog * | qlog, |
| gboolean | local, | ||
| uint64_t | stream_id, | ||
| const char * | type ) |
Add a stream_type_set event.
| qlog | The imquic_qlog instance to add the event to |
| local | Whether this is a local or remote stream |
| stream_id | The Stream ID used for this message |
| type | The stream type |
| void imquic_moq_qlog_subgroup_header_created | ( | imquic_qlog * | qlog, |
| imquic_moq_stream * | stream, | ||
| uint8_t * | bytes, | ||
| size_t | length ) |
Add a subgroup_header_created event.
| qlog | The imquic_qlog instance to add the event to |
| stream | The stream used for this header |
| bytes | The content of the message |
| length | The length of the message |
| void imquic_moq_qlog_subgroup_header_parsed | ( | imquic_qlog * | qlog, |
| imquic_moq_stream * | stream, | ||
| uint8_t * | bytes, | ||
| size_t | length ) |
Add a subgroup_header_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| stream | The stream used for this header |
| bytes | The content of the message |
| length | The length of the message |
| void imquic_moq_qlog_subgroup_object_created | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| imquic_moq_object * | object ) |
Add a subgroup_object_created event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this object |
| object | The object instance |
| void imquic_moq_qlog_subgroup_object_parsed | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| imquic_moq_object * | object ) |
Add a subgroup_object_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this object |
| object | The object instance |
| const char * imquic_moq_request_parameter_type_str | ( | imquic_moq_request_parameter_type | type, |
| imquic_moq_version | version ) |
Helper function to serialize to string the name of a imquic_moq_request_parameter_type value.
| type | The imquic_moq_request_parameter_type value |
| version | The version of the connection |
| size_t imquic_moq_request_parameters_serialize | ( | imquic_moq_context * | moq, |
| imquic_moq_message_type | request, | ||
| imquic_moq_request_parameters * | parameters, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | params_num ) |
Helper to serialize a imquic_moq_request_parameters set to a buffer.
| [in] | moq | The imquic_moq_context instance the parameter is for |
| [in] | request | The imquic_moq_message_type request originating the parameters to serialize |
| [in] | parameters | The imquic_moq_request_parameters to serialize |
| [out] | bytes | The buffer to add paramerers to |
| [in] | blen | The size of the buffer |
| [out] | params_num | The number of parameters added to the buffer |
| void imquic_moq_reset_stream_incoming | ( | imquic_connection * | conn, |
| uint64_t | stream_id, | ||
| uint64_t | error_code ) |
Callback the core invokes when there's an incoming RESET_STREAM.
| conn | The imquic_connection instance for which new RESET_STREAM is available |
| stream_id | The ID of the stream that was reset |
| error_code | The error code that was received |
| size_t imquic_moq_setup_option_add_data | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | opt, | ||
| uint64_t | prev, | ||
| uint8_t * | buf, | ||
| size_t | buflen ) |
Helper to add a MoQ setup option with generic data to a buffer.
| moq | The imquic_moq_context instance the setup option is for |
| bytes | Buffer to add the setup option to |
| blen | Size of the buffer |
| opt | ID of the setup option to add |
| prev | ID of the previously added setup option, if we're delta-encoding |
| buf | The data acting as a value for the setup option to add |
| buflen | The size of the data value |
| size_t imquic_moq_setup_option_add_int | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | opt, | ||
| uint64_t | prev, | ||
| uint64_t | number ) |
Helper to add a MoQ setup option with a numeric value to a buffer.
| moq | The imquic_moq_context instance the setup option is for |
| bytes | Buffer to add the setup option to |
| blen | Size of the buffer |
| opt | ID of the setup option to add |
| prev | ID of the previously added setup option, if we're delta-encoding |
| number | The numeric value of the setup option to add |
| const char * imquic_moq_setup_option_type_str | ( | imquic_moq_setup_option_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_setup_option_type value.
| type | The imquic_moq_setup_option_type value |
| size_t imquic_moq_setup_options_serialize | ( | imquic_moq_context * | moq, |
| imquic_moq_setup_options * | options, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | params_num ) |
Helper to serialize a imquic_moq_setup_options set to a buffer.
| [in] | moq | The imquic_moq_context instance the parameter is for |
| [in] | options | The imquic_moq_setup_options to serialize |
| [out] | bytes | The buffer to add paramerers to |
| [in] | blen | The size of the buffer |
| [out] | params_num | The number of parameters added to the buffer |
| void imquic_moq_stop_sending_incoming | ( | imquic_connection * | conn, |
| uint64_t | stream_id, | ||
| uint64_t | error_code ) |
Callback the core invokes when there's an incoming STOP_SENDING.
| conn | The imquic_connection instance for which new STOP_SENDING is available |
| stream_id | The ID of the stream to stop sending data on |
| error_code | The error code that was received |
| imquic_moq_stream * imquic_moq_stream_create | ( | void | ) |
Create a new MoQ stream.
| void imquic_moq_stream_destroy | ( | imquic_moq_stream * | moq_stream | ) |
Destroy an existing MoQ stream.
| moq_stream | MoQ stream to destroy |
| void imquic_moq_stream_incoming | ( | imquic_connection * | conn, |
| uint64_t | stream_id, | ||
| uint8_t * | bytes, | ||
| uint64_t | length, | ||
| gboolean | complete ) |
Callback the core invokes when there's new incoming data on a STREAM.
| conn | The imquic_connection instance for which new STREAM data is available |
| stream_id | The QUIC Stream ID for which new data is available |
| bytes | The new data that is available |
| length | Size of the new data |
| complete | Whether this data marks the end of this STREAM |
| imquic_moq_subscription * imquic_moq_subscription_create | ( | uint64_t | request_id, |
| uint64_t | track_alias ) |
Helper to create a new subscription instance.
| request_id | The request ID |
| track_alias | The track alias |
| void imquic_moq_subscription_destroy | ( | imquic_moq_subscription * | moq_sub | ) |
Destroy an existing MoQ subscription.
| moq_sub | MoQ subscription to destroy |
| void imquic_qlog_moq_message_add_namespace | ( | json_t * | message, |
| imquic_moq_namespace * | track_namespace, | ||
| const char * | name ) |
Helper to add a stringified namespace tuple array to a message.
track_namespace property | message | The message object to update |
| track_namespace | The namespace to serialize to an array |
| name | The name the array should have in the message object |
| void imquic_qlog_moq_message_add_properties | ( | json_t * | message, |
| GList * | properties, | ||
| const char * | name ) |
Helper to add a stringified array of propertie headers to a message.
| message | The message object to update |
| properties | The list of properties to convert |
| name | The name the array should have in the message object |
| void imquic_qlog_moq_message_add_request_parameters | ( | json_t * | message, |
| imquic_moq_version | version, | ||
| imquic_moq_request_parameters * | parameters, | ||
| const char * | name ) |
Helper to add a stringified array of subscribe parameters to a message.
| message | The message object to update |
| version | The version of the MoQ connection this message belongs to |
| parameters | The subscribe parameters to convert |
| name | The name the array should have in the message object |
| void imquic_qlog_moq_message_add_setup_options | ( | json_t * | message, |
| imquic_moq_setup_options * | options, | ||
| const char * | name ) |
Helper to add a stringified array of setup parameters to a message.
| message | The message object to update |
| options | The setup options to convert |
| name | The name the array should have in the message object |
| void imquic_qlog_moq_message_add_track | ( | json_t * | message, |
| imquic_moq_track * | track_name ) |
Helper to add a stringified track name to a message.
track_name property | message | The message object to update |
| track_name | The track name to add |
| json_t * imquic_qlog_moq_message_prepare | ( | const char * | type | ) |
Helper to create a new QLOG MoQT message.
type property | type | The name of the message |