Michael Sevakis | 5efee7c | 2006-11-06 18:18:05 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
| 10 | * Copyright (C) 2006 Michael Sevakis |
| 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame] | 12 | * 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 Sevakis | 5efee7c | 2006-11-06 18:18:05 +0000 | [diff] [blame] | 16 | * |
| 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 */ |
| 30 | struct 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 | */ |
| 41 | bool 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 */ |
| 49 | void global_to_encoder_config(struct encoder_config *cfg); |
| 50 | void encoder_config_to_global(const struct encoder_config *cfg); |
| 51 | |
| 52 | /* Initializes the config struct with default values. |
| 53 | set afmt member before calling. */ |
| 54 | bool 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. */ |
| 62 | bool enc_config_menu(struct encoder_config *cfg); |
| 63 | |
| 64 | /** Global Settings **/ |
| 65 | |
| 66 | /* Reset all codecs to defaults */ |
| 67 | void enc_global_settings_reset(void); |
| 68 | |
| 69 | /* Apply new settings */ |
| 70 | void 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 Wilgus | dd40c46 | 2018-10-15 23:04:04 -0400 | [diff] [blame] | 74 | int enc_global_config_menu(void); |
Michael Sevakis | 5efee7c | 2006-11-06 18:18:05 +0000 | [diff] [blame] | 75 | #endif /* ENC_CONFIG_H */ |