Add a get_offset API call to make codec_advance_buffer_loc_callback work.
[Rockbox.git] / apps / enc_config.h
blob53fa7638e984b4caeb468985abb66e577dd475ef
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2006 Michael Sevakis
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.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #ifndef ENC_CONFIG_H
20 #define ENC_CONFIG_H
22 #include "misc.h"
23 #include "enc_base.h"
25 /** Capabilities **/
27 /* Capabilities returned by enc_get_caps that depend upon encoder settings */
28 struct encoder_caps
30 unsigned long samplerate_caps; /* Mask composed of SAMPR_CAP_* flags */
31 unsigned long channel_caps; /* Mask composed of CHN_CAP_* flags */
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
39 bool enc_get_caps(const struct encoder_config *cfg,
40 struct encoder_caps *caps,
41 bool for_config);
43 /** Configuration **/
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);
50 /* Initializes the config struct with default values.
51 set afmt member before calling. */
52 bool enc_init_config(struct encoder_config *cfg);
54 /** Encoder Menus **/
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);
62 /** Global Settings **/
64 /* Reset all codecs to defaults */
65 void enc_global_settings_reset(void);
67 /* Apply new settings */
68 void enc_global_settings_apply(void);
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 */