Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
rtp.h File Reference

RTP (Real-time Transport Protocol) API. More...

Go to the source code of this file.

Data Structures

struct  rtp_header_extension
 RTP header extension as defined in RFC 3550 section 5.3.1. More...
struct  rtp_header
 RTP fixed header as defined in RFC 3550 section 5.1. More...
struct  rtp_packet
 Decoded RTP packet with header and payload separated. More...
struct  rtp_session_context
 RTP session configuration context. More...
struct  rtp_transport
 Internal transport state embedded in rtp_session. More...

Macros

#define RTP_VERSION   2
 RTP protocol version 2 as defined in RFC 3550.
#define RTP_MIN_HEADER_LEN   12
 Minimum RTP header length in bytes, excluding any CSRC list or extension.
#define RTP_PAYLOAD_TYPE_MAX   127
 Maximum value for the payload type in an RTP packet.
#define RTP_MARKER   1
 Convenience value for the marker argument of rtp_session_send that sets the RTP marker bit.
#define RTP_HDR_V_MASK   GENMASK(7, 6)
 Mask for the version (V) field within rtp_header::vpxcc.
#define RTP_HDR_P_MASK   BIT(5)
 Mask for the padding (P) flag within rtp_header::vpxcc.
#define RTP_HDR_X_MASK   BIT(4)
 Mask for the extension (X) flag within rtp_header::vpxcc.
#define RTP_HDR_CC_MASK   GENMASK(3, 0)
 Mask for the CSRC count (CC) field within rtp_header::vpxcc.
#define RTP_HDR_M_MASK   BIT(7)
 Mask for the marker (M) bit within rtp_header::mpt.
#define RTP_HDR_PT_MASK   GENMASK(6, 0)
 Mask for the payload type (PT) field within rtp_header::mpt.
#define RTP_MAX_CSRC_COUNT   CONFIG_RTP_MAX_CSRC_COUNT
 Maximum number of csrc's that can be stored.
#define RTP_SESSION_DEFINE(_name, _local_port)

Typedefs

typedef void(* rtp_rx_cb_t) (struct rtp_session *session, struct rtp_packet *packet, void *user_data)
 RTP packet receive callback type.

Enumerations

enum  rtp_role { RTP_ROLE_SINK , RTP_ROLE_SOURCE , RTP_ROLE_BOTH }
 Role of an RTP session. More...
enum  rtp_transport_type { RTP_TRANSPORT_NUM }
 Transport backend used by an RTP session. More...

Detailed Description

RTP (Real-time Transport Protocol) API.

Macro Definition Documentation

◆ RTP_SESSION_DEFINE

#define RTP_SESSION_DEFINE ( _name,
_local_port )
Value:
struct rtp_session _name = {.local_port = _local_port, RTP_SESSION_NAME(_name)}