FFmpeg: libavformat/iamf.h Source File
Go to the documentation of this file. 1 /*
2 * Immersive Audio Model and Formats common helpers and structs
3 * Copyright (c) 2023 James Almer <jamrial@gmail.com>
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #ifndef AVFORMAT_IAMF_H
23 #define AVFORMAT_IAMF_H
24
25 #include <stddef.h>
26 #include <stdint.h>
27
33
34 #define MAX_IAMF_OBU_HEADER_SIZE (1 + 8 * 3)
35
36 // OBU types (section 3.2).
62 // 24~30 reserved.
64 };
65
76
81
84
85 // demux
88
91 /**
92 * element backs celement iff the AVIAMFAudioElement
93 * is owned by this structure.
94 */
97
100
102
106
109 /**
110 * mix backs cmix iff the AVIAMFMixPresentation
111 * is owned by this structure.
112 */
115
116 // demux
120
127
138
143 };
144
160 };
161
165 };
166
171
173 unsigned int codec_config_id)
174 {
176
177 for (
int i = 0;
i <
c->nb_codec_configs;
i++) {
178 if (
c->codec_configs[
i]->codec_config_id == codec_config_id)
179 codec_config =
c->codec_configs[
i];
180 }
181
182 return codec_config;
183 }
184
186 unsigned int parameter_id)
187 {
189
193 break;
194 }
195
197 }
198
203
204 #endif /* AVFORMAT_IAMF_H */
#define FF_VISIBILITY_PUSH_HIDDEN
This struct describes the properties of an encoded stream.
unsigned int nb_substreams
AVIAMFParamDefinition * param
Parameters as defined in section 3.6.1 of IAMF.
enum IAMF_Sound_System id
const AVIAMFMixPresentation * cmix
AVIAMFAudioElement * element
element backs celement iff the AVIAMFAudioElement is owned by this structure.
IAMFAudioElement ** audio_elements
unsigned int audio_substream_id
unsigned int substream_count
unsigned int audio_element_id
const AVIAMFAudioElement * celement
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
AVCodecID
Identify the syntax and semantics of the bitstream.
An AVChannelLayout holds information about the channel layout of audio data.
unsigned int coupled_substream_count
IAMFSubStream * substreams
Information on how to combine one or more audio streams, as defined in section 3.6 of IAMF.
#define FF_VISIBILITY_POP_HIDDEN
IAMFParamDefinition ** param_definitions
const IAMFAudioElement * audio_element
#define i(width, name, range_min, range_max)
unsigned int parameter_id
Identifier for the parameter substream.
Information on how to render and mix one or more AVIAMFAudioElement to generate the final audio outpu...
static int param_definition(const IAMFContext *iamf, const IAMFParamDefinition *param_def, AVIOContext *dyn_bc, void *log_ctx)
IAMFCodecConfig ** codec_configs
IAMFMixPresentation ** mix_presentations
unsigned int codec_config_id
AVIAMFMixPresentation * mix
mix backs cmix iff the AVIAMFMixPresentation is owned by this structure.
AVCodecParameters * codecpar
unsigned int mix_presentation_id
Generated on Tue Nov 18 2025 19:23:27 for FFmpeg by
doxygen
1.8.17