QuickTime in24 and in32 PCM audio support
[mplayer/glamo.git] / m_config.h
blob3abb5dd4352b32b0689853724500dc8fcb2a7e81
1 #ifndef _M_CONFIG_H
2 #define _M_CONFIG_H
4 typedef struct m_config_option m_config_option_t;
5 typedef struct m_config_save_slot m_config_save_slot_t;
6 typedef struct m_profile m_profile_t;
7 struct m_option;
8 struct m_option_type;
10 struct m_config_save_slot {
11 m_config_save_slot_t* prev;
12 int lvl;
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)));
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
26 struct m_profile {
27 m_profile_t* next;
28 char* name;
29 char* desc;
30 int num_opts;
31 char** opts;
34 typedef struct m_config {
35 m_config_option_t* opts;
36 int lvl; // Current stack level
37 int mode;
38 m_profile_t* profiles;
39 int profile_depth;
40 struct m_option* self_opts;
41 } m_config_t;
43 #define M_CFG_OPT_SET (1<<0)
44 #define M_CFG_OPT_ALIAS (1<<1)
47 //////////////////////////// Functions ///////////////////////////////////
49 m_config_t*
50 m_config_new(void);
52 void
53 m_config_free(m_config_t* config);
55 void
56 m_config_push(m_config_t* config);
58 void
59 m_config_pop(m_config_t* config);
61 int
62 m_config_register_options(m_config_t *config, struct m_option *args);
64 int
65 m_config_set_option(m_config_t *config, char* arg, char* param);
67 int
68 m_config_check_option(m_config_t *config, char* arg, char* param);
70 struct m_option*
71 m_config_get_option(m_config_t *config, char* arg);
73 void
74 m_config_print_option_list(m_config_t *config);
76 m_profile_t*
77 m_config_get_profile(m_config_t* config, char* name);
79 m_profile_t*
80 m_config_add_profile(m_config_t* config, char* name);
82 void
83 m_profile_set_desc(m_profile_t* p, char* desc);
85 int
86 m_config_set_profile_option(m_config_t* config, m_profile_t* p,
87 char* name, char* val);
89 #endif /* _M_CONFIG_H */