Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
port_utils.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 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/port_utils.h
10 //! @brief Validate port protocols consistency.
11 
12 #ifndef ROC_PIPELINE_PORT_UTILS_H_
13 #define ROC_PIPELINE_PORT_UTILS_H_
14 
15 #include "roc_packet/fec.h"
16 #include "roc_pipeline/port.h"
17 
18 namespace roc {
19 namespace pipeline {
20 
21 //! Get FEC scheme for given protocol.
23 
24 //! Validate consistency of a single port and FEC scheme.
25 bool validate_port(packet::FECScheme fec_scheme,
26  PortProtocol port_protocol,
27  PortType port_type);
28 
29 //! Validate consistency of two ports and FEC scheme.
30 bool validate_ports(packet::FECScheme fec_scheme,
31  PortProtocol source_port,
32  PortProtocol repair_port);
33 
34 } // namespace pipeline
35 } // namespace roc
36 
37 #endif // ROC_PIPELINE_PORT_UTILS_H_
PortProtocol
Port protocol.
Definition: port.h:28
bool validate_ports(packet::FECScheme fec_scheme, PortProtocol source_port, PortProtocol repair_port)
Validate consistency of two ports and FEC scheme.
Root namespace.
bool validate_port(packet::FECScheme fec_scheme, PortProtocol port_protocol, PortType port_type)
Validate consistency of a single port and FEC scheme.
Port constants.
FEC packet.
FECScheme
FECFRAME scheme.
Definition: fec.h:23
packet::FECScheme port_fec_scheme(PortProtocol proto)
Get FEC scheme for given protocol.
PortType
Port type.
Definition: port.h:19