SmolRTSP 0.2.0
A small, portable, extensible RTSP 1.0 implementation in C99
Loading...
Searching...
No Matches
rtp_transport.h
Go to the documentation of this file.
1
6#pragma once
7
10
11#include <stdbool.h>
12#include <stdint.h>
13
14#include <datatype99.h>
15#include <slice99.h>
16
17#include <smolrtsp/priv/compiler_attrs.h>
18
23
38// clang-format off
40 SmolRTSP_RtpTimestamp,
41 (SmolRTSP_RtpTimestamp_Raw, uint32_t),
42 (SmolRTSP_RtpTimestamp_SysClockUs, uint64_t)
43);
44// clang-format on
45
58 SmolRTSP_Transport t, uint8_t payload_ty,
59 uint32_t clock_rate) SMOLRTSP_PRIV_MUST_USE;
60
80 SmolRTSP_Transport t, uint8_t payload_ty, uint32_t clock_rate,
81 uint32_t ssrc) SMOLRTSP_PRIV_MUST_USE;
82
98 SmolRTSP_RtpTransport *self, SmolRTSP_RtpTimestamp ts, bool marker,
99 U8Slice99 payload_header, U8Slice99 payload) SMOLRTSP_PRIV_MUST_USE;
100
108
109bool SmolRTSP_RtpTransport_is_full(SmolRTSP_RtpTransport *self);
110
122uint32_t
124
135 SMOLRTSP_PRIV_MUST_USE;
136
148 SMOLRTSP_PRIV_MUST_USE;
149
165 SMOLRTSP_PRIV_MUST_USE;
Droppable types support.
datatype99(SmolRTSP_RtpTimestamp,(SmolRTSP_RtpTimestamp_Raw, uint32_t),(SmolRTSP_RtpTimestamp_SysClockUs, uint64_t))
An RTP timestamp.
uint32_t SmolRTSP_RtpTransport_octet_count(SmolRTSP_RtpTransport *self) SMOLRTSP_PRIV_MUST_USE
Returns the total number of payload octets (i.e., not including the RTP header or padding) successful...
struct SmolRTSP_RtpTransport SmolRTSP_RtpTransport
An RTP data transport.
Definition rtp_transport.h:22
SmolRTSP_RtpTransport * SmolRTSP_RtpTransport_new_with_ssrc(SmolRTSP_Transport t, uint8_t payload_ty, uint32_t clock_rate, uint32_t ssrc) SMOLRTSP_PRIV_MUST_USE
Like SmolRTSP_RtpTransport_new but uses an explicit SSRC instead of a randomly generated one.
int SmolRTSP_RtpTransport_send_packet(SmolRTSP_RtpTransport *self, SmolRTSP_RtpTimestamp ts, bool marker, U8Slice99 payload_header, U8Slice99 payload) SMOLRTSP_PRIV_MUST_USE
Sends an RTP packet.
declImplExtern99(SmolRTSP_Droppable, SmolRTSP_RtpTransport)
Implements SmolRTSP_Droppable_IFACE for SmolRTSP_RtpTransport.
uint32_t SmolRTSP_RtpTransport_ssrc(SmolRTSP_RtpTransport *self) SMOLRTSP_PRIV_MUST_USE
Returns the Synchronization Source (SSRC) identifier used by self on every RTP packet it sends.
uint32_t SmolRTSP_RtpTransport_pkt_count(SmolRTSP_RtpTransport *self) SMOLRTSP_PRIV_MUST_USE
Returns the total number of RTP data packets successfully transmitted by self since it was created.
uint32_t SmolRTSP_RtpTransport_last_rtp_ts(SmolRTSP_RtpTransport *self) SMOLRTSP_PRIV_MUST_USE
Returns the RTP timestamp (already in the wire/clock-rate domain) that was placed in the most recentl...
SmolRTSP_RtpTransport * SmolRTSP_RtpTransport_new(SmolRTSP_Transport t, uint8_t payload_ty, uint32_t clock_rate) SMOLRTSP_PRIV_MUST_USE
Creates a new RTP transport from the underlying level-4 protocol t.
RTSP data transport (level 4) implementations.