annotate mpeg4audio.h @ 8551:bf580075909f libavcodec

Only #include svq3.c if the SVQ3 decoder is enabled.
author diego
date Wed, 07 Jan 2009 23:03:04 +0000
parents c4a4495715dd
children a5c709bba8e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6558
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
1 /*
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
2 * MPEG-4 Audio common header
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
3 * Copyright (c) 2008 Baptiste Coudurier <baptiste.coudurier@free.fr>
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
4 *
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
5 * This file is part of FFmpeg.
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
6 *
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
11 *
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
15 * Lesser General Public License for more details.
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
16 *
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
20 */
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
21
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 6558
diff changeset
22 #ifndef AVCODEC_MPEG4AUDIO_H
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 6558
diff changeset
23 #define AVCODEC_MPEG4AUDIO_H
6558
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
24
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
25 #include <stdint.h>
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
26
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
27 typedef struct {
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
28 int object_type;
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
29 int sampling_index;
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
30 int sample_rate;
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
31 int chan_config;
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
32 int sbr; //< -1 implicit, 1 presence
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
33 int ext_object_type;
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
34 int ext_sampling_index;
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
35 int ext_sample_rate;
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
36 } MPEG4AudioConfig;
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
37
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
38 extern const int ff_mpeg4audio_sample_rates[16];
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
39 extern const uint8_t ff_mpeg4audio_channels[8];
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
40 /**
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
41 * Parse MPEG-4 systems extradata to retrieve audio configuration.
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
42 * @param[in] c MPEG4AudioConfig structure to fill.
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
43 * @param[in] buf Extradata from container.
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
44 * @param[in] buf_size Extradata size.
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
45 * @return On error -1 is returned, on success AudioSpecificConfig bit index in extradata.
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
46 */
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
47 int ff_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, int buf_size);
06b1e0371e90 mpeg4audio common code
bcoudurier
parents:
diff changeset
48
7760
c4a4495715dd Globally rename the header inclusion guard names.
stefano
parents: 6558
diff changeset
49 #endif /* AVCODEC_MPEG4AUDIO_H */