Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Toggle main menu visibility
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
15
#include "
roc_core/noncopyable.h
"
16
#include "
roc_packet/isequencer.h
"
17
#include "
roc_rtp/identity.h
"
18
19
namespace
roc
{
20
namespace
rtp
{
21
22
//! RTP packet sequencer.
23
class
Sequencer
:
public
packet::ISequencer
,
public
core::NonCopyable
<> {
24
public
:
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,
34
packet::stream_timestamp_t
duration);
35
36
private
:
37
Identity
& identity_;
38
39
const
unsigned
int
payload_type_;
40
packet::seqnum_t
seqnum_;
41
packet::stream_timestamp_t
stream_ts_;
42
43
bool
valid_;
44
};
45
46
}
// namespace rtp
47
}
// namespace roc
48
49
#endif
// ROC_RTP_SEQUENCER_H_
roc::core::NonCopyable
Base class for non-copyable objects.
Definition
noncopyable.h:23
roc::packet::ISequencer
Packet sequencer. Fills protocol-specific packet headers to form a continous sequence....
Definition
isequencer.h:24
roc::packet::Packet
Packet.
Definition
packet.h:39
roc::rtp::Identity
RTP participant identity.
Definition
identity.h:23
roc::rtp::Sequencer::next
virtual void next(packet::Packet &packet, core::nanoseconds_t capture_ts, packet::stream_timestamp_t duration)
Fill next packet.
roc::rtp::Sequencer::is_valid
bool is_valid() const
Check if was constructed successfully.
roc::rtp::Sequencer::Sequencer
Sequencer(Identity &identity, unsigned int payload_type)
Initialize.
identity.h
RTP participant identity.
isequencer.h
Packet sequencer.
roc::core::nanoseconds_t
int64_t nanoseconds_t
Nanoseconds.
Definition
time.h:58
roc::packet
Network packets and packet processing.
roc::packet::seqnum_t
uint16_t seqnum_t
Packet sequence number.
Definition
units.h:78
roc::packet::stream_timestamp_t
uint32_t stream_timestamp_t
Packet stream timestamp.
Definition
units.h:36
roc::rtp
RTP protocol support.
roc
Root namespace.
noncopyable.h
Non-copyable object.
roc_rtp
sequencer.h
Generated by
1.17.0