1
/* smplayer, GUI front-end for mplayer.
2
Copyright (C) 2006-2008 Ricardo Villalba <rvm@escomposlinux.org>
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
#ifndef _PREFERENCES_H_
21
#define _PREFERENCES_H_
31
enum OSD { None = 0, Seek = 1, SeekTimer = 2, SeekTimerTotal = 3 };
32
enum Resize { Never = 0, Always = 1, Afterload = 2 };
33
enum Priority { Realtime = 0, High = 1, AboveNormal = 2, Normal = 3,
34
BelowNormal = 4, Idle = 5 };
35
enum WheelFunction { Seeking = 0, Volume = 1, Zoom = 2, DoNothing = 3,
37
enum OptionState { Detect = -1, Disabled = 0, Enabled = 1 };
38
enum H264LoopFilter { LoopDisabled = 0, LoopEnabled = 1, LoopDisabledOnHD = 2 };
41
virtual ~Preferences();
45
#ifndef NO_USE_INI_FILES
51
QString vo; // video output
52
QString ao; // audio output
55
unsigned int color_key;
62
QString subcp; // -subcp
63
int font_autoscale; // -subfont-autoscale
64
bool use_ass_subtitles;
67
unsigned int ass_color;
68
unsigned int ass_border_color;
70
OptionState change_sub_scale_should_restart;
72
bool use_closed_caption_subs;
73
bool use_forced_subs_only;
75
// Use the new sub_vob, sub_demux and sub_file commands
76
// instead of sub_select
77
OptionState use_new_sub_commands;
81
OptionState fast_audio_change; // If activated, not restart mplayer
82
#if !SMART_DVD_CHAPTERS
83
bool fast_chapter_change;
90
int cache_for_streams;
93
int cache_for_audiocds;
95
bool use_mplayer_window;
97
QString monitor_aspect;
98
double monitor_aspect_double();
100
//! Directory of the latest file loaded
103
QString last_dvd_directory;
105
QString mplayer_verbose;
107
//! Mainwindow resize method
110
bool disable_screensaver;
111
bool use_direct_rendering;
112
bool use_double_buffer;
114
QString screenshot_directory;
115
bool subtitles_on_screenshots;
117
bool use_soft_video_eq;
121
OptionState use_scaletempo;
123
QString audio_lang; // Preferred audio language
124
QString subtitle_lang; // Preferred subtitle language
126
bool use_idx; //!< Use -idx
128
bool dont_change_volume; // Don't change volume on startup
130
bool use_hwac3; // -afm hwac3
132
int vcd_initial_title;
135
// Let the user pass options to mplayer
136
QString mplayer_additional_options;
137
QString mplayer_additional_video_filters;
138
QString mplayer_additional_audio_filters;
143
bool hard_frame_drop;
147
H264LoopFilter h264_skip_loop_filter;
148
//! An HD is a video which height is equal or greater than this.
151
// SMPlayer will remember all media settings for all videos.
152
// This options allow to disable it:
153
bool dont_remember_media_settings; // Will not remember anything
154
bool dont_remember_time_pos; // Will not remember time pos
162
bool start_in_fullscreen;
168
bool show_frame_counter;
169
bool show_motion_vectors;
171
//! Postprocessing quality
174
//! Loop. If true repeat the file
177
bool use_single_instance;
180
// Function of mouse buttons:
181
QString mouse_left_click_function;
182
QString mouse_right_click_function;
183
QString mouse_double_click_function;
184
QString mouse_middle_click_function;
185
QString mouse_xbutton1_click_function;
186
QString mouse_xbutton2_click_function;
189
//! Max items in recent's list
190
int recents_max_items;
192
// Configurable seeking
193
int seeking1; // By default 10s
194
int seeking2; // By default 1m
195
int seeking3; // By default 10m
196
int seeking4; // For mouse wheel, by default 30s
198
bool update_while_seeking;
199
#if ENABLE_DELAYED_DRAGGING
200
int time_slider_drag_delay;
212
//! If true, mplayerlayer erases its background
213
bool always_clear_video_background;
215
//! Make configurable some of the mplayerprocess regular expressions
216
QString rx_endoffile;
219
//! Number of times to show the balloon remembering that the program
220
//! is still running in the system tray.
223
//! If true, -brightness, -contrast and so on, won't be passed to
224
//! mplayer. It seems that some graphic cards don't support those options.
225
bool dont_use_eq_options;
227
//! If true, the position of the main window will be saved before
228
//! entering in fullscreen and will restore when going back to
230
bool restore_pos_after_fullscreen;
232
bool save_window_size_on_exit;
235
//bool enable_vcd_on_windows;
236
bool enable_audiocd_on_windows;
239
//! Close the main window when a file or playlist finish
240
bool close_on_finish;
242
QString default_font;
244
//!< Pause the current file when the main window is not visible
245
bool pause_when_hidden;
247
//!< Allow frre movement of the video window
248
bool allow_video_movement;
250
//! If true it will autoload edl files with the same name of the file
254
QString gui; //!< The name of the GUI to use
256
// Initial values for some options
257
double initial_sub_scale;
259
double initial_sub_scale_ass;
262
int initial_contrast;
263
int initial_brightness;
265
int initial_saturation;
268
//! Default value for panscan (1.0 = no zoom)
269
double initial_panscan_factor;
271
//! Default value for position of subtitles on screen
272
//! 100 = 100% at the bottom
275
bool initial_postprocessing; //!< global postprocessing filter
276
bool initial_volnorm;
278
int initial_deinterlace;
280
int initial_audio_channels;
282
int initial_audio_track;
283
int initial_subtitle_track;
285
//mplayer log autosaving
286
bool autosave_mplayer_log;
287
QString mplayer_log_saveto;
288
//mplayer log autosaving end
290
bool auto_add_to_playlist; //!< Add files to open to playlist
291
OptionState use_volume_option2; //!< Use -volume in command line
293
//! Windows only. If true, smplayer will pass short filenames to mplayer.
294
//! To workaround a bug in mplayer.
295
bool use_short_pathnames;
297
//! Latest version of mplayer parsed
298
int mplayer_detected_version;
299
bool mplayer_has_volume_option;
301
//! Version of mplayer supplied by the user which will be used if
302
//! the version can't be parsed from mplayer output
303
int mplayer_user_supplied_version;