blob: 368bf8cf6c6aaec8dfe359b0ffff9184365b4e09 [file] [log] [blame]
Michael Sevakis5efee7c2006-11-06 18:18:05 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Michael Sevakis
11 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
Michael Sevakis5efee7c2006-11-06 18:18:05 +000016 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#ifndef ENC_CONFIG_H
22#define ENC_CONFIG_H
23
24#include "misc.h"
25#include "enc_base.h"
26
27/** Capabilities **/
28
29/* Capabilities returned by enc_get_caps that depend upon encoder settings */
30struct encoder_caps
31{
32 unsigned long samplerate_caps; /* Mask composed of SAMPR_CAP_* flags */
33 unsigned long channel_caps; /* Mask composed of CHN_CAP_* flags */
34};
35
36/* for_config:
37 * true- the capabilities returned should be contextual based upon the
38 * settings in the config structure
39 * false- the overall capabilities are being requested
40 */
41bool enc_get_caps(const struct encoder_config *cfg,
42 struct encoder_caps *caps,
43 bool for_config);
44
45/** Configuration **/
46
47/* These translate to a back between the global format and the per-
48 instance format */
49void global_to_encoder_config(struct encoder_config *cfg);
50void encoder_config_to_global(const struct encoder_config *cfg);
51
52/* Initializes the config struct with default values.
53 set afmt member before calling. */
54bool enc_init_config(struct encoder_config *cfg);
55
56/** Encoder Menus **/
57
58/* Shows an encoder's config menu given an encoder config returned by one
59 of the enc_api functions. Modified settings are not saved to disk but
60 instead are placed in the structure. Call enc_save_config to commit
61 the data. */
62bool enc_config_menu(struct encoder_config *cfg);
63
64/** Global Settings **/
65
66/* Reset all codecs to defaults */
67void enc_global_settings_reset(void);
68
69/* Apply new settings */
70void enc_global_settings_apply(void);
71
72/* Show an encoder's config menu based on the global_settings.
73 Modified settings are placed in global_settings.enc_config. */
William Wilgusdd40c462018-10-15 23:04:04 -040074int enc_global_config_menu(void);
Michael Sevakis5efee7c2006-11-06 18:18:05 +000075#endif /* ENC_CONFIG_H */