Compy 0.2.0
A lightweight RTSP 1.0 server library for embedded systems
Loading...
Searching...
No Matches
rtp_transport.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <compy/droppable.h>
9#include <compy/transport.h>
10
11#include <stdbool.h>
12#include <stdint.h>
13
14#include <datatype99.h>
15#include <slice99.h>
16
17#include <compy/priv/compiler_attrs.h>
18
23
38// clang-format off
40 Compy_RtpTimestamp,
41 (Compy_RtpTimestamp_Raw, uint32_t),
42 (Compy_RtpTimestamp_SysClockUs, uint64_t)
43);
44// clang-format on
45
58 Compy_Transport t, uint8_t payload_ty,
59 uint32_t clock_rate) COMPY_PRIV_MUST_USE;
60
76 Compy_RtpTransport *self, Compy_RtpTimestamp ts, bool marker,
77 U8Slice99 payload_header, U8Slice99 payload) COMPY_PRIV_MUST_USE;
78
86
87bool Compy_RtpTransport_is_full(Compy_RtpTransport *self);
88
95
104void Compy_RtpTransport_set_ssrc(Compy_RtpTransport *self, uint32_t ssrc);
105
122 Compy_RtpTransport *self, uint8_t id, const uint8_t *value, uint8_t len);
123
130
137
144
150uint32_t
Droppable types support.
uint32_t Compy_RtpTransport_get_last_rtp_timestamp(const Compy_RtpTransport *self)
Returns the RTP timestamp of the last sent packet.
Definition rtp_transport.c:170
declImplExtern99(Compy_Droppable, Compy_RtpTransport)
Implements Compy_Droppable_IFACE for Compy_RtpTransport.
uint32_t Compy_RtpTransport_get_ssrc(const Compy_RtpTransport *self)
Returns the SSRC identifier of this transport.
Definition rtp_transport.c:126
Compy_RtpTransport * Compy_RtpTransport_new(Compy_Transport t, uint8_t payload_ty, uint32_t clock_rate) COMPY_PRIV_MUST_USE
Creates a new RTP transport from the underlying level-4 protocol t.
Definition rtp_transport.c:28
uint32_t Compy_RtpTransport_get_packet_count(const Compy_RtpTransport *self)
Returns the total number of RTP packets sent.
Definition rtp_transport.c:159
uint32_t Compy_RtpTransport_get_octet_count(const Compy_RtpTransport *self)
Returns the total number of payload octets sent (excludes RTP headers).
Definition rtp_transport.c:164
datatype99(Compy_RtpTimestamp,(Compy_RtpTimestamp_Raw, uint32_t),(Compy_RtpTimestamp_SysClockUs, uint64_t))
An RTP timestamp.
void Compy_RtpTransport_set_ssrc(Compy_RtpTransport *self, uint32_t ssrc)
Sets the SSRC identifier of this transport.
Definition rtp_transport.c:131
int Compy_RtpTransport_send_packet(Compy_RtpTransport *self, Compy_RtpTimestamp ts, bool marker, U8Slice99 payload_header, U8Slice99 payload) COMPY_PRIV_MUST_USE
Sends an RTP packet.
Definition rtp_transport.c:60
void Compy_RtpTransport_set_extension(Compy_RtpTransport *self, uint8_t id, const uint8_t *value, uint8_t len)
Sets a persistent one-byte RTP header extension (RFC 8285).
Definition rtp_transport.c:136
uint16_t Compy_RtpTransport_get_seq(const Compy_RtpTransport *self)
Returns the current RTP sequence number of this transport.
Definition rtp_transport.c:154
Definition rtp_transport.c:11
RTSP data transport (level 4) implementations.