annotate codec-cfg.h @ 33783:a450fade6a83

Fix memory leaks in the Win32 GUI. This closes Bugzilla #1312.
author ib
date Mon, 11 Jul 2011 11:10:06 +0000
parents 0fd1b3f1fe69
children 6b13e41172e2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30429
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
1 /*
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
2 * This file is part of MPlayer.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
3 *
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
5 * it under the terms of the GNU General Public License as published by
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
7 * (at your option) any later version.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
8 *
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
12 * GNU General Public License for more details.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
13 *
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
14 * You should have received a copy of the GNU General Public License along
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
17 */
c1a3f1bbba26 Add license header to all top-level files missing them.
diego
parents: 27334
diff changeset
18
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25661
diff changeset
19 #ifndef MPLAYER_CODEC_CFG_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25661
diff changeset
20 #define MPLAYER_CODEC_CFG_H
297
9b00ddddc0b2 imported codec-cfg, small fixes
arpi_esp
parents:
diff changeset
21
31077
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
22 #define CODECS_MAX_FOURCC 92
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
23 #define CODECS_MAX_OUTFMT 16
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
24 #define CODECS_MAX_INFMT 16
297
9b00ddddc0b2 imported codec-cfg, small fixes
arpi_esp
parents:
diff changeset
25
303
828ec81e0d64 codecs.conf support
arpi_esp
parents: 300
diff changeset
26 // Global flags:
31077
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
27 #define CODECS_FLAG_SEEKABLE (1<<0)
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
28 #define CODECS_FLAG_ALIGN16 (1<<1)
297
9b00ddddc0b2 imported codec-cfg, small fixes
arpi_esp
parents:
diff changeset
29
303
828ec81e0d64 codecs.conf support
arpi_esp
parents: 300
diff changeset
30 // Outfmt flags:
31077
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
31 #define CODECS_FLAG_FLIP (1<<0)
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
32 #define CODECS_FLAG_NOFLIP (1<<1)
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
33 #define CODECS_FLAG_YUVHACK (1<<2)
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
34 #define CODECS_FLAG_QUERY (1<<3)
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
35 #define CODECS_FLAG_STATIC (1<<4)
299
3343fb3e4f49 outflags[] reading fixed
arpi_esp
parents: 297
diff changeset
36
31077
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
37 #define CODECS_STATUS__MIN 0
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
38 #define CODECS_STATUS_NOT_WORKING -1
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
39 #define CODECS_STATUS_PROBLEMS 0
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
40 #define CODECS_STATUS_WORKING 1
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
41 #define CODECS_STATUS_UNTESTED 2
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
42 #define CODECS_STATUS__MAX 2
316
589a93489054 status added
szabii
parents: 303
diff changeset
43
299
3343fb3e4f49 outflags[] reading fixed
arpi_esp
parents: 297
diff changeset
44
31400
f6864e52d6be Move codecs_file extern variable declaration to codec-cfg.h.
diego
parents: 31077
diff changeset
45 extern char *codecs_file;
f6864e52d6be Move codecs_file extern variable declaration to codec-cfg.h.
diego
parents: 31077
diff changeset
46
f6864e52d6be Move codecs_file extern variable declaration to codec-cfg.h.
diego
parents: 31077
diff changeset
47
12358
133e0ebde74d Make it compile on mingw again. Now it is finally possible to include windows.h in mplayer.c
faust3
parents: 10467
diff changeset
48 #if !defined(GUID_TYPE) && !defined(GUID_DEFINED)
31077
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
49 #define GUID_TYPE 1
13591
ba6b9cc1b3d0 fix compilation on mingw
faust3
parents: 12358
diff changeset
50 #define GUID_DEFINED 1
297
9b00ddddc0b2 imported codec-cfg, small fixes
arpi_esp
parents:
diff changeset
51 typedef struct {
31077
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
52 unsigned long f1;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
53 unsigned short f2;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
54 unsigned short f3;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
55 unsigned char f4[8];
297
9b00ddddc0b2 imported codec-cfg, small fixes
arpi_esp
parents:
diff changeset
56 } GUID;
1836
7c1671842ee7 GUID fix
arpi
parents: 1828
diff changeset
57 #endif
7c1671842ee7 GUID fix
arpi
parents: 1828
diff changeset
58
297
9b00ddddc0b2 imported codec-cfg, small fixes
arpi_esp
parents:
diff changeset
59
30710
c6524b71a9da cosmetics: Rename "codecs_st" struct to just plain "codecs".
diego
parents: 30429
diff changeset
60 typedef struct codecs {
31077
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
61 unsigned int fourcc[CODECS_MAX_FOURCC];
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
62 unsigned int fourccmap[CODECS_MAX_FOURCC];
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
63 unsigned int outfmt[CODECS_MAX_OUTFMT];
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
64 unsigned char outflags[CODECS_MAX_OUTFMT];
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
65 unsigned int infmt[CODECS_MAX_INFMT];
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
66 unsigned char inflags[CODECS_MAX_INFMT];
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
67 char *name;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
68 char *info;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
69 char *comment;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
70 char *dll;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
71 char* drv;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
72 GUID guid;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
73 // short driver;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
74 short flags;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
75 short status;
dd7f15a3fb1b the great MPlayer tab removal: part II
diego
parents: 30710
diff changeset
76 short cpuflags;
297
9b00ddddc0b2 imported codec-cfg, small fixes
arpi_esp
parents:
diff changeset
77 } codecs_t;
9b00ddddc0b2 imported codec-cfg, small fixes
arpi_esp
parents:
diff changeset
78
18980
ed69754aa58d Marks several string parameters as const when they are not modified in the function, Patch by Stefan Huehner, stefan AT huehner-org
reynaldo
parents: 18581
diff changeset
79 int parse_codec_cfg(const char *cfgfile);
16321
efbfac98cab1 Allow forcing of demuxers and codecs by prepending '+'
reimar
parents: 16132
diff changeset
80 codecs_t* find_video_codec(unsigned int fourcc, unsigned int *fourccmap,
efbfac98cab1 Allow forcing of demuxers and codecs by prepending '+'
reimar
parents: 16132
diff changeset
81 codecs_t *start, int force);
efbfac98cab1 Allow forcing of demuxers and codecs by prepending '+'
reimar
parents: 16132
diff changeset
82 codecs_t* find_audio_codec(unsigned int fourcc, unsigned int *fourccmap,
efbfac98cab1 Allow forcing of demuxers and codecs by prepending '+'
reimar
parents: 16132
diff changeset
83 codecs_t *start, int force);
efbfac98cab1 Allow forcing of demuxers and codecs by prepending '+'
reimar
parents: 16132
diff changeset
84 codecs_t* find_codec(unsigned int fourcc, unsigned int *fourccmap,
efbfac98cab1 Allow forcing of demuxers and codecs by prepending '+'
reimar
parents: 16132
diff changeset
85 codecs_t *start, int audioflag, int force);
1983
72f0648df475 -ac help / -vc help
arpi
parents: 1948
diff changeset
86 void list_codecs(int audioflag);
17566
f580a7755ac5 Patch by Stefan Huehner / stefan % huehner ! org \
rathann
parents: 16321
diff changeset
87 void codecs_uninit_free(void);
297
9b00ddddc0b2 imported codec-cfg, small fixes
arpi_esp
parents:
diff changeset
88
25661
293aeec83153 Replace the persistent CODECS_FLAG_SELECTED by a local "stringset" with
reimar
parents: 23870
diff changeset
89 typedef char ** stringset_t;
293aeec83153 Replace the persistent CODECS_FLAG_SELECTED by a local "stringset" with
reimar
parents: 23870
diff changeset
90 void stringset_init(stringset_t *set);
293aeec83153 Replace the persistent CODECS_FLAG_SELECTED by a local "stringset" with
reimar
parents: 23870
diff changeset
91 void stringset_free(stringset_t *set);
293aeec83153 Replace the persistent CODECS_FLAG_SELECTED by a local "stringset" with
reimar
parents: 23870
diff changeset
92 void stringset_add(stringset_t *set, const char *str);
293aeec83153 Replace the persistent CODECS_FLAG_SELECTED by a local "stringset" with
reimar
parents: 23870
diff changeset
93 int stringset_test(stringset_t *set, const char *str);
293aeec83153 Replace the persistent CODECS_FLAG_SELECTED by a local "stringset" with
reimar
parents: 23870
diff changeset
94
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25661
diff changeset
95 #endif /* MPLAYER_CODEC_CFG_H */