Rearange menu of mpegplayer. Add new menu with "settings" and "quit", and remove...
[kugel-rb/myfork.git] / apps / plugins / mpegplayer / mpeg_settings.h
blob95ecc295460c919bc6b0e867a5c3c862865e4a73
2 #include "plugin.h"
4 #define SETTINGS_VERSION 5
5 #define SETTINGS_MIN_VERSION 1
6 #define SETTINGS_FILENAME "mpegplayer.cfg"
8 #if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) \
9 || defined(IRIVER_H10) || defined(COWON_D2) || defined(PHILIPS_HDD1630) \
10 || defined(SANSA_FUZE) || defined(SANSA_E200V2) || defined(TOSHIBA_GIGABEAT_S)
11 #define MPEG_OPTION_DITHERING_ENABLED 1
12 #endif
14 #ifndef MPEG_OPTION_DITHERING_ENABLED
15 #define MPEG_OPTION_DITHERING_ENABLED 0
16 #endif
18 enum mpeg_option_id
20 #if MPEG_OPTION_DITHERING_ENABLED
21 MPEG_OPTION_DITHERING,
22 #endif
23 MPEG_OPTION_DISPLAY_FPS,
24 MPEG_OPTION_LIMIT_FPS,
25 MPEG_OPTION_SKIP_FRAMES,
26 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
27 MPEG_OPTION_BACKLIGHT_BRIGHTNESS,
28 #endif
31 enum mpeg_audio_option_id
33 MPEG_AUDIO_TONE_CONTROLS,
34 MPEG_AUDIO_CHANNEL_MODES,
35 MPEG_AUDIO_CROSSFEED,
36 MPEG_AUDIO_EQUALIZER,
37 MPEG_AUDIO_DITHERING,
40 enum mpeg_resume_id
42 MPEG_RESUME_MENU_ALWAYS = 0,
43 MPEG_RESUME_MENU_IF_INCOMPLETE,
44 MPEG_RESUME_RESTART,
45 MPEG_RESUME_ALWAYS,
46 MPEG_RESUME_NUM_OPTIONS,
49 enum mpeg_start_id
51 MPEG_START_RESTART,
52 MPEG_START_RESUME,
53 MPEG_START_SEEK,
54 MPEG_START_SETTINGS,
55 MPEG_START_QUIT,
56 MPEG_START_EXIT,
59 enum mpeg_setting_id
61 MPEG_SETTING_DISPLAY_SETTINGS,
62 MPEG_SETTING_AUDIO_SETTINGS,
63 MPEG_SETTING_ENABLE_START_MENU,
64 MPEG_SETTING_CLEAR_RESUMES,
67 enum mpeg_menu_id
69 MPEG_MENU_SETTINGS,
70 MPEG_MENU_RESUME,
71 MPEG_MENU_QUIT,
74 struct mpeg_settings {
75 int showfps; /* flag to display fps */
76 int limitfps; /* flag to limit fps */
77 int skipframes; /* flag to skip frames */
78 int resume_options; /* type of resume action at start */
79 int resume_count; /* total # of resumes in config file */
80 int resume_time; /* resume time for current mpeg (in half minutes) */
81 char resume_filename[MAX_PATH]; /* filename of current mpeg */
82 #if MPEG_OPTION_DITHERING_ENABLED
83 int displayoptions;
84 #endif
85 /* Audio options - simple on/off specification */
86 int tone_controls;
87 int channel_modes;
88 int crossfeed;
89 int equalizer;
90 int dithering;
91 /* Backlight options */
92 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
93 int backlight_brightness;
94 #endif
97 extern struct mpeg_settings settings;
99 int mpeg_start_menu(uint32_t duration);
100 int mpeg_menu(void);
102 void mpeg_menu_sysevent_clear(void);
103 long mpeg_menu_sysevent(void);
104 int mpeg_menu_sysevent_callback(int btn, const struct menu_item_ex *menu);
105 void mpeg_menu_sysevent_handle(void);
107 void init_settings(const char* filename);
108 void save_settings(void);
110 #ifdef HAVE_BACKLIGHT_BRIGHTNESS
111 void mpeg_backlight_update_brightness(int value);
112 #endif