Mercurial > libavcodec.hg
annotate xiph.h @ 4786:95f58f0b70fc libavcodec
remove compound literals gcc 2.95 doesnt support taking an address of a compound literal
and the current code was my fault as i suggested the student to use compound literals
beliving gcc 2.95 supports them completely ...
author | michael |
---|---|
date | Thu, 05 Apr 2007 00:09:48 +0000 |
parents | 7595ead28402 |
children | 9ecbfc0c82bf |
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 |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
21 #include "common.h" |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
22 |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
23 /** |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
24 * 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
|
25 * Xiph codecs use. (e.g. Theora and Vorbis) |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
26 * Works both with Matroska's packing and lavc's packing. |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
27 * |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
28 * @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
|
29 * @param[in] extradata_size The size of the extradata buffer |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
30 * @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
|
31 * differentiate between the Matroska packing and lavc packing. |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
32 * @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
|
33 * @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
|
34 * @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
|
35 */ |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
36 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
|
37 int first_header_size, uint8_t *header_start[3], |
7595ead28402
extract vorbis header spliting code into a reusable function
aurel
parents:
diff
changeset
|
38 int header_len[3]); |