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_
26
#include <QStringList>
29
#include "audioequalizerlist.h"
30
#include "assstyles.h"
38
enum OSD { None = 0, Seek = 1, SeekTimer = 2, SeekTimerTotal = 3 };
39
enum OnTop { NeverOnTop = 0, AlwaysOnTop = 1, WhilePlayingOnTop = 2 };
40
enum Resize { Never = 0, Always = 1, Afterload = 2 };
41
enum Priority { Realtime = 0, High = 1, AboveNormal = 2, Normal = 3,
42
BelowNormal = 4, Idle = 5 };
43
enum WheelFunction { Seeking = 0, Volume = 1, Zoom = 2, DoNothing = 3,
45
enum OptionState { Detect = -1, Disabled = 0, Enabled = 1 };
46
enum H264LoopFilter { LoopDisabled = 0, LoopEnabled = 1, LoopDisabledOnHD = 2 };
49
virtual ~Preferences();
53
#ifndef NO_USE_INI_FILES
58
double monitor_aspect_double();
67
QString vo; // video output
68
QString ao; // audio output
70
QString screenshot_directory;
72
// SMPlayer will remember all media settings for all videos.
73
// This options allow to disable it:
74
bool dont_remember_media_settings; // Will not remember anything
75
bool dont_remember_time_pos; // Will not remember time pos
77
QString audio_lang; // Preferred audio language
78
QString subtitle_lang; // Preferred subtitle language
81
bool use_direct_rendering;
82
bool use_double_buffer;
83
bool disable_screensaver;
84
bool use_soft_video_eq;
86
int autoq; //!< Postprocessing quality
87
bool add_blackborders_on_fullscreen;
92
OptionState use_scaletempo;
93
bool dont_change_volume; // Don't change volume on startup
94
bool use_hwac3; // -afm hwac3
95
bool use_audio_equalizer;
96
OptionState use_volume_option; //!< Use -volume in command line
99
bool loop; //!< Loop. If true repeat the file
102
QString file_settings_method; //!< Method to be used for saving file settings
110
QString cdrom_device;
113
bool enable_audiocd_on_windows;
116
int vcd_initial_title;
125
bool hard_frame_drop;
129
H264LoopFilter h264_skip_loop_filter;
130
int HD_height; //!< An HD is a video which height is equal or greater than this.
132
OptionState fast_audio_change; // If activated, not restart mplayer
133
#if !SMART_DVD_CHAPTERS
134
bool fast_chapter_change;
137
int threads; //!< number of threads to use for decoding (-lavdopts threads <1-8>)
140
int cache_for_streams;
143
int cache_for_audiocds;
153
QString subcp; // -subcp
156
int font_autoscale; // -subfont-autoscale
160
bool use_ass_subtitles;
161
int ass_line_spacing;
163
bool use_closed_caption_subs;
164
bool use_forced_subs_only;
166
bool subtitles_on_screenshots;
168
//! Use the new sub_vob, sub_demux and sub_file commands
169
//! instead of sub_select
170
OptionState use_new_sub_commands;
171
OptionState change_sub_scale_should_restart;
174
AssStyles ass_styles;
176
//! If false, options requiring freetype won't be used
177
bool freetype_support;
185
int adapter; //Screen for overlay. If -1 it won't be used.
189
unsigned int color_key;
192
bool use_mplayer_window;
194
QString monitor_aspect;
196
bool use_idx; //!< Use -idx
198
// Let the user pass options to mplayer
199
QString mplayer_additional_options;
200
QString mplayer_additional_video_filters;
201
QString mplayer_additional_audio_filters;
208
//mplayer log autosaving
209
bool autosave_mplayer_log;
210
QString mplayer_log_saveto;
211
//mplayer log autosaving end
213
#if REPAINT_BACKGROUND_OPTION
214
//! If true, mplayerlayer erases its background
215
bool repaint_video_background;
218
//! If true it will autoload edl files with the same name of the file
222
//! Preferred connection method: ipv4 or ipv6
225
//! Windows only. If true, smplayer will pass short filenames to mplayer.
226
//! To workaround a bug in mplayer.
227
bool use_short_pathnames;
229
//! If false, -brightness, -contrast and so on, won't be passed to
230
//! mplayer. It seems that some graphic cards don't support those options.
231
bool change_video_equalizer_on_startup;
233
//! If true, smplayer will use the prefix pausing_keep_force to keep
234
//! the pause on slave commands. This experimental prefix was added
235
//! in mplayer svn r27665.
236
bool use_pausing_keep_force;
238
bool use_correct_pts; //!< Pass -correct-pts to mplayer
240
QString actions_to_run; //!< List of actions to run every time a video loads.
248
bool start_in_fullscreen;
253
int resize_method; //!< Mainwindow resize method
256
QString style; //!< SMPlayer look
258
bool show_frame_counter;
259
bool show_motion_vectors;
261
// Function of mouse buttons:
262
QString mouse_left_click_function;
263
QString mouse_right_click_function;
264
QString mouse_double_click_function;
265
QString mouse_middle_click_function;
266
QString mouse_xbutton1_click_function;
267
QString mouse_xbutton2_click_function;
270
// Configurable seeking
271
int seeking1; // By default 10s
272
int seeking2; // By default 1m
273
int seeking3; // By default 10m
274
int seeking4; // For mouse wheel, by default 30s
276
bool update_while_seeking;
277
#if ENABLE_DELAYED_DRAGGING
278
int time_slider_drag_delay;
284
//! Number of times to show the balloon remembering that the program
285
//! is still running in the system tray.
288
//! If true, the position of the main window will be saved before
289
//! entering in fullscreen and will restore when going back to
291
bool restore_pos_after_fullscreen;
293
bool save_window_size_on_exit;
295
//! Close the main window when a file or playlist finish
296
bool close_on_finish;
298
QString default_font;
300
//!< Pause the current file when the main window is not visible
301
bool pause_when_hidden;
303
//!< Allow frre movement of the video window
304
bool allow_video_movement;
306
QString gui; //!< The name of the GUI to use
309
int gui_minimum_width;
311
QSize default_size; // Default size of the main window
313
#if ALLOW_TO_HIDE_VIDEO_WINDOW_ON_AUDIO_FILES
314
bool hide_video_window_on_audio_files;
317
bool report_mplayer_crashes;
319
#if REPORT_OLD_MPLAYER
320
bool reported_mplayer_is_old;
323
bool auto_add_to_playlist; //!< Add files to open to playlist
324
bool add_to_playlist_consecutive_files;
331
QString latest_dir; //!< Directory of the latest file loaded
332
QString last_dvd_directory;
339
double initial_sub_scale;
340
double initial_sub_scale_ass;
342
int initial_contrast;
343
int initial_brightness;
345
int initial_saturation;
348
AudioEqualizerList initial_audio_equalizer;
350
//! Default value for panscan (1.0 = no zoom)
351
double initial_panscan_factor;
353
//! Default value for position of subtitles on screen
354
//! 100 = 100% at the bottom
357
bool initial_postprocessing; //!< global postprocessing filter
358
bool initial_volnorm;
360
int initial_deinterlace;
362
int initial_audio_channels;
363
int initial_stereo_mode;
365
int initial_audio_track;
366
int initial_subtitle_track;
373
int mplayer_detected_version; //!< Latest version of mplayer parsed
375
//! Version of mplayer supplied by the user which will be used if
376
//! the version can't be parsed from mplayer output
377
int mplayer_user_supplied_version;
384
bool use_single_instance;
385
int connection_port; // Manual port
387
int autoport; // Port automatically chosen by Qt
394
int floating_control_margin;
395
int floating_control_width;
396
bool floating_control_animated;
397
bool floating_display_in_compact_mode;
399
bool bypass_window_manager;
411
QString proxy_username;
412
QString proxy_password;
419
Recents * history_recents;
420
URLHistory * history_urls;