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/iallocator.h"
20#include "roc_rtp/headers.h"
21
22namespace roc {
23namespace rtp {
24
25//! RTP payload format.
26struct Format {
27 //! 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::IAllocator& allocator);
41
42 //! Create frame decoder.
43 audio::IFrameDecoder* (*new_decoder)(core::IAllocator& allocator);
44
45 //! Initialize.
47 : payload_type()
48 , packet_flags()
49 , new_encoder()
50 , new_decoder() {
51 }
52};
53
54} // namespace rtp
55} // namespace roc
56
57#endif // ROC_RTP_FORMAT_H_
Audio frame decoder interface.
Audio frame encoder interface.
Sample stream specification. Defines sample rate and channel layout.
Definition sample_spec.h:24
Memory allocator interface.
Definition iallocator.h:23
Memory allocator interface.
Audio frame decoder interface.
Audio frame encoder interface.
PayloadType
RTP payload type.
Definition headers.h:29
Root namespace.
PCM format.
RTP headers.
Sample specifications.
PCM format description.
Definition pcm_format.h:58
RTP payload format.
Definition format.h:26
Format()
Initialize.
Definition format.h:46
PayloadType payload_type
Payload type.
Definition format.h:28
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::IFrameEncoder *(* new_encoder)(core::IAllocator &allocator)
Create frame encoder.
Definition format.h:40
audio::IFrameDecoder *(* new_decoder)(core::IAllocator &allocator)
Create frame decoder.
Definition format.h:43
unsigned packet_flags
Packet flags.
Definition format.h:37