Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
sender_port.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 Roc 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_pipeline/sender_port.h
10//! @brief Sender port pipeline.
11
12#ifndef ROC_PIPELINE_SENDER_PORT_H_
13#define ROC_PIPELINE_SENDER_PORT_H_
14
15#include "roc_core/iallocator.h"
17#include "roc_core/unique_ptr.h"
19#include "roc_packet/iwriter.h"
20#include "roc_pipeline/config.h"
21#include "roc_rtp/composer.h"
22
23namespace roc {
24namespace pipeline {
25
26//! Sender port pipeline.
27//! @remarks
28//! Created at the sender side for every sending port.
30public:
31 //! Initialize.
32 SenderPort(const PortConfig& config,
33 packet::IWriter& writer,
34 core::IAllocator& allocator);
35
36 //! Check if the port pipeline was succefully constructed.
37 bool valid() const;
38
39 //! Get packet composer.
41
42 //! Write packet.
43 void write(const packet::PacketPtr& packet);
44
45private:
46 const packet::Address dst_address_;
47
48 packet::IWriter& writer_;
49 packet::IComposer* composer_;
50
53};
54
55} // namespace pipeline
56} // namespace roc
57
58#endif // ROC_PIPELINE_SENDER_PORT_H_
Memory allocator interface.
Definition: iallocator.h:23
Base class for non-copyable objects.
Definition: noncopyable.h:23
Unique ownrship pointer.
Definition: unique_ptr.h:27
Network address.
Definition: address.h:24
Packet composer interface.
Definition: icomposer.h:22
Packet writer interface.
Definition: iwriter.h:21
Sender port pipeline.
Definition: sender_port.h:29
SenderPort(const PortConfig &config, packet::IWriter &writer, core::IAllocator &allocator)
Initialize.
void write(const packet::PacketPtr &packet)
Write packet.
packet::IComposer & composer()
Get packet composer.
bool valid() const
Check if the port pipeline was succefully constructed.
Memory allocator interface.
Packet composer interface.
Root namespace.
Non-copyable object.
Packet writer interface.
Pipeline config.
RTP packet composer.
Port parameters.
Definition: config.h:56
Unique ownrship pointer.