Media Over QUIC (MoQ) stack. More...
#include <arpa/inet.h>
#include "internal/moq.h"
#include "internal/connection.h"
#include "imquic/debug.h"
Macros | |
#define | IMQUIC_MOQ_LOG_VERB IMQUIC_LOG_HUGE |
#define | IMQUIC_MOQ_LOG_HUGE IMQUIC_LOG_VERB |
#define | IMQUIC_MOQ_CHECK_ERR(err, res, reason) |
Functions | |
void | imquic_moq_init (void) |
Initialize the native MoQ stack at startup. | |
void | imquic_moq_deinit (void) |
Uninitialize the native MoQ stack. | |
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 offset, 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_connection_gone (imquic_connection *conn) |
Callback the core invokes when an existing MoQ connection is not available anymore. | |
const char * | imquic_moq_error_code_str (imquic_moq_error_code code) |
Helper function to serialize to string the name of a imquic_moq_error_code value. | |
const char * | imquic_moq_sub_error_code_str (imquic_moq_sub_error_code code) |
Helper function to serialize to string the name of a imquic_moq_error_code value. | |
const char * | imquic_moq_sub_done_code_str (imquic_moq_sub_done_code code) |
Helper function to serialize to string the name of a imquic_moq_sub_done_code value. | |
const char * | imquic_moq_message_type_str (imquic_moq_message_type type) |
Helper function to serialize to string the name of a imquic_moq_message_type value. | |
const char * | imquic_moq_data_message_type_str (imquic_moq_data_message_type type) |
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) |
Helper function to return the imquic_moq_delivery mode associated to a imquic_moq_data_message_type type. | |
const char * | imquic_moq_setup_parameter_type_str (imquic_moq_setup_parameter_type type) |
Helper function to serialize to string the name of a imquic_moq_setup_parameter_type value. | |
const char * | imquic_moq_subscribe_parameter_type_str (imquic_moq_subscribe_parameter_type type) |
Helper function to serialize to string the name of a imquic_moq_subscribe_parameter_type value. | |
const char * | imquic_moq_role_type_str (imquic_moq_role_type type) |
Helper function to serialize to string the name of a imquic_moq_role_type value. | |
const char * | imquic_moq_location_mode_str (imquic_moq_location_mode mode) |
Helper function to serialize to string the name of a imquic_moq_location_mode value. | |
const char * | imquic_moq_filter_type_str (imquic_moq_filter_type type) |
Helper function to serialize to string the name of a imquic_moq_filter_type value. | |
const char * | imquic_moq_group_order_str (imquic_moq_group_order type) |
Helper function to serialize to string the name of a imquic_moq_group_order value. | |
gboolean | imquic_moq_buffer_resize (imquic_moq_buffer *buffer, uint64_t new_size) |
Resize an existing buffer. | |
void | imquic_moq_buffer_append (imquic_moq_buffer *buffer, uint8_t *bytes, uint64_t length) |
Append data at the end of the buffer. | |
void | imquic_moq_buffer_shift (imquic_moq_buffer *buffer, uint64_t length) |
Move the data in the buffer back of a specific number of bytes. | |
void | imquic_moq_buffer_destroy (imquic_moq_buffer *buffer) |
Destroy an existing buffer. | |
imquic_moq_subscription * | imquic_moq_subscription_create (uint64_t subscribe_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. | |
void | imquic_moq_stream_destroy (imquic_moq_stream *moq_stream) |
Destroy an existing MoQ stream. | |
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 pars an SERVER_SETUP message. | |
size_t | imquic_moq_parse_max_subscribe_id (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to pars an MAX_SUBSCRIBE_ID message. | |
size_t | imquic_moq_parse_announce (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse an ANNOUNCE message. | |
size_t | imquic_moq_parse_announce_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse an ANNOUNCE_OK message. | |
size_t | imquic_moq_parse_announce_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse an ANNOUNCE_ERROR message. | |
size_t | imquic_moq_parse_unannounce (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse an UNANNOUNCE message. | |
size_t | imquic_moq_parse_announce_cancel (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse an ANNOUNCE_CANCEL message. | |
size_t | imquic_moq_parse_subscribe (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE message. | |
size_t | imquic_moq_parse_subscribe_update (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_UPDATE message. | |
size_t | imquic_moq_parse_subscribe_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_OK message. | |
size_t | imquic_moq_parse_subscribe_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_ERROR 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_subscribe_done (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_DONE message. | |
size_t | imquic_moq_parse_subscribe_announces (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_ANNOUNCES message. | |
size_t | imquic_moq_parse_subscribe_announces_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_ANNOUNCES_OK message. | |
size_t | imquic_moq_parse_subscribe_announces_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_ANNOUNCES_ERROR message. | |
size_t | imquic_moq_parse_unsubscribe_announces (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse an UNSUBSCRIBE_ANNOUNCES message. | |
size_t | imquic_moq_parse_fetch (imquic_moq_context *moq, 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, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a FETCH_OK message. | |
size_t | imquic_moq_parse_fetch_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a FETCH_ERROR message. | |
size_t | imquic_moq_parse_track_status_request (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a TRACK_STATUS_REQUEST message. | |
size_t | imquic_moq_parse_track_status (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a TRACK_STATUS message. | |
size_t | imquic_moq_parse_object_stream (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse an OBJECT_STREAM message. | |
size_t | imquic_moq_parse_object_datagram (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse an OBJECT_DATAGRAM message. | |
size_t | imquic_moq_parse_stream_header_track (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a STREAM_HEADER_TRACK message. | |
int | imquic_moq_parse_stream_header_track_object (imquic_moq_context *moq, imquic_moq_stream *moq_stream, gboolean complete) |
Helper to parse a STREAM_HEADER_TRACK object. | |
size_t | imquic_moq_parse_stream_header_group (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a STREAM_HEADER_GROUP message. | |
int | imquic_moq_parse_stream_header_group_object (imquic_moq_context *moq, imquic_moq_stream *moq_stream, gboolean complete) |
Helper to parse a STREAM_HEADER_GROUP object. | |
size_t | imquic_moq_parse_stream_header_subgroup (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a STREAM_HEADER_SUBGROUP message. | |
int | imquic_moq_parse_stream_header_subgroup_object (imquic_moq_context *moq, imquic_moq_stream *moq_stream, gboolean complete) |
Helper to parse a STREAM_HEADER_SUBGROUP 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) |
Helper to parse a FETCH_HEADER object. | |
size_t | imquic_moq_parse_goaway (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a GOAWAY message. | |
size_t | imquic_moq_add_control_message (imquic_moq_context *moq, imquic_moq_message_type type, uint8_t *bytes, size_t blen, size_t poffset, size_t plen, size_t *start) |
Helper method to put a message header and a payload together. | |
size_t | imquic_moq_add_client_setup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, GList *supported_versions, size_t params_num, imquic_data *parameters) |
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, uint32_t version, size_t params_num, imquic_data *parameters) |
Helper method to add a SERVER_SETUP message to a buffer. | |
size_t | imquic_moq_add_max_subscribe_id (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t max_subscribe_id) |
Helper method to add a MAX_SUBSCRIBE_ID message to a buffer. | |
size_t | imquic_moq_add_announce (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace, size_t params_num, imquic_data *parameters) |
Helper method to add an ANNOUNCE message to a buffer. | |
size_t | imquic_moq_add_announce_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace) |
Helper method to add an ANNOUNCE_OK message to a buffer. | |
size_t | imquic_moq_add_announce_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace, imquic_moq_error_code error, const char *reason) |
Helper method to add an ANNOUNCE_ERROR message to a buffer. | |
size_t | imquic_moq_add_unannounce (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace) |
Helper method to add an UNANNOUNCE message to a buffer. | |
size_t | imquic_moq_add_announce_cancel (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace) |
Helper method to add aN ANNOUNCE_CANCEL message to a buffer. | |
size_t | imquic_moq_add_subscribe_v03 (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, uint64_t track_alias, imquic_moq_namespace *track_namespace, imquic_moq_name *track_name, imquic_moq_location *start_group, imquic_moq_location *start_object, imquic_moq_location *end_group, imquic_moq_location *end_object, size_t params_num, imquic_data *parameters) |
Helper to add a SUBSCRIBE message (version -03 of the draft) to a buffer. | |
size_t | imquic_moq_add_subscribe (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, uint64_t track_alias, imquic_moq_namespace *track_namespace, imquic_moq_name *track_name, uint8_t priority, uint8_t group_order, imquic_moq_filter_type filter, uint64_t start_group, uint64_t start_object, uint64_t end_group, uint64_t end_object, size_t params_num, imquic_data *parameters) |
Helper to add a SUBSCRIBE message (any version of the draft except v03) to a buffer. | |
size_t | imquic_moq_add_subscribe_update (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, uint64_t start_group, uint64_t start_object, uint64_t end_group, uint64_t end_object, uint8_t priority, size_t params_num, imquic_data *parameters) |
Helper method to add a SUBSCRIBE_UPDATE message to a buffer. | |
size_t | imquic_moq_add_subscribe_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, uint64_t expires, imquic_moq_group_order group_order, gboolean content_exists, uint64_t largest_group_id, uint64_t largest_object_id, size_t params_num, imquic_data *parameters) |
Helper method to add a SUBSCRIBE_OK message to a buffer. | |
size_t | imquic_moq_add_subscribe_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, imquic_moq_sub_error_code error, const char *reason, uint64_t track_alias) |
Helper method to add a SUBSCRIBE_ERRROR message to a buffer. | |
size_t | imquic_moq_add_unsubscribe (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id) |
Helper method to add an UNSUBSCRIBE message to a buffer. | |
size_t | imquic_moq_add_subscribe_done (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, imquic_moq_sub_done_code status, const char *reason, gboolean content_exists, uint64_t final_group, uint64_t final_object) |
Helper method to add a SUBSCRIBE_DONE message to a buffer. | |
size_t | imquic_moq_add_subscribe_announces (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace, size_t params_num, imquic_data *parameters) |
Helper to add a SUBSCRIBE_ANNOUNCES message (version -04 of the draft) to a buffer. | |
size_t | imquic_moq_add_subscribe_announces_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace) |
Helper method to add a SUBSCRIBE_ANNOUNCES_OK message to a buffer. | |
size_t | imquic_moq_add_subscribe_announces_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace, imquic_moq_error_code error, const char *reason) |
Helper method to add a SUBSCRIBE_ANNOUNCES_ERRROR message to a buffer. | |
size_t | imquic_moq_add_unsubscribe_announces (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace) |
Helper method to add an UNSUBSCRIBE_ANNOUNCES message to a buffer. | |
size_t | imquic_moq_add_fetch (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, imquic_moq_namespace *track_namespace, imquic_moq_name *track_name, uint8_t priority, imquic_moq_group_order group_order, uint64_t start_group, uint64_t start_object, uint64_t end_group, uint64_t end_object, size_t params_num, imquic_data *parameters) |
Helper to add a FETCH message (any version of the draft except v03) to a buffer. | |
size_t | imquic_moq_add_fetch_cancel (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id) |
Helper method to add an FETCH_CANCEL message to a buffer. | |
size_t | imquic_moq_add_fetch_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, uint8_t group_order, uint8_t end_of_track, uint64_t largest_group_id, uint64_t largest_object_id, size_t params_num, imquic_data *parameters) |
Helper method to add a FETCH_OK message to a buffer. | |
size_t | imquic_moq_add_fetch_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, imquic_moq_sub_error_code error, const char *reason) |
Helper method to add a FETCH_ERRROR message to a buffer. | |
size_t | imquic_moq_add_track_status_request (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace, imquic_moq_name *track_name) |
Helper to add a TRACK_STATUS_REQUEST message to a buffer. | |
size_t | imquic_moq_add_track_status (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace, imquic_moq_name *track_name, uint64_t status_code, uint64_t last_group_id, uint64_t last_object_id) |
Helper to add a TRACK_STATUS message to a buffer. | |
size_t | imquic_moq_add_object_stream (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, uint64_t track_alias, uint64_t group_id, uint64_t object_id, uint64_t object_status, uint64_t object_send_order, uint8_t priority, uint8_t *payload, size_t plen) |
Helper to add an OBJECT_STREAM message to a buffer (only before v06) | |
size_t | imquic_moq_add_object_datagram (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, uint64_t track_alias, uint64_t group_id, uint64_t object_id, uint64_t object_status, uint64_t object_send_order, uint8_t priority, uint8_t *payload, size_t plen) |
Helper to add an OBJECT_DATAGRAM message to a buffer. | |
size_t | imquic_moq_add_stream_header_track (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, uint64_t track_alias, uint64_t object_send_order, uint8_t priority) |
Helper to add a STREAM_HEADER_TRACK message to a buffer (only before v06) | |
size_t | imquic_moq_add_stream_header_track_object (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t group_id, uint64_t object_id, uint64_t object_status, uint8_t *payload, size_t plen) |
Helper to add an object to a buffer, formatted as expected for STREAM_HEADER_TRACK objects (so not all IDs) (only before v06) | |
size_t | imquic_moq_add_stream_header_group (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, uint64_t track_alias, uint64_t group_id, uint64_t object_send_order, uint8_t priority) |
Helper to add a STREAM_HEADER_GROUP message to a buffer (only before v06) | |
size_t | imquic_moq_add_stream_header_group_object (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t object_id, uint64_t object_status, uint8_t *payload, size_t plen) |
Helper to add an object to a buffer, formatted as expected for STREAM_HEADER_GROUP objects (so not all IDs) (only before v06) | |
size_t | imquic_moq_add_stream_header_subgroup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id, uint64_t track_alias, uint64_t group_id, uint64_t subgroup_id, uint8_t priority) |
Helper to add a STREAM_HEADER_SUBGROUP message to a buffer (only after v06) | |
size_t | imquic_moq_add_stream_header_subgroup_object (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t object_id, uint64_t object_status, uint8_t *payload, size_t plen) |
Helper to add an object to a buffer, formatted as expected for STREAM_HEADER_SUBGROUP objects (so not all IDs) (only after v06) | |
size_t | imquic_moq_add_fetch_header (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t subscribe_id) |
Helper to add a FETCH_HEADER message to a buffer (only after v07) | |
size_t | imquic_moq_add_fetch_header_object (imquic_moq_context *moq, uint8_t *bytes, size_t blen, 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) |
Helper to add an object to a buffer, formatted as expected for FETCH_HEADER objects (so not all IDs) (only before v06) | |
size_t | imquic_moq_add_goaway (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_data *new_session_uri) |
Helper method to add a GOAWAY message to a buffer. | |
size_t | imquic_moq_parse_setup_parameter (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_parsed_setup_parameter *param, uint8_t *error) |
Helper method to parse a MoQ setup parameter. | |
size_t | imquic_moq_parse_subscribe_parameter (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_parsed_subscribe_parameter *param, uint8_t *error) |
Helper method to parse a MoQ subscribe parameter. | |
size_t | imquic_moq_parameter_add_int (imquic_moq_context *moq, uint8_t *bytes, size_t blen, int param, uint64_t number) |
Helper to add a MoQ (setup or subscribe) parameter with a numeric value to a buffer. | |
size_t | imquic_moq_parameter_add_data (imquic_moq_context *moq, uint8_t *bytes, size_t blen, int param, uint8_t *buf, size_t buflen) |
Helper to add a MoQ (setup or subscribe) parameter with generic data to a buffer. | |
int | imquic_moq_set_role (imquic_connection *conn, imquic_moq_role role) |
Method to set the MoQ role on a connection. Must be done as soon as the connection is established, and before sending any MoQ message. A good place to do that is the callback fired when a new connection is available. | |
imquic_moq_role | imquic_moq_get_role (imquic_connection *conn) |
Helper function to get the MoQ role associated with a connection. | |
int | imquic_moq_set_version (imquic_connection *conn, imquic_moq_version version) |
Method to set the MoQ version on a connection. Must be done as soon as the connection is established, and before sending any MoQ message. A good place to do that is the callback fired when a new connection is available. | |
imquic_moq_version | imquic_moq_get_version (imquic_connection *conn) |
Helper function to get the MoQ version associated with a connection. | |
int | imquic_moq_set_max_subscribe_id (imquic_connection *conn, uint64_t max_subscribe_id) |
Helper function to set the Maximum Subscribe ID a subscriber can send. | |
int | imquic_moq_announce (imquic_connection *conn, imquic_moq_namespace *tns) |
Function to send an ANNOUNCE request. | |
int | imquic_moq_accept_announce (imquic_connection *conn, imquic_moq_namespace *tns) |
Function to accept an incoming ANNOUNCE request. | |
int | imquic_moq_reject_announce (imquic_connection *conn, imquic_moq_namespace *tns, int error_code, const char *reason) |
Function to reject an incoming ANNOUNCE request. | |
int | imquic_moq_unannounce (imquic_connection *conn, imquic_moq_namespace *tns) |
Function to send an UNANNOUNCE request. | |
int | imquic_moq_subscribe (imquic_connection *conn, uint64_t subscribe_id, uint64_t track_alias, imquic_moq_namespace *tns, imquic_moq_name *tn, imquic_moq_auth_info *auth) |
Function to send a SUBSCRIBE request. | |
int | imquic_moq_accept_subscribe (imquic_connection *conn, uint64_t subscribe_id, uint64_t expires, gboolean descending) |
Function to accept an incoming SUBSCRIBE request. | |
int | imquic_moq_reject_subscribe (imquic_connection *conn, uint64_t subscribe_id, int error_code, const char *reason, uint64_t track_alias) |
Function to reject an incoming SUBSCRIBE request. | |
int | imquic_moq_unsubscribe (imquic_connection *conn, uint64_t subscribe_id) |
Function to send a UNSUBSCRIBE request. | |
int | imquic_moq_subscribe_announces (imquic_connection *conn, imquic_moq_namespace *tns, imquic_moq_auth_info *auth) |
Function to send a SUBSCRIBE_ANNOUNCES request. | |
int | imquic_moq_accept_subscribe_announces (imquic_connection *conn, imquic_moq_namespace *tns) |
Function to accept an incoming SUBSCRIBE_ANNOUNCES request. | |
int | imquic_moq_reject_subscribe_announces (imquic_connection *conn, imquic_moq_namespace *tns, int error_code, const char *reason) |
Function to reject an incoming SUBSCRIBE_ANNOUNCES request. | |
int | imquic_moq_unsubscribe_announces (imquic_connection *conn, imquic_moq_namespace *tns) |
Function to send a UNSUBSCRIBE_ANNOUNCES request. | |
int | imquic_moq_fetch (imquic_connection *conn, uint64_t subscribe_id, imquic_moq_namespace *tns, imquic_moq_name *tn, gboolean descending, imquic_moq_fetch_range *range, imquic_moq_auth_info *auth) |
Function to send a FETCH request. | |
int | imquic_moq_accept_fetch (imquic_connection *conn, uint64_t subscribe_id, gboolean descending, imquic_moq_position *largest) |
Function to accept an incoming FETCH request. | |
int | imquic_moq_reject_fetch (imquic_connection *conn, uint64_t subscribe_id, int error_code, const char *reason) |
Function to reject an incoming FETCH request. | |
int | imquic_moq_cancel_fetch (imquic_connection *conn, uint64_t subscribe_id) |
Function to send a FETCH_CANCEL request. | |
int | imquic_moq_send_object (imquic_connection *conn, imquic_moq_object *object) |
Function to send a MoQ object. | |
Media Over QUIC (MoQ) stack.
Implementation of the Media Over QUIC (MoQ) stack as part of the library itself. At the time of writing, this implements (most of) versions -03 and -04 of the protocol.
#define IMQUIC_MOQ_CHECK_ERR | ( | err, | |
res, | |||
reason ) |
#define IMQUIC_MOQ_LOG_HUGE IMQUIC_LOG_VERB |
#define IMQUIC_MOQ_LOG_VERB IMQUIC_LOG_HUGE |
int imquic_moq_accept_announce | ( | imquic_connection * | conn, |
imquic_moq_namespace * | tns ) |
Function to accept an incoming ANNOUNCE
request.
conn | The imquic_connection to send the request on |
tns | The imquic_moq_namespace namespace to accept |
int imquic_moq_accept_fetch | ( | imquic_connection * | conn, |
uint64_t | subscribe_id, | ||
gboolean | descending, | ||
imquic_moq_position * | largest ) |
Function to accept an incoming FETCH
request.
conn | The imquic_connection to send the request on |
subscribe_id | The unique subscribe_id value associated to the subscription to accept |
descending | Whether objects will be delivered in descending group order |
largest | The largest group/object IDs |
int imquic_moq_accept_subscribe | ( | imquic_connection * | conn, |
uint64_t | subscribe_id, | ||
uint64_t | expires, | ||
gboolean | descending ) |
Function to accept an incoming SUBSCRIBE
request.
conn | The imquic_connection to send the request on |
subscribe_id | The unique subscribe_id value associated to the subscription to accept |
expires | Value of expires to send back |
descending | Whether objects will be delivered in descending group order |
int imquic_moq_accept_subscribe_announces | ( | imquic_connection * | conn, |
imquic_moq_namespace * | tns ) |
Function to accept an incoming SUBSCRIBE_ANNOUNCES
request.
conn | The imquic_connection to send the request on |
tns | The imquic_moq_namespace namespace to accept notifications for |
size_t imquic_moq_add_announce | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_namespace * | track_namespace, | ||
size_t | params_num, | ||
imquic_data * | parameters ) |
Helper method to add an ANNOUNCE
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 |
track_namespace | Namespace to announce |
params_num | Number of parameters to add to the message, if any |
parameters | A buffer containing an already serialized list of parameters |
size_t imquic_moq_add_announce_cancel | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_namespace * | track_namespace ) |
Helper method to add aN ANNOUNCE_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 |
track_namespace | Namespace for which to cancel the announcement |
size_t imquic_moq_add_announce_error | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_namespace * | track_namespace, | ||
imquic_moq_error_code | error, | ||
const char * | reason ) |
Helper method to add an ANNOUNCE_ERROR
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 |
track_namespace | Namespace for which the announcement caused an error |
error | Error code associated to the message |
reason | Verbose description of the error, if any |
size_t imquic_moq_add_announce_ok | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_namespace * | track_namespace ) |
Helper method to add an ANNOUNCE_OK
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 |
track_namespace | Namespace for which the announcement succeeded |
size_t imquic_moq_add_client_setup | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
GList * | supported_versions, | ||
size_t | params_num, | ||
imquic_data * | parameters ) |
Helper method to add a CLIENT_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 |
supported_versions | List of supported versions |
params_num | Number of parameters to add to the message, if any |
parameters | A buffer containing an already serialized list of parameters |
size_t imquic_moq_add_control_message | ( | imquic_moq_context * | moq, |
imquic_moq_message_type | type, | ||
uint8_t * | bytes, | ||
size_t | blen, | ||
size_t | poffset, | ||
size_t | plen, | ||
size_t * | start ) |
Helper method to put a message header and a payload together.
[in] | moq | The imquic_moq_context generating the message |
[in] | type | The ID of the control message to send |
[in] | bytes | The buffer to add the control message to |
[in] | blen | The size of the buffer |
[in] | poffset | Where in the provided buffer we already have the payload |
[in] | plen | Size of the payload in the buffer |
[out] | start | Where the final control message starts, in the buffer |
size_t imquic_moq_add_fetch | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
imquic_moq_namespace * | track_namespace, | ||
imquic_moq_name * | track_name, | ||
uint8_t | priority, | ||
imquic_moq_group_order | group_order, | ||
uint64_t | start_group, | ||
uint64_t | start_object, | ||
uint64_t | end_group, | ||
uint64_t | end_object, | ||
size_t | params_num, | ||
imquic_data * | parameters ) |
Helper to add a FETCH
message (any version of the draft except v03) to a buffer.
-04
or -05
variant of the message moq | The imquic_moq_context generating the message |
bytes | The buffer to add the message to |
blen | The size of the buffer |
subscribe_id | The subscription 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 |
priority | The fetchr priority to put in the message |
group_order | The group order to put in the message |
start_group | The start group ID to put in the message |
start_object | The start object ID to put in the message |
end_group | The end group ID to put in the message |
end_object | The end object ID to put in the message |
params_num | Number of parameters to add to the message, if any |
parameters | A buffer containing an already serialized list of parameters |
size_t imquic_moq_add_fetch_cancel | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_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 |
subscribe_id | The subscription ID to put in the message |
size_t imquic_moq_add_fetch_error | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
imquic_moq_sub_error_code | error, | ||
const char * | reason ) |
Helper method to add a FETCH_ERRROR
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 |
subscribe_id | The subscription 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_fetch_header | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id ) |
Helper to add a FETCH_HEADER
message to a buffer (only after v07)
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 |
subscribe_id | The subscription 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 | group_id, | ||
uint64_t | subgroup_id, | ||
uint64_t | object_id, | ||
uint8_t | priority, | ||
uint64_t | object_status, | ||
uint8_t * | payload, | ||
size_t | plen ) |
Helper to add an object to a buffer, formatted as expected for FETCH_HEADER
objects (so not all IDs) (only before v06)
moq | The imquic_moq_context generating the object |
bytes | The buffer to add the object to |
blen | The size of the buffer |
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 |
size_t imquic_moq_add_fetch_ok | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
uint8_t | group_order, | ||
uint8_t | end_of_track, | ||
uint64_t | largest_group_id, | ||
uint64_t | largest_object_id, | ||
size_t | params_num, | ||
imquic_data * | parameters ) |
Helper method to add a FETCH_OK
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 |
subscribe_id | The subscription ID to put in the message |
group_order | The group order to put in the message |
end_of_track | Whether all objects have been published |
largest_group_id | Largest group ID to add to the message, if needed |
largest_object_id | Largest object ID to add to the message, if needed |
params_num | Number of parameters to add to the message, if any |
parameters | A buffer containing an already serialized list of parameters |
size_t imquic_moq_add_goaway | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_data * | new_session_uri ) |
Helper method to add a GOAWAY
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 |
new_session_uri | Buffer containint the new uri value to put in the message, if any |
size_t imquic_moq_add_max_subscribe_id | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | max_subscribe_id ) |
Helper method to add a MAX_SUBSCRIBE_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_subscribe_id | Maximum subscribe ID to put in the message |
size_t imquic_moq_add_object_datagram | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
uint64_t | track_alias, | ||
uint64_t | group_id, | ||
uint64_t | object_id, | ||
uint64_t | object_status, | ||
uint64_t | object_send_order, | ||
uint8_t | priority, | ||
uint8_t * | payload, | ||
size_t | plen ) |
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 |
subscribe_id | The subscription 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) |
object_send_order | The object send order to put in the message (v03 and v04 only) |
priority | The publisher priority to put in the message (only after v05) |
payload | The buffer containing the payload of the object |
plen | The size of the payload buffer |
size_t imquic_moq_add_object_stream | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
uint64_t | track_alias, | ||
uint64_t | group_id, | ||
uint64_t | object_id, | ||
uint64_t | object_status, | ||
uint64_t | object_send_order, | ||
uint8_t | priority, | ||
uint8_t * | payload, | ||
size_t | plen ) |
Helper to add an OBJECT_STREAM
message to a buffer (only before v06)
STREAM
just to send this object moq | The imquic_moq_context generating the message |
bytes | The buffer to add the message to |
blen | The size of the buffer |
subscribe_id | The subscription 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) |
object_send_order | The object send order to put in the message (v03 and v04 only) |
priority | The publisher priority to put in the message (only after v05) |
payload | The buffer containing the payload of the object |
plen | The size of the payload buffer |
size_t imquic_moq_add_server_setup | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint32_t | version, | ||
size_t | params_num, | ||
imquic_data * | parameters ) |
Helper method to add a SERVER_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 |
version | Negotiated version |
params_num | Number of parameters to add to the message, if any |
parameters | A buffer containing an already serialized list of parameters |
size_t imquic_moq_add_stream_header_group | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
uint64_t | track_alias, | ||
uint64_t | group_id, | ||
uint64_t | object_send_order, | ||
uint8_t | priority ) |
Helper to add a STREAM_HEADER_GROUP
message to a buffer (only before v06)
STREAM
and send the header: after that, imquic_moq_add_stream_header_group_object is used to send all objects that belong to this group. moq | The imquic_moq_context generating the message |
bytes | The buffer to add the message to |
blen | The size of the buffer |
subscribe_id | The subscription 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_send_order | The object send order to put in the message (v03 and v04 only) |
priority | The publisher priority to put in the message (only after v05) |
size_t imquic_moq_add_stream_header_group_object | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | object_id, | ||
uint64_t | object_status, | ||
uint8_t * | payload, | ||
size_t | plen ) |
Helper to add an object to a buffer, formatted as expected for STREAM_HEADER_GROUP
objects (so not all IDs) (only before v06)
moq | The imquic_moq_context generating the object |
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 |
size_t imquic_moq_add_stream_header_subgroup | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
uint64_t | track_alias, | ||
uint64_t | group_id, | ||
uint64_t | subgroup_id, | ||
uint8_t | priority ) |
Helper to add a STREAM_HEADER_SUBGROUP
message to a buffer (only after v06)
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 |
bytes | The buffer to add the message to |
blen | The size of the buffer |
subscribe_id | The subscription 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_stream_header_subgroup_object | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | object_id, | ||
uint64_t | object_status, | ||
uint8_t * | payload, | ||
size_t | plen ) |
Helper to add an object to a buffer, formatted as expected for STREAM_HEADER_SUBGROUP
objects (so not all IDs) (only after v06)
moq | The imquic_moq_context generating the object |
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 |
size_t imquic_moq_add_stream_header_track | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
uint64_t | track_alias, | ||
uint64_t | object_send_order, | ||
uint8_t | priority ) |
Helper to add a STREAM_HEADER_TRACK
message to a buffer (only before v06)
STREAM
and send the header: after that, imquic_moq_add_stream_header_track_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 |
subscribe_id | The subscription ID to put in the message |
track_alias | The track alias to put in the message |
object_send_order | The object send order to put in the message (v03 and v04 only) |
priority | The publisher priority to put in the message (only after v05) |
size_t imquic_moq_add_stream_header_track_object | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | group_id, | ||
uint64_t | object_id, | ||
uint64_t | object_status, | ||
uint8_t * | payload, | ||
size_t | plen ) |
Helper to add an object to a buffer, formatted as expected for STREAM_HEADER_TRACK
objects (so not all IDs) (only before v06)
moq | The imquic_moq_context generating the object |
bytes | The buffer to add the object to |
blen | The size of the buffer |
group_id | The group ID |
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 |
size_t imquic_moq_add_subscribe | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
uint64_t | track_alias, | ||
imquic_moq_namespace * | track_namespace, | ||
imquic_moq_name * | track_name, | ||
uint8_t | priority, | ||
uint8_t | group_order, | ||
imquic_moq_filter_type | filter, | ||
uint64_t | start_group, | ||
uint64_t | start_object, | ||
uint64_t | end_group, | ||
uint64_t | end_object, | ||
size_t | params_num, | ||
imquic_data * | parameters ) |
Helper to add a SUBSCRIBE
message (any version of the draft except v03) to a buffer.
-04
or -05
variant of the message moq | The imquic_moq_context generating the message |
bytes | The buffer to add the message to |
blen | The size of the buffer |
subscribe_id | The subscription ID to put in the message |
track_alias | The track alias to put in the message |
track_namespace | The namespace to put in the message |
track_name | The track name to put in the message |
priority | The subscriber priority to put in the message (only after v05) |
group_order | The group order to put in the message (only after v05) |
filter | The filter as a imquic_moq_filter_type value |
start_group | The start group ID to put in the message |
start_object | The start object ID to put in the message |
end_group | The end group ID to put in the message |
end_object | The end object ID to put in the message |
params_num | Number of parameters to add to the message, if any |
parameters | A buffer containing an already serialized list of parameters |
size_t imquic_moq_add_subscribe_announces | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_namespace * | track_namespace, | ||
size_t | params_num, | ||
imquic_data * | parameters ) |
Helper to add a SUBSCRIBE_ANNOUNCES
message (version -04 of the draft) to a buffer.
-04
or -05
variant of the message moq | The imquic_moq_context generating the message |
bytes | The buffer to add the message to |
blen | The size of the buffer |
track_namespace | The namespace to put in the message |
params_num | Number of parameters to add to the message, if any |
parameters | A buffer containing an already serialized list of parameters |
size_t imquic_moq_add_subscribe_announces_error | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_namespace * | track_namespace, | ||
imquic_moq_error_code | error, | ||
const char * | reason ) |
Helper method to add a SUBSCRIBE_ANNOUNCES_ERRROR
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 |
track_namespace | The namespace 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_subscribe_announces_ok | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_namespace * | track_namespace ) |
Helper method to add a SUBSCRIBE_ANNOUNCES_OK
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 |
track_namespace | The namespace to put in the message |
size_t imquic_moq_add_subscribe_done | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
imquic_moq_sub_done_code | status, | ||
const char * | reason, | ||
gboolean | content_exists, | ||
uint64_t | final_group, | ||
uint64_t | final_object ) |
Helper method to add a SUBSCRIBE_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 |
subscribe_id | The subscription ID to put in the message |
status | The status of the subscrption |
reason | Verbose description of the status |
content_exists | Whether the following two properties should be added to the message |
final_group | Final group ID to add to the message, if needed |
final_object | Final object ID to add to the message, if needed |
size_t imquic_moq_add_subscribe_error | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
imquic_moq_sub_error_code | error, | ||
const char * | reason, | ||
uint64_t | track_alias ) |
Helper method to add a SUBSCRIBE_ERRROR
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 |
subscribe_id | The subscription ID to put in the message |
error | Error code associated to the message |
reason | Verbose description of the error, if any |
track_alias | The track alias to put in the message |
size_t imquic_moq_add_subscribe_ok | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
uint64_t | expires, | ||
imquic_moq_group_order | group_order, | ||
gboolean | content_exists, | ||
uint64_t | largest_group_id, | ||
uint64_t | largest_object_id, | ||
size_t | params_num, | ||
imquic_data * | parameters ) |
Helper method to add a SUBSCRIBE_OK
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 |
subscribe_id | The subscription ID to put in the message |
expires | The expires value to put in the message |
group_order | The group order to put in the message (only after v05) |
content_exists | Whether the following two properties should be added to the message |
largest_group_id | Largest group ID to add to the message, if needed |
largest_object_id | Largest object ID to add to the message, if needed |
params_num | Number of parameters to add to the message, if any (only after v06) |
parameters | A buffer containing an already serialized list of parameters (only after v06) |
size_t imquic_moq_add_subscribe_update | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
uint64_t | start_group, | ||
uint64_t | start_object, | ||
uint64_t | end_group, | ||
uint64_t | end_object, | ||
uint8_t | priority, | ||
size_t | params_num, | ||
imquic_data * | parameters ) |
Helper method to add a SUBSCRIBE_UPDATE
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 |
subscribe_id | The subscription ID to put in the message |
start_group | The start group ID to put in the message |
start_object | The start object ID to put in the message |
end_group | The end group ID to put in the message |
end_object | The end object ID to put in the message |
priority | The subscriber priority to put in the message (only after v05) |
params_num | Number of parameters to add to the message, if any |
parameters | A buffer containing an already serialized list of parameters |
size_t imquic_moq_add_subscribe_v03 | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_id, | ||
uint64_t | track_alias, | ||
imquic_moq_namespace * | track_namespace, | ||
imquic_moq_name * | track_name, | ||
imquic_moq_location * | start_group, | ||
imquic_moq_location * | start_object, | ||
imquic_moq_location * | end_group, | ||
imquic_moq_location * | end_object, | ||
size_t | params_num, | ||
imquic_data * | parameters ) |
Helper to add a SUBSCRIBE
message (version -03 of the draft) to a buffer.
-03
variant of the message moq | The imquic_moq_context generating the message |
bytes | The buffer to add the message to |
blen | The size of the buffer |
subscribe_id | The subscription ID to put in the message |
track_alias | The track alias to put in the message |
track_namespace | The namespace to put in the message |
track_name | The track name to put in the message |
start_group | The start group as a imquic_moq_location instance, if any |
start_object | The start object as a imquic_moq_location instance, if any |
end_group | The end group as a imquic_moq_location instance, if any |
end_object | The end object as a imquic_moq_location instance, if any |
params_num | Number of parameters to add to the message, if any |
parameters | A buffer containing an already serialized list of parameters |
size_t imquic_moq_add_track_status | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_namespace * | track_namespace, | ||
imquic_moq_name * | track_name, | ||
uint64_t | status_code, | ||
uint64_t | last_group_id, | ||
uint64_t | last_object_id ) |
Helper to add a TRACK_STATUS
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 |
track_namespace | The namespace to put in the message |
track_name | The track name to put in the message |
status_code | The status code to put in the message |
last_group_id | The last group ID to put in the message |
last_object_id | The last object ID to put in the message |
size_t imquic_moq_add_track_status_request | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_namespace * | track_namespace, | ||
imquic_moq_name * | track_name ) |
Helper to add a TRACK_STATUS_REQUEST
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 |
track_namespace | The namespace to put in the message |
track_name | The track name to put in the message |
size_t imquic_moq_add_unannounce | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_namespace * | track_namespace ) |
Helper method to add an UNANNOUNCE
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 |
track_namespace | Namespace to unannounce |
size_t imquic_moq_add_unsubscribe | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint64_t | subscribe_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 |
subscribe_id | The subscription ID to put in the message |
size_t imquic_moq_add_unsubscribe_announces | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_namespace * | track_namespace ) |
Helper method to add an UNSUBSCRIBE_ANNOUNCES
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 |
track_namespace | The namespace to put in the message |
int imquic_moq_announce | ( | imquic_connection * | conn, |
imquic_moq_namespace * | tns ) |
Function to send an ANNOUNCE
request.
conn | The imquic_connection to send the request on |
tns | The imquic_moq_namespace namespace to announce |
void imquic_moq_buffer_append | ( | imquic_moq_buffer * | buffer, |
uint8_t * | bytes, | ||
uint64_t | length ) |
Append data at the end of the buffer.
buffer | Buffer to append the new data to |
bytes | Data to append |
length | Size of the data to append |
void imquic_moq_buffer_destroy | ( | imquic_moq_buffer * | buffer | ) |
Destroy an existing buffer.
buffer | Buffer to destroy |
gboolean imquic_moq_buffer_resize | ( | imquic_moq_buffer * | buffer, |
uint64_t | new_size ) |
Resize an existing buffer.
buffer | Buffer to resize |
new_size | New size of the buffer |
void imquic_moq_buffer_shift | ( | imquic_moq_buffer * | buffer, |
uint64_t | length ) |
Move the data in the buffer back of a specific number of bytes.
buffer | Buffer to update |
length | How many bytes back the buffer should be moved |
int imquic_moq_cancel_fetch | ( | imquic_connection * | conn, |
uint64_t | subscribe_id ) |
Function to send a FETCH_CANCEL
request.
conn | The imquic_connection to send the request on |
subscribe_id | The unique subscribe_id value associated to the subscription to cancel_fetch from |
void imquic_moq_connection_gone | ( | imquic_connection * | conn | ) |
Callback the core invokes when an existing MoQ connection is not available anymore.
conn | The imquic_connection instance that is now gone |
const char * imquic_moq_data_message_type_str | ( | imquic_moq_data_message_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_data_message_type value.
type | The imquic_data_moq_message_type value |
imquic_moq_delivery imquic_moq_data_message_type_to_delivery | ( | imquic_moq_data_message_type | type | ) |
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 |
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_deinit | ( | void | ) |
Uninitialize the native MoQ stack.
const char * imquic_moq_error_code_str | ( | imquic_moq_error_code | code | ) |
Helper function to serialize to string the name of a imquic_moq_error_code value.
code | The imquic_moq_error_code value |
int imquic_moq_fetch | ( | imquic_connection * | conn, |
uint64_t | subscribe_id, | ||
imquic_moq_namespace * | tns, | ||
imquic_moq_name * | tn, | ||
gboolean | descending, | ||
imquic_moq_fetch_range * | range, | ||
imquic_moq_auth_info * | auth ) |
Function to send a FETCH
request.
conn | The imquic_connection to send the request on |
subscribe_id | A unique numeric identifier to associate to this subscription |
tns | The imquic_moq_namespace namespace the track to fetch to belongs to |
tn | The imquic_moq_name track name to fetch to |
descending | Whether objects should be fetched in descending group order |
range | The range of groups/objects to fetch |
auth | The imquic_moq_auth_info authentication info, if needed |
const char * imquic_moq_filter_type_str | ( | imquic_moq_filter_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_filter_type value.
type | The imquic_moq_filter_type value |
imquic_moq_role imquic_moq_get_role | ( | imquic_connection * | conn | ) |
Helper function to get the MoQ role associated with a connection.
conn | The imquic_connection to query |
imquic_moq_version imquic_moq_get_version | ( | imquic_connection * | conn | ) |
Helper function to get the MoQ version associated with a connection.
conn | The imquic_connection to query |
const char * imquic_moq_group_order_str | ( | imquic_moq_group_order | type | ) |
Helper function to serialize to string the name of a imquic_moq_group_order value.
type | The imquic_moq_group_order value |
void imquic_moq_init | ( | void | ) |
Initialize the native MoQ stack at startup.
const char * imquic_moq_location_mode_str | ( | imquic_moq_location_mode | mode | ) |
Helper function to serialize to string the name of a imquic_moq_location_mode value.
mode | The imquic_moq_location_mode value |
const char * imquic_moq_message_type_str | ( | imquic_moq_message_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_message_type value.
type | The imquic_moq_message_type value |
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, | ||
int | param, | ||
uint8_t * | buf, | ||
size_t | buflen ) |
Helper to add a MoQ (setup or subscribe) 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 |
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_int | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
int | param, | ||
uint64_t | number ) |
Helper to add a MoQ (setup or subscribe) parameter with a numeric value 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 |
number | The numeric value of the parameter to add |
size_t imquic_moq_parse_announce | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse an ANNOUNCE
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 1 in case of parsing errors |
size_t imquic_moq_parse_announce_cancel | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse an ANNOUNCE_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 1 in case of parsing errors |
size_t imquic_moq_parse_announce_error | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse an ANNOUNCE_ERROR
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 1 in case of parsing errors |
size_t imquic_moq_parse_announce_ok | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse an ANNOUNCE_OK
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 1 in case of parsing errors |
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.
[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 1 in case of parsing errors |
size_t imquic_moq_parse_fetch | ( | imquic_moq_context * | moq, |
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] | 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 1 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 1 in case of parsing errors |
size_t imquic_moq_parse_fetch_error | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse a FETCH_ERROR
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 1 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_context 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 1 in case of parsing errors |
int imquic_moq_parse_fetch_header_object | ( | imquic_moq_context * | moq, |
imquic_moq_stream * | moq_stream, | ||
gboolean | complete ) |
Helper to parse a FETCH_HEADER
object.
[in] | moq | The imquic_moq_context instance the object is for |
[in] | moq_stream | The imquic_moq_context instance the object is from |
[in] | complete | Whether this data marks the completion of the QUIC stream it came from |
size_t imquic_moq_parse_fetch_ok | ( | imquic_moq_context * | moq, |
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] | 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 1 in case of parsing errors |
size_t imquic_moq_parse_goaway | ( | imquic_moq_context * | moq, |
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] | 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 1 in case of parsing errors |
size_t imquic_moq_parse_max_subscribe_id | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to pars an MAX_SUBSCRIBE_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 1 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_object_datagram | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
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 |
[out] | error | In/out property, initialized to 0 and set to 1 in case of parsing errors |
size_t imquic_moq_parse_object_stream | ( | imquic_moq_context * | moq, |
imquic_moq_stream * | moq_stream, | ||
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse an OBJECT_STREAM
message.
[in] | moq | The imquic_moq_context instance the message is for |
[in] | moq_stream | The imquic_moq_context 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 1 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 pars an SERVER_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 1 in case of parsing errors |
size_t imquic_moq_parse_setup_parameter | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_parsed_setup_parameter * | param, | ||
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] | param | imquic_moq_parsed_setup_parameter instance to put the parsed parameter in |
[out] | error | In/out property, initialized to 0 and set to 1 in case of parsing errors |
size_t imquic_moq_parse_stream_header_group | ( | imquic_moq_context * | moq, |
imquic_moq_stream * | moq_stream, | ||
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse a STREAM_HEADER_GROUP
message.
[in] | moq | The imquic_moq_context instance the message is for |
[in] | moq_stream | The imquic_moq_context 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 1 in case of parsing errors |
int imquic_moq_parse_stream_header_group_object | ( | imquic_moq_context * | moq, |
imquic_moq_stream * | moq_stream, | ||
gboolean | complete ) |
Helper to parse a STREAM_HEADER_GROUP
object.
[in] | moq | The imquic_moq_context instance the object is for |
[in] | moq_stream | The imquic_moq_context instance the object is from |
[in] | complete | Whether this data marks the completion of the QUIC stream it came from |
size_t imquic_moq_parse_stream_header_subgroup | ( | imquic_moq_context * | moq, |
imquic_moq_stream * | moq_stream, | ||
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse a STREAM_HEADER_SUBGROUP
message.
[in] | moq | The imquic_moq_context instance the message is for |
[in] | moq_stream | The imquic_moq_context 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 1 in case of parsing errors |
int imquic_moq_parse_stream_header_subgroup_object | ( | imquic_moq_context * | moq, |
imquic_moq_stream * | moq_stream, | ||
gboolean | complete ) |
Helper to parse a STREAM_HEADER_SUBGROUP
object.
[in] | moq | The imquic_moq_context instance the object is for |
[in] | moq_stream | The imquic_moq_context instance the object is from |
[in] | complete | Whether this data marks the completion of the QUIC stream it came from |
size_t imquic_moq_parse_stream_header_track | ( | imquic_moq_context * | moq, |
imquic_moq_stream * | moq_stream, | ||
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse a STREAM_HEADER_TRACK
message.
[in] | moq | The imquic_moq_context instance the message is for |
[in] | moq_stream | The imquic_moq_context 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 1 in case of parsing errors |
int imquic_moq_parse_stream_header_track_object | ( | imquic_moq_context * | moq, |
imquic_moq_stream * | moq_stream, | ||
gboolean | complete ) |
Helper to parse a STREAM_HEADER_TRACK
object.
[in] | moq | The imquic_moq_context instance the object is for |
[in] | moq_stream | The imquic_moq_context instance the object is from |
[in] | complete | Whether this data marks the completion of the QUIC stream it came from |
size_t imquic_moq_parse_subscribe | ( | imquic_moq_context * | moq, |
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] | 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 1 in case of parsing errors |
size_t imquic_moq_parse_subscribe_announces | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse a SUBSCRIBE_ANNOUNCES
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 1 in case of parsing errors |
size_t imquic_moq_parse_subscribe_announces_error | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse a SUBSCRIBE_ANNOUNCES_ERROR
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 1 in case of parsing errors |
size_t imquic_moq_parse_subscribe_announces_ok | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse a SUBSCRIBE_ANNOUNCES_OK
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 1 in case of parsing errors |
size_t imquic_moq_parse_subscribe_done | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse a SUBSCRIBE_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 1 in case of parsing errors |
size_t imquic_moq_parse_subscribe_error | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse a SUBSCRIBE_ERROR
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 1 in case of parsing errors |
size_t imquic_moq_parse_subscribe_ok | ( | imquic_moq_context * | moq, |
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] | 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 1 in case of parsing errors |
size_t imquic_moq_parse_subscribe_parameter | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
imquic_moq_parsed_subscribe_parameter * | param, | ||
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] | param | imquic_moq_parsed_subscribe_parameter instance to put the parsed parameter in |
[out] | error | In/out property, initialized to 0 and set to 1 in case of parsing errors |
size_t imquic_moq_parse_subscribe_update | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse a SUBSCRIBE_UPDATE
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 1 in case of parsing errors |
size_t imquic_moq_parse_track_status | ( | imquic_moq_context * | moq, |
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] | 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 1 in case of parsing errors |
size_t imquic_moq_parse_track_status_request | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse a TRACK_STATUS_REQUEST
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 1 in case of parsing errors |
size_t imquic_moq_parse_unannounce | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse an UNANNOUNCE
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 1 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 1 in case of parsing errors |
size_t imquic_moq_parse_unsubscribe_announces | ( | imquic_moq_context * | moq, |
uint8_t * | bytes, | ||
size_t | blen, | ||
uint8_t * | error ) |
Helper to parse an UNSUBSCRIBE_ANNOUNCES
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 1 in case of parsing errors |
int imquic_moq_reject_announce | ( | imquic_connection * | conn, |
imquic_moq_namespace * | tns, | ||
int | error_code, | ||
const char * | reason ) |
Function to reject an incoming ANNOUNCE
request.
conn | The imquic_connection to send the request on |
tns | The imquic_moq_namespace namespace to reject |
error_code | The error code to send back |
reason | A string representation of the error, if needed |
int imquic_moq_reject_fetch | ( | imquic_connection * | conn, |
uint64_t | subscribe_id, | ||
int | error_code, | ||
const char * | reason ) |
Function to reject an incoming FETCH
request.
conn | The imquic_connection to send the request on |
subscribe_id | The unique subscribe_id value associated to the subscription to reject |
error_code | The error code to send back |
reason | A string representation of the error, if needed |
int imquic_moq_reject_subscribe | ( | imquic_connection * | conn, |
uint64_t | subscribe_id, | ||
int | error_code, | ||
const char * | reason, | ||
uint64_t | track_alias ) |
Function to reject an incoming SUBSCRIBE
request.
conn | The imquic_connection to send the request on |
subscribe_id | The unique subscribe_id value associated to the subscription to reject |
error_code | The error code to send back |
reason | A string representation of the error, if needed |
track_alias | The unique track_alias value associated to the subscription to reject |
int imquic_moq_reject_subscribe_announces | ( | imquic_connection * | conn, |
imquic_moq_namespace * | tns, | ||
int | error_code, | ||
const char * | reason ) |
Function to reject an incoming SUBSCRIBE_ANNOUNCES
request.
conn | The imquic_connection to send the request on |
tns | The imquic_moq_namespace namespace to reject notifications for |
error_code | The error code to send back |
reason | A string representation of the error, if needed |
const char * imquic_moq_role_type_str | ( | imquic_moq_role_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_role_type value.
type | The imquic_moq_role_type value |
int imquic_moq_send_object | ( | imquic_connection * | conn, |
imquic_moq_object * | object ) |
Function to send a MoQ object.
end_of_stream
property to TRUE
in the object. There's no need to do that when using OBJECT_STREAM
or OBJECT_DATAGRAM
. You can also close the stream when you don't have any object to send: just set the relevant properties (e.g., subscribe_id, group_id and subgroup_id) without any payload, and the stack will find the right stream to close it. conn | The imquic_connection to send the object on |
object | The imquic_moq_object object to send, including all relevant identifiers and the payload |
int imquic_moq_set_max_subscribe_id | ( | imquic_connection * | conn, |
uint64_t | max_subscribe_id ) |
Helper function to set the Maximum Subscribe ID a subscriber can send.
MAX_SUBSCRIBE_ID
request conn | The imquic_connection to update |
max_subscribe_id | The Maximum Subscribe ID to enforce |
int imquic_moq_set_role | ( | imquic_connection * | conn, |
imquic_moq_role | role ) |
Method to set the MoQ role on a connection. Must be done as soon as the connection is established, and before sending any MoQ message. A good place to do that is the callback fired when a new connection is available.
conn | The imquic_connection to set the role on |
role | The imquic_moq_role to take |
int imquic_moq_set_version | ( | imquic_connection * | conn, |
imquic_moq_version | version ) |
Method to set the MoQ version on a connection. Must be done as soon as the connection is established, and before sending any MoQ message. A good place to do that is the callback fired when a new connection is available.
conn | The imquic_connection to set the version on |
version | The imquic_moq_version to use/offer |
const char * imquic_moq_setup_parameter_type_str | ( | imquic_moq_setup_parameter_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_setup_parameter_type value.
type | The imquic_moq_setup_parameter_type value |
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 | offset, | ||
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 |
offset | The offset in the stream this new data should be put in |
length | Size of the new data |
complete | Whether this data marks the end of this STREAM |
const char * imquic_moq_sub_done_code_str | ( | imquic_moq_sub_done_code | code | ) |
Helper function to serialize to string the name of a imquic_moq_sub_done_code value.
code | The imquic_moq_sub_done_code value |
const char * imquic_moq_sub_error_code_str | ( | imquic_moq_sub_error_code | code | ) |
Helper function to serialize to string the name of a imquic_moq_error_code value.
code | The imquic_moq_error_code value |
int imquic_moq_subscribe | ( | imquic_connection * | conn, |
uint64_t | subscribe_id, | ||
uint64_t | track_alias, | ||
imquic_moq_namespace * | tns, | ||
imquic_moq_name * | tn, | ||
imquic_moq_auth_info * | auth ) |
Function to send a SUBSCRIBE
request.
conn | The imquic_connection to send the request on |
subscribe_id | A unique numeric identifier to associate to this subscription |
track_alias | A unique numeric identifier to associate to the track in this subscription |
tns | The imquic_moq_namespace namespace the track to subscribe to belongs to |
tn | The imquic_moq_name track name to subscribe to |
auth | The imquic_moq_auth_info authentication info, if needed |
int imquic_moq_subscribe_announces | ( | imquic_connection * | conn, |
imquic_moq_namespace * | tns, | ||
imquic_moq_auth_info * | auth ) |
Function to send a SUBSCRIBE_ANNOUNCES
request.
conn | The imquic_connection to send the request on |
tns | The imquic_moq_namespace namespace the track to subscribe to belongs to |
auth | The imquic_moq_auth_info authentication info, if needed |
const char * imquic_moq_subscribe_parameter_type_str | ( | imquic_moq_subscribe_parameter_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_subscribe_parameter_type value.
type | The imquic_moq_subscribe_parameter_type value |
imquic_moq_subscription * imquic_moq_subscription_create | ( | uint64_t | subscribe_id, |
uint64_t | track_alias ) |
Helper to create a new subscription instance.
subscribe_id | The subscription 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 |
int imquic_moq_unannounce | ( | imquic_connection * | conn, |
imquic_moq_namespace * | tns ) |
Function to send an UNANNOUNCE
request.
conn | The imquic_connection to send the request on |
tns | The imquic_moq_namespace namespace to unannounce |
int imquic_moq_unsubscribe | ( | imquic_connection * | conn, |
uint64_t | subscribe_id ) |
Function to send a UNSUBSCRIBE
request.
conn | The imquic_connection to send the request on |
subscribe_id | The unique subscribe_id value associated to the subscription to unsubscribe from |
int imquic_moq_unsubscribe_announces | ( | imquic_connection * | conn, |
imquic_moq_namespace * | tns ) |
Function to send a UNSUBSCRIBE_ANNOUNCES
request.
conn | The imquic_connection to send the request on |
tns | The imquic_moq_namespace namespace to unsubscribe notifications from |