diff options
Diffstat (limited to 'apps/enc_config.h')
-rw-r--r-- | apps/enc_config.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/apps/enc_config.h b/apps/enc_config.h new file mode 100644 index 0000000000..53fa7638e9 --- /dev/null +++ b/apps/enc_config.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 Michael Sevakis | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | #ifndef ENC_CONFIG_H | ||
20 | #define ENC_CONFIG_H | ||
21 | |||
22 | #include "misc.h" | ||
23 | #include "enc_base.h" | ||
24 | |||
25 | /** Capabilities **/ | ||
26 | |||
27 | /* Capabilities returned by enc_get_caps that depend upon encoder settings */ | ||
28 | struct encoder_caps | ||
29 | { | ||
30 | unsigned long samplerate_caps; /* Mask composed of SAMPR_CAP_* flags */ | ||
31 | unsigned long channel_caps; /* Mask composed of CHN_CAP_* flags */ | ||
32 | }; | ||
33 | |||
34 | /* for_config: | ||
35 | * true- the capabilities returned should be contextual based upon the | ||
36 | * settings in the config structure | ||
37 | * false- the overall capabilities are being requested | ||
38 | */ | ||
39 | bool enc_get_caps(const struct encoder_config *cfg, | ||
40 | struct encoder_caps *caps, | ||
41 | bool for_config); | ||
42 | |||
43 | /** Configuration **/ | ||
44 | |||
45 | /* These translate to a back between the global format and the per- | ||
46 | instance format */ | ||
47 | void global_to_encoder_config(struct encoder_config *cfg); | ||
48 | void encoder_config_to_global(const struct encoder_config *cfg); | ||
49 | |||
50 | /* Initializes the config struct with default values. | ||
51 | set afmt member before calling. */ | ||
52 | bool enc_init_config(struct encoder_config *cfg); | ||
53 | |||
54 | /** Encoder Menus **/ | ||
55 | |||
56 | /* Shows an encoder's config menu given an encoder config returned by one | ||
57 | of the enc_api functions. Modified settings are not saved to disk but | ||
58 | instead are placed in the structure. Call enc_save_config to commit | ||
59 | the data. */ | ||
60 | bool enc_config_menu(struct encoder_config *cfg); | ||
61 | |||
62 | /** Global Settings **/ | ||
63 | |||
64 | /* Reset all codecs to defaults */ | ||
65 | void enc_global_settings_reset(void); | ||
66 | |||
67 | /* Apply new settings */ | ||
68 | void enc_global_settings_apply(void); | ||
69 | |||
70 | /* Show an encoder's config menu based on the global_settings. | ||
71 | Modified settings are placed in global_settings.enc_config. */ | ||
72 | bool enc_global_config_menu(void); | ||
73 | #endif /* ENC_CONFIG_H */ | ||