Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
t
u
v
Functions
a
b
c
d
e
f
h
i
l
n
o
p
r
s
t
u
v
Variables
Typedefs
Enumerations
a
c
d
f
h
i
l
m
p
r
s
t
v
Enumerator
a
c
d
f
h
i
l
m
p
r
s
t
u
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
a
b
c
d
e
f
h
i
j
l
m
n
o
p
q
r
s
t
u
w
Typedefs
Enumerations
Enumerator
b
c
d
e
f
i
m
n
q
r
s
x
Files
File List
File Members
All
f
o
r
Functions
Variables
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
Loading...
Searching...
No Matches
packet_counter.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2024 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_rtcp/packet_counter.h
10
//! @brief Packet counter.
11
12
#ifndef ROC_RTCP_PACKET_COUNTER_H_
13
#define ROC_RTCP_PACKET_COUNTER_H_
14
15
#include "
roc_core/stddefs.h
"
16
17
namespace
roc
{
18
namespace
rtcp {
19
20
//! Computes number of packets in interval.
21
class
PacketCounter
{
22
public
:
23
//! Initialize.
24
PacketCounter
();
25
26
//! Update and return packet counter.
27
//! @p begin defines interval beginning.
28
//! @p end defines interval end (exclusive).
29
//! Packet counter is computes as the maximum seen distance from begin to end.
30
//! If begin changes, the maximum is cleared.
31
//! If end wraps around 32-bit boundary, this is taken into account.
32
uint64_t
update
(uint32_t begin, uint32_t end);
33
34
private
:
35
bool
first_update_;
36
37
uint64_t begin64_;
38
uint64_t end64_hi_;
39
uint32_t end64_lo_;
40
41
uint64_t counter_;
42
};
21
class
PacketCounter
{
…
};
43
44
}
// namespace rtcp
45
}
// namespace roc
46
47
#endif
// ROC_RTCP_PACKET_COUNTER_H_
roc::rtcp::PacketCounter
Computes number of packets in interval.
Definition
packet_counter.h:21
roc::rtcp::PacketCounter::update
uint64_t update(uint32_t begin, uint32_t end)
Update and return packet counter. begin defines interval beginning. end defines interval end (exclusi...
roc::rtcp::PacketCounter::PacketCounter
PacketCounter()
Initialize.
roc
Root namespace.
stddefs.h
Commonly used types and functions.
roc_rtcp
packet_counter.h
Generated by
1.9.8