1 /*
2 * Copyright (c) 2011 Stefano Sabatini
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 /**
22 * @file
23 * filter for showing textual audio frame information
24 */
25
26 #include <inttypes.h>
27 #include <stddef.h>
28
39
43
45 /**
46 * Scratch space for individual plane checksums for planar audio
47 */
50
52 {
55 }
56
58 {
60
62
65 return;
66 }
67
69 switch (enc) {
78 }
79 }
80
82 {
84
86 if (sd->
size <
sizeof(*di)) {
88 return;
89 }
90
92
99 }
100
102 "surround %f (%f ltrt) - lfe %f",
106 }
107
109 {
111 if (gain == INT32_MIN)
113 else
116 }
117
119 {
121 if (!peak)
123 else
126 }
127
129 {
131
133 if (sd->
size <
sizeof(*rg)) {
135 return;
136 }
138
143 }
144
146 {
148
150 if (sd->
size <
sizeof(*ast)) {
152 return;
153 }
155 switch (*ast) {
166 }
167 }
168
170 {
172 }
173
175 {
178 char chlayout_str[128];
179 uint32_t checksum = 0;
183 int data_size = buf->
nb_samples * block_align;
184 int planes = planar ? channels : 1;
185 int i;
187
188 if (!tmp_ptr)
191
192 for (i = 0; i < planes; i++) {
194
198 }
199
202
204 "n:%"PRId64" pts:%s pts_time:%s pos:%"PRId64" "
205 "fmt:%s channels:%d chlayout:%s rate:%d nb_samples:%d "
206 "checksum:%08"PRIX32" ",
212 checksum);
213
215 for (i = 0; i < planes; i++)
218
221
229 }
230
232 }
233
235 }
236
238 {
242 },
244 };
245
247 {
250 },
252 };
253
259 .inputs = inputs,
260 .outputs = outputs,
261 };