Mercurial > libavcodec.hg
annotate xiph.h @ 7473:e2f3016867a0 libavcodec
Read bitstream parameters for E-AC-3 streams before returning an error.
author | jbr |
---|---|
date | Sun, 03 Aug 2008 22:29:06 +0000 |
parents | f7cbb7733146 |
children | c4a4495715dd |
rev | line source |
---|---|
4722
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
1 /* |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
2 * Copyright (C) 2007 FFmpeg Project |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
3 * |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
4 * This file is part of FFmpeg. |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
5 * |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
6 * FFmpeg is free software; you can redistribute it and/or |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
8 * License as published by the Free Software Foundation; either |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
9 * version 2.1 of the License, or (at your option) any later version. |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
10 * |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
11 * FFmpeg is distributed in the hope that it will be useful, |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
14 * Lesser General Public License for more details. |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
15 * |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
17 * License along with FFmpeg; if not, write to the Free Software |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
19 */ |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
20 |
5830
1d83e9c34641
Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents:
5169
diff
changeset
|
21 #ifndef FFMPEG_XIPH_H |
1d83e9c34641
Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents:
5169
diff
changeset
|
22 #define FFMPEG_XIPH_H |
5163 | 23 |
6763 | 24 #include "libavutil/common.h" |
4722
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
25 |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
26 /** |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
27 * Splits a single extradata buffer into the three headers that most |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
28 * Xiph codecs use. (e.g. Theora and Vorbis) |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
29 * Works both with Matroska's packing and lavc's packing. |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
30 * |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
31 * @param[in] extradata The single chunk that combines all three headers |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
32 * @param[in] extradata_size The size of the extradata buffer |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
33 * @param[in] first_header_size The size of the first header, used to |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
34 * differentiate between the Matroska packing and lavc packing. |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
35 * @param[out] header_start Pointers to the start of the three separate headers. |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
36 * @param[out] header_len The sizes of each of the three headers. |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
37 * @return On error a negative value is returned, on success zero. |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
38 */ |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
39 int ff_split_xiph_headers(uint8_t *extradata, int extradata_size, |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
40 int first_header_size, uint8_t *header_start[3], |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
41 int header_len[3]); |
5163 | 42 |
5830
1d83e9c34641
Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents:
5169
diff
changeset
|
43 #endif /* FFMPEG_XIPH_H */ |