Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
format_map.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2017 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/format_map.h
10
//! @brief RTP payload format map.
11
12
#ifndef ROC_RTP_FORMAT_MAP_H_
13
#define ROC_RTP_FORMAT_MAP_H_
14
15
#include "
roc_core/noncopyable.h
"
16
#include "
roc_rtp/format.h
"
17
18
namespace
roc
{
19
namespace
rtp {
20
21
//! RTP payload format map.
22
class
FormatMap
:
public
core::NonCopyable
<> {
23
public
:
24
FormatMap
();
25
26
//! Get format by payload type.
27
//! @returns
28
//! pointer to the format structure or null if there is no format
29
//! registered for this payload type.
30
const
Format
*
format
(
unsigned
int
pt)
const
;
31
32
private
:
33
enum
{ MaxFormats = 2 };
34
35
Format
formats_[MaxFormats];
36
size_t
n_formats_;
37
38
void
add_(
const
Format
& fmt);
39
};
40
41
}
// namespace rtp
42
}
// namespace roc
43
44
#endif
// ROC_RTP_FORMAT_MAP_H_
roc::core::NonCopyable
Base class for non-copyable objects.
Definition:
noncopyable.h:23
roc::rtp::FormatMap
RTP payload format map.
Definition:
format_map.h:22
roc::rtp::FormatMap::format
const Format * format(unsigned int pt) const
Get format by payload type.
format.h
RTP payload format.
roc
Root namespace.
noncopyable.h
Non-copyable object.
roc::rtp::Format
RTP payload format.
Definition:
format.h:26
roc_rtp
format_map.h
Generated by
1.9.6