annotate pnm_loader.h @ 36708:9274efe53180

Improve language information on audio and subtitle streams. Extend the language table to transform ISO 639-2 / ISO 639-5 codes into a language name as well, and extend GetLanguage() to be flexible enough to scan for all sorts of language codes.
author ib
date Fri, 07 Feb 2014 19:49:56 +0000
parents 58232aeb3fdd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32427
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
1 /*
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
2 * PNM image files loader
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
3 *
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
4 * This file is part of MPlayer.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
5 *
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
6 * MPlayer is free software; you can redistribute it and/or modify
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
9 * (at your option) any later version.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
10 *
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
11 * MPlayer is distributed in the hope that it will be useful,
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
14 * GNU General Public License for more details.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
15 *
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License along
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
17 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
19 *
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
20 * You can alternatively redistribute this file and/or
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
21 * modify it under the terms of the GNU Lesser General Public
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
22 * License as published by the Free Software Foundation; either
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
23 * version 2.1 of the License, or (at your option) any later version.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
24 */
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
25
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
26 #ifndef MPLAYER_PNM_LOADER_H
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
27 #define MPLAYER_PNM_LOADER_H
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
28
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
29 #include <stdio.h>
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
30 #include <stdint.h>
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
31
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
32 /**
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
33 * Read a "portable anymap" image.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
34 * Supports raw PGM (P5) and PNM (P6).
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
35 *
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
36 * @param[in] f input stream.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
37 * @param[out] width width of the loaded image.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
38 * @param[out] height height of the loaded image.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
39 * @param[out] bytes_per_pixel format of the loaded image.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
40 * @param[out] maxval maximum pixel value; possible values are:
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
41 * 1 for 8 bits gray,
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
42 * 2 for 16 bits gray,
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
43 * 3 for 8 bits per component RGB,
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
44 * 6 for 16 bits per component RGB.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
45 * @return a newly allocated array of
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
46 * width*height*bytes_per_pixel bytes,
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
47 * or NULL in case of error.
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
48 */
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
49 uint8_t *read_pnm(FILE *f, int *width, int *height,
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
50 int *bytes_per_pixel, int *maxval);
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
51
58232aeb3fdd Move the read_pnm function into a separate file.
cigaes
parents:
diff changeset
52 #endif /* MPLAYER_PNM_LOADER_H */