160 bool _running =
false;
Generic memory buffer descriptor with alignment and memory space support.
Definition buffer.h:85
Lightweight error code wrapper for the promeki library.
Definition error.h:39
Dynamic array container wrapping std::vector.
Definition list.h:40
Base object for promeki.
Definition objectbase.h:129
ObjectBase * parent() const
Returns the parent object, if one. nullptr if none.
Definition objectbase.h:258
A BufferView that interprets its data as an RTP packet.
Definition rtppacket.h:59
promeki::List< RtpPacket > List
List of RtpPacket values.
Definition rtppacket.h:62
RTP session for sending and receiving packets (RFC 3550).
Definition rtpsession.h:47
Error start(const SocketAddress &localAddr)
Starts the session, binding to a local address.
Error sendPacket(const Buffer &payload, uint32_t timestamp, uint8_t payloadType, const SocketAddress &dest, bool marker=false)
Sends a single RTP packet with raw payload data.
~RtpSession() override
Destructor. Stops the session if running.
uint32_t ssrc() const
Returns the locally generated SSRC.
Definition rtpsession.h:111
uint8_t payloadType() const
Returns the default payload type.
Definition rtpsession.h:123
void setSsrc(uint32_t ssrc)
Overrides the auto-generated SSRC.
Definition rtpsession.h:114
uint32_t clockRate() const
Returns the RTP timestamp clock rate.
Definition rtpsession.h:129
void setPayloadType(uint8_t pt)
Sets the default payload type.
Definition rtpsession.h:120
PROMEKI_SIGNAL(packetReceived, Buffer, uint32_t, uint8_t, bool)
Emitted when a packet is received.
UdpSocket * socket() const
Returns the internal UDP socket.
Definition rtpsession.h:139
Error sendPackets(RtpPacket::List &packets, uint32_t timestamp, const SocketAddress &dest, bool markerOnLast=true)
Sends pre-packed RTP packets from a payload handler.
PROMEKI_SIGNAL(ssrcCollision, uint32_t)
Emitted when an SSRC collision is detected.
uint16_t sequenceNumber() const
Returns the current sequence number.
Definition rtpsession.h:117
RtpSession(ObjectBase *parent=nullptr)
Constructs an RtpSession.
bool isRunning() const
Returns true if the session is started.
Definition rtpsession.h:75
void stop()
Stops the session and closes the socket.
void setClockRate(uint32_t hz)
Sets the RTP timestamp clock rate in Hz.
Definition rtpsession.h:126
Network address with port number.
Definition socketaddress.h:50
Datagram-oriented UDP socket with multicast support.
Definition udpsocket.h:47
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19