Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
sequencer.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Roc Streaming authors
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
8
9//! @file roc_rtp/sequencer.h
10//! @brief RTP packet sequencer.
11
12#ifndef ROC_RTP_SEQUENCER_H_
13#define ROC_RTP_SEQUENCER_H_
14
17#include "roc_rtp/identity.h"
18
19namespace roc {
20namespace rtp {
21
22//! RTP packet sequencer.
24public:
25 //! Initialize.
26 Sequencer(Identity& identity, unsigned int payload_type);
27
28 //! Check if was constructed successfully.
29 bool is_valid() const;
30
31 //! Fill next packet.
32 virtual void next(packet::Packet& packet,
33 core::nanoseconds_t capture_ts,
35
36private:
37 Identity& identity_;
38
39 const unsigned int payload_type_;
40 packet::seqnum_t seqnum_;
42
43 bool valid_;
44};
45
46} // namespace rtp
47} // namespace roc
48
49#endif // ROC_RTP_SEQUENCER_H_
Base class for non-copyable objects.
Definition noncopyable.h:23
Packet sequencer. Fills protocol-specific packet headers to form a continous sequence....
Definition isequencer.h:24
RTP participant identity.
Definition identity.h:23
RTP packet sequencer.
Definition sequencer.h:23
virtual void next(packet::Packet &packet, core::nanoseconds_t capture_ts, packet::stream_timestamp_t duration)
Fill next packet.
bool is_valid() const
Check if was constructed successfully.
Sequencer(Identity &identity, unsigned int payload_type)
Initialize.
RTP participant identity.
Packet sequencer.
int64_t nanoseconds_t
Nanoseconds.
Definition time.h:58
uint16_t seqnum_t
Packet sequence number.
Definition units.h:78
uint32_t stream_timestamp_t
Packet stream timestamp.
Definition units.h:36
Root namespace.
Non-copyable object.