Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
roq.c File Reference

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

#include "imquic/roq.h"
#include "internal/roq.h"
#include "internal/connection.h"
Include dependency graph for roq.c:

Data Structures

struct  imquic_roq_packet
 

Typedefs

typedef struct imquic_roq_packet imquic_roq_packet
 

Functions

void imquic_roq_init (void)
 Initialize the native RoQ stack at startup.
 
void imquic_roq_deinit (void)
 Uninitialize the native RoQ stack.
 
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 offset, 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.
 
size_t imquic_roq_send_rtp (imquic_connection *conn, imquic_roq_multiplexing multiplexing, uint64_t flow_id, uint8_t *bytes, size_t blen, gboolean close_stream)
 Helper to send RTP packets over QUIC, using one of the supported imquic_roq_multiplexing modes. The method only requires the flow ID (to allow the recipient to identify the RTP session) and the RTP packet to send (buffer and size). The stack will then internally frame the packet as needed, using the right multiplexing mode and optionally creating a new STREAM for the purpose.
 

Detailed Description

RTP Over QUIC (RoQ) stack.

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.

Typedef Documentation

◆ imquic_roq_packet

typedef struct imquic_roq_packet imquic_roq_packet

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_send_rtp()

size_t imquic_roq_send_rtp ( imquic_connection * conn,
imquic_roq_multiplexing multiplexing,
uint64_t flow_id,
uint8_t * bytes,
size_t blen,
gboolean close_stream )

Helper to send RTP packets over QUIC, using one of the supported imquic_roq_multiplexing modes. The method only requires the flow ID (to allow the recipient to identify the RTP session) and the RTP packet to send (buffer and size). The stack will then internally frame the packet as needed, using the right multiplexing mode and optionally creating a new STREAM for the purpose.

Parameters
[in]connThe RoQ connection to send the RTP packet on
[in]multiplexingThe imquic_roq_multiplexing mode to use for sending this packet
[in]flow_idThe RoQ flow ID
[in]bytesThe buffer containing the RTP packet
[in]blenThe size of the buffer to send
[in]close_streamWhether the STREAM should be closed after sending this packet (ignored when using DATAGRAM as a multiplexing mode)
Returns
The size of the RoQ message being sent, if successful, or 0 otherwise

◆ imquic_roq_stream_incoming()

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

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
offsetThe offset in the stream this new data should be put in
lengthSize of the new data
completeWhether this data marks the end of this STREAM