Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Toggle main menu visibility
Loading...
Searching...
No Matches
composer.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022 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/composer.h
10
//! @brief RTCP packet composer.
11
12
#ifndef ROC_RTCP_COMPOSER_H_
13
#define ROC_RTCP_COMPOSER_H_
14
15
#include "
roc_core/noncopyable.h
"
16
#include "
roc_packet/icomposer.h
"
17
18
namespace
roc
{
19
namespace
rtcp
{
20
21
//! RTCP packet composer.
22
//!
23
//! @remarks
24
//! Unlike other composers, this one expects that the buffer already contains valid
25
//! RTCP compound packet. The actual composing is done earlier in rtcp::Communicator
26
//! using rtcp::Builder.
27
class
Composer
:
public
packet::IComposer
,
public
core::NonCopyable
<> {
28
public
:
29
//! Initialization.
30
Composer
();
31
32
//! Adjust buffer to align payload.
33
virtual
bool
34
align
(
core::Slice<uint8_t>
& buffer,
size_t
header_size,
size_t
payload_alignment);
35
36
//! Prepare buffer for composing a packet.
37
virtual
bool
38
prepare
(
packet::Packet
&
packet
,
core::Slice<uint8_t>
& buffer,
size_t
payload_size);
39
40
//! Pad packet.
41
virtual
bool
pad
(
packet::Packet
&
packet
,
size_t
padding_size);
42
43
//! Compose packet to buffer.
44
virtual
bool
compose
(
packet::Packet
&
packet
);
45
};
46
47
}
// namespace rtcp
48
}
// namespace roc
49
50
#endif
// ROC_RTCP_COMPOSER_H_
roc::core::NonCopyable
Base class for non-copyable objects.
Definition
noncopyable.h:23
roc::core::Slice
Slice.
Definition
slice.h:55
roc::packet::IComposer
Packet composer interface.
Definition
icomposer.h:22
roc::packet::Packet
Packet.
Definition
packet.h:39
roc::rtcp::Composer::align
virtual bool align(core::Slice< uint8_t > &buffer, size_t header_size, size_t payload_alignment)
Adjust buffer to align payload.
roc::rtcp::Composer::compose
virtual bool compose(packet::Packet &packet)
Compose packet to buffer.
roc::rtcp::Composer::Composer
Composer()
Initialization.
roc::rtcp::Composer::prepare
virtual bool prepare(packet::Packet &packet, core::Slice< uint8_t > &buffer, size_t payload_size)
Prepare buffer for composing a packet.
roc::rtcp::Composer::pad
virtual bool pad(packet::Packet &packet, size_t padding_size)
Pad packet.
icomposer.h
Packet composer interface.
roc::packet
Network packets and packet processing.
roc::rtcp
RTCP protocol support.
roc
Root namespace.
noncopyable.h
Non-copyable object.
roc_rtcp
composer.h
Generated by
1.17.0