Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
format.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 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.h
10
//! @brief RTP payload format.
11
12
#ifndef ROC_RTP_FORMAT_H_
13
#define ROC_RTP_FORMAT_H_
14
15
#include "
roc_audio/iframe_decoder.h
"
16
#include "
roc_audio/iframe_encoder.h
"
17
#include "
roc_audio/pcm_format.h
"
18
#include "
roc_audio/sample_spec.h
"
19
#include "
roc_core/iarena.h
"
20
#include "
roc_rtp/headers.h
"
21
22
namespace
roc
{
23
namespace
rtp {
24
25
//! RTP payload format.
26
struct
Format
{
27
//! Payload type.
28
unsigned
int
payload_type
;
29
30
//! Sample encoding and endian.
31
audio::PcmFormat
pcm_format
;
32
33
//! Sample rate and channel mask.
34
audio::SampleSpec
sample_spec
;
35
36
//! Packet flags.
37
unsigned
packet_flags
;
38
39
//! Create frame encoder.
40
audio::IFrameEncoder
* (*new_encoder)(
core::IArena
& arena,
41
const
audio::PcmFormat
&
pcm_format
,
42
const
audio::SampleSpec
&
sample_spec
);
43
44
//! Create frame decoder.
45
audio::IFrameDecoder
* (*new_decoder)(
core::IArena
& arena,
46
const
audio::PcmFormat
&
pcm_format
,
47
const
audio::SampleSpec
&
sample_spec
);
48
49
//! Initialize.
50
Format
()
51
:
payload_type
(0)
52
,
packet_flags
(0)
53
,
new_encoder
(NULL)
54
,
new_decoder
(NULL) {
55
}
56
};
57
58
}
// namespace rtp
59
}
// namespace roc
60
61
#endif
// ROC_RTP_FORMAT_H_
roc::audio::IFrameDecoder
Audio frame decoder interface.
Definition:
iframe_decoder.h:24
roc::audio::IFrameEncoder
Audio frame encoder interface.
Definition:
iframe_encoder.h:24
roc::audio::SampleSpec
Sample specification. Describes sample rate and channels.
Definition:
sample_spec.h:26
roc::core::IArena
Memory arena interface.
Definition:
iarena.h:23
iarena.h
Memory arena interface.
iframe_decoder.h
Audio frame decoder interface.
iframe_encoder.h
Audio frame encoder interface.
roc
Root namespace.
pcm_format.h
PCM format.
headers.h
RTP headers.
sample_spec.h
Sample specifications.
roc::audio::PcmFormat
PCM format description.
Definition:
pcm_format.h:61
roc::rtp::Format
RTP payload format.
Definition:
format.h:26
roc::rtp::Format::new_encoder
audio::IFrameEncoder *(* new_encoder)(core::IArena &arena, const audio::PcmFormat &pcm_format, const audio::SampleSpec &sample_spec)
Create frame encoder.
Definition:
format.h:40
roc::rtp::Format::Format
Format()
Initialize.
Definition:
format.h:50
roc::rtp::Format::sample_spec
audio::SampleSpec sample_spec
Sample rate and channel mask.
Definition:
format.h:34
roc::rtp::Format::pcm_format
audio::PcmFormat pcm_format
Sample encoding and endian.
Definition:
format.h:31
roc::rtp::Format::new_decoder
audio::IFrameDecoder *(* new_decoder)(core::IArena &arena, const audio::PcmFormat &pcm_format, const audio::SampleSpec &sample_spec)
Create frame decoder.
Definition:
format.h:45
roc::rtp::Format::packet_flags
unsigned packet_flags
Packet flags.
Definition:
format.h:37
roc::rtp::Format::payload_type
unsigned int payload_type
Payload type.
Definition:
format.h:28
roc_rtp
format.h
Generated by
1.9.1