Loading...
Searching...
No Matches
roq.h File Reference

RTP Over QUIC (RoQ) stack (headers) More...

#include <glib.h>
#include "../imquic/roq.h"
#include "qlog.h"
#include "refcount.h"
Include dependency graph for internal/roq.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  imquic_roq_endpoint
 RoQ endpoint instance. More...
struct  imquic_roq_stream
 RoQ stream (when using the same stream for multiple packets) More...
struct  imquic_roq_callbacks
 RoQ public callbacks. More...

Macros

#define IMQUIC_ROQ   7499633

Typedefs

typedef struct imquic_roq_endpoint imquic_roq_endpoint
 RoQ endpoint instance.
typedef struct imquic_roq_stream imquic_roq_stream
 RoQ stream (when using the same stream for multiple packets)
typedef struct imquic_roq_callbacks imquic_roq_callbacks
 RoQ public callbacks.

Functions

void imquic_roq_init (void)
 Initialize the native RoQ stack at startup.
void imquic_roq_deinit (void)
 Uninitialize the native RoQ stack.
Internal callbacks for RoQ endpoints
void imquic_roq_new_connection (imquic_connection *conn, void *user_data)
 Callback the core invokes when a new QUIC connection using RoQ is available.
void imquic_roq_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_roq_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_roq_connection_gone (imquic_connection *conn)
 Callback the core invokes when an existing RoQ connection is not available anymore.
QLOG events tracing for RoQ
void imquic_roq_qlog_add_rtp_packet (json_t *data, uint64_t flow_id, uint64_t length)
 Helper to add fields for RtpPacket to an event.
void imquic_roq_qlog_stream_opened (imquic_qlog *qlog, uint64_t stream_id, uint64_t flow_id)
 Add a stream_opened event.
void imquic_roq_qlog_stream_packet_created (imquic_qlog *qlog, uint64_t stream_id, uint64_t flow_id, uint8_t *bytes, size_t length)
 Add a stream_packet_created event.
void imquic_roq_qlog_stream_packet_parsed (imquic_qlog *qlog, uint64_t stream_id, uint64_t flow_id, uint8_t *bytes, size_t length)
 Add a stream_packet_parsed event.
void imquic_roq_qlog_datagram_packet_created (imquic_qlog *qlog, uint64_t flow_id, uint8_t *bytes, size_t length)
 Add a datagram_packet_created event.
void imquic_roq_qlog_datagram_packet_parsed (imquic_qlog *qlog, uint64_t flow_id, uint8_t *bytes, size_t length)
 Add a datagram_packet_parsed event.

Detailed Description

RTP Over QUIC (RoQ) stack (headers)

Author
Lorenzo Miniero loren.nosp@m.zo@m.nosp@m.eetec.nosp@m.ho.c.nosp@m.om

Implementation of the RTP Over QUIC (RoQ) stack as part of the library itself. At the time of writing, this implements (most of) version -10 of the protocol.

Note
This is the internal implementation of RoQ in the library. You're still free to only use imquic as the underlying QUIC/WebTransport library, and take care of the RoQ implementation on your own instead: in order to do that, use the generic imquic client/server creation utilities, rather than the RoQ specific ones.

Macro Definition Documentation

◆ IMQUIC_ROQ

#define IMQUIC_ROQ   7499633

Typedef Documentation

◆ imquic_roq_callbacks

typedef struct imquic_roq_callbacks imquic_roq_callbacks

RoQ public callbacks.

◆ imquic_roq_endpoint

typedef struct imquic_roq_endpoint imquic_roq_endpoint

RoQ endpoint instance.

◆ imquic_roq_stream

typedef struct imquic_roq_stream imquic_roq_stream

RoQ stream (when using the same stream for multiple packets)

Function Documentation

◆ imquic_roq_connection_gone()

void imquic_roq_connection_gone ( imquic_connection * conn)

Callback the core invokes when an existing RoQ connection is not available anymore.

Parameters
connThe imquic_connection instance that is now gone

◆ imquic_roq_datagram_incoming()

void imquic_roq_datagram_incoming ( imquic_connection * conn,
uint8_t * bytes,
uint64_t length )

Callback the core invokes when there's new incoming data on a DATAGRAM.

Parameters
connThe imquic_connection instance for which new DATAGRAM data is available
bytesThe new data that is available
lengthSize of the new data

◆ imquic_roq_deinit()

void imquic_roq_deinit ( void )

Uninitialize the native RoQ stack.

◆ imquic_roq_init()

void imquic_roq_init ( void )

Initialize the native RoQ stack at startup.

◆ imquic_roq_new_connection()

void imquic_roq_new_connection ( imquic_connection * conn,
void * user_data )

Callback the core invokes when a new QUIC connection using RoQ is available.

Parameters
connThe imquic_connection instance that is now available
user_dataOptional user data the user/application may have associated to the endpoint this connection belongs to

◆ imquic_roq_qlog_add_rtp_packet()

void imquic_roq_qlog_add_rtp_packet ( json_t * data,
uint64_t flow_id,
uint64_t length )

Helper to add fields for RtpPacket to an event.

Parameters
dataThe data object to add the properties to
flow_idThe RoQ flow ID to add
lengthThe length of the RTP packet

◆ imquic_roq_qlog_datagram_packet_created()

void imquic_roq_qlog_datagram_packet_created ( imquic_qlog * qlog,
uint64_t flow_id,
uint8_t * bytes,
size_t length )

Add a datagram_packet_created event.

Parameters
qlogThe imquic_qlog instance to add the event to
flow_idThe RoQ flow ID used in the datagram
bytesThe content of the RTP packet
lengthThe length of the RTP packet

◆ imquic_roq_qlog_datagram_packet_parsed()

void imquic_roq_qlog_datagram_packet_parsed ( imquic_qlog * qlog,
uint64_t flow_id,
uint8_t * bytes,
size_t length )

Add a datagram_packet_parsed event.

Parameters
qlogThe imquic_qlog instance to add the event to
flow_idThe RoQ flow ID used in the datagram
bytesThe content of the RTP packet
lengthThe length of the RTP packet

◆ imquic_roq_qlog_stream_opened()

void imquic_roq_qlog_stream_opened ( imquic_qlog * qlog,
uint64_t stream_id,
uint64_t flow_id )

Add a stream_opened event.

Parameters
qlogThe imquic_qlog instance to add the event to
stream_idThe Stream ID that was opened
flow_idThe RoQ flow ID used in the stream

◆ imquic_roq_qlog_stream_packet_created()

void imquic_roq_qlog_stream_packet_created ( imquic_qlog * qlog,
uint64_t stream_id,
uint64_t flow_id,
uint8_t * bytes,
size_t length )

Add a stream_packet_created event.

Parameters
qlogThe imquic_qlog instance to add the event to
stream_idThe Stream ID used for the packet
flow_idThe RoQ flow ID used in the stream
bytesThe content of the RTP packet
lengthThe length of the RTP packet

◆ imquic_roq_qlog_stream_packet_parsed()

void imquic_roq_qlog_stream_packet_parsed ( imquic_qlog * qlog,
uint64_t stream_id,
uint64_t flow_id,
uint8_t * bytes,
size_t length )

Add a stream_packet_parsed event.

Parameters
qlogThe imquic_qlog instance to add the event to
stream_idThe Stream ID used for the packet
flow_idThe RoQ flow ID used in the stream
bytesThe content of the RTP packet
lengthThe length of the RTP packet

◆ imquic_roq_stream_incoming()

void imquic_roq_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.

Parameters
connThe imquic_connection instance for which new STREAM data is available
stream_idThe QUIC Stream ID for which new data is available
bytesThe new data that is available
lengthSize of the new data
completeWhether this data marks the end of this STREAM