Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
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
19#include "roc_core/iarena.h"
20#include "roc_rtp/headers.h"
21
22namespace roc {
23namespace rtp {
24
25//! RTP payload format.
26struct Format {
27 //! Payload type.
28 unsigned int payload_type;
29
30 //! Sample encoding and endian.
32
33 //! Sample rate and channel mask.
35
36 //! Packet flags.
37 unsigned packet_flags;
38
39 //! Create frame encoder.
40 audio::IFrameEncoder* (*new_encoder)(core::IArena& arena,
43
44 //! Create frame decoder.
45 audio::IFrameDecoder* (*new_decoder)(core::IArena& arena,
48
49 //! Initialize.
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_
Audio frame decoder interface.
Audio frame encoder interface.
Sample specification. Describes sample rate and channels.
Definition sample_spec.h:26
Memory arena interface.
Definition iarena.h:23
Memory arena interface.
Audio frame decoder interface.
Audio frame encoder interface.
Root namespace.
PCM format.
RTP headers.
Sample specifications.
PCM format description.
Definition pcm_format.h:61
RTP payload format.
Definition format.h:26
Format()
Initialize.
Definition format.h:50
audio::SampleSpec sample_spec
Sample rate and channel mask.
Definition format.h:34
audio::PcmFormat pcm_format
Sample encoding and endian.
Definition format.h:31
audio::IFrameDecoder *(* new_decoder)(core::IArena &arena, const audio::PcmFormat &pcm_format, const audio::SampleSpec &sample_spec)
Create frame decoder.
Definition format.h:45
unsigned packet_flags
Packet flags.
Definition format.h:37
audio::IFrameEncoder *(* new_encoder)(core::IArena &arena, const audio::PcmFormat &pcm_format, const audio::SampleSpec &sample_spec)
Create frame encoder.
Definition format.h:40
unsigned int payload_type
Payload type.
Definition format.h:28