Mercurial > mplayer.hg
annotate m_config.h @ 18150:710d4bc5f8c9
Using channel count, samplerate and input bps values from the container
instead of the decoder breaks some DTS samples where the container says
the audio has 6 channels but the decoder gives 2. In this case take the
number of channels from the decoder instead, the output will almost
certainly be badly garbled anyway if the number of channels is wrong.
patch by Uoti Urpala, uoti <<.>> urpala <<@>> pp1 <<.>> inet <<.>> fi
author | diego |
---|---|
date | Wed, 19 Apr 2006 20:12:01 +0000 |
parents | 63909962d3fc |
children | 96568be4bfdc |
rev | line source |
---|---|
10594
57bdcdb061d7
Removed the historic cfgparser and switched full to the new config parser (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies.
alex
parents:
10582
diff
changeset
|
1 #ifndef _M_CONFIG_H |
57bdcdb061d7
Removed the historic cfgparser and switched full to the new config parser (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies.
alex
parents:
10582
diff
changeset
|
2 #define _M_CONFIG_H |
8164 | 3 |
4 typedef struct m_config_option m_config_option_t; | |
5 typedef struct m_config_save_slot m_config_save_slot_t; | |
17471 | 6 typedef struct m_profile m_profile_t; |
8164 | 7 struct m_option; |
8 struct m_option_type; | |
9 | |
10 struct m_config_save_slot { | |
11 m_config_save_slot_t* prev; | |
12 int lvl; | |
13246 | 13 // we have to store other datatypes in this as well, |
14 // so make sure we get properly aligned addresses | |
15 unsigned char data[0] __attribute__ ((aligned (8))); | |
8164 | 16 }; |
17 | |
18 struct m_config_option { | |
19 m_config_option_t* next; | |
20 char* name; // Full name (ie option:subopt) | |
21 struct m_option* opt; | |
22 m_config_save_slot_t* slots; | |
23 unsigned int flags; // currently it only tell if the option was set | |
24 }; | |
25 | |
17471 | 26 struct m_profile { |
27 m_profile_t* next; | |
28 char* name; | |
29 char* desc; | |
30 int num_opts; | |
31 char** opts; | |
32 }; | |
33 | |
8164 | 34 typedef struct m_config { |
35 m_config_option_t* opts; | |
36 int lvl; // Current stack level | |
37 int mode; | |
17471 | 38 m_profile_t* profiles; |
39 int profile_depth; | |
40 struct m_option* self_opts; | |
8164 | 41 } m_config_t; |
42 | |
9912
39444d65c4cb
Don't save restore all options wich point to the same variable.
albeu
parents:
8168
diff
changeset
|
43 #define M_CFG_OPT_SET (1<<0) |
39444d65c4cb
Don't save restore all options wich point to the same variable.
albeu
parents:
8168
diff
changeset
|
44 #define M_CFG_OPT_ALIAS (1<<1) |
39444d65c4cb
Don't save restore all options wich point to the same variable.
albeu
parents:
8168
diff
changeset
|
45 |
8164 | 46 |
47 //////////////////////////// Functions /////////////////////////////////// | |
48 | |
49 m_config_t* | |
50 m_config_new(void); | |
51 | |
52 void | |
53 m_config_free(m_config_t* config); | |
54 | |
55 void | |
56 m_config_push(m_config_t* config); | |
57 | |
58 void | |
59 m_config_pop(m_config_t* config); | |
60 | |
61 int | |
62 m_config_register_options(m_config_t *config, struct m_option *args); | |
63 | |
64 int | |
65 m_config_set_option(m_config_t *config, char* arg, char* param); | |
66 | |
67 int | |
68 m_config_check_option(m_config_t *config, char* arg, char* param); | |
69 | |
70 struct m_option* | |
71 m_config_get_option(m_config_t *config, char* arg); | |
72 | |
8168 | 73 void |
74 m_config_print_option_list(m_config_t *config); | |
75 | |
17471 | 76 m_profile_t* |
77 m_config_get_profile(m_config_t* config, char* name); | |
78 | |
79 m_profile_t* | |
80 m_config_add_profile(m_config_t* config, char* name); | |
81 | |
82 void | |
83 m_profile_set_desc(m_profile_t* p, char* desc); | |
84 | |
85 int | |
86 m_config_set_profile_option(m_config_t* config, m_profile_t* p, | |
87 char* name, char* val); | |
88 | |
10594
57bdcdb061d7
Removed the historic cfgparser and switched full to the new config parser (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies.
alex
parents:
10582
diff
changeset
|
89 #endif /* _M_CONFIG_H */ |