~ubuntu-branches/ubuntu/wily/smplayer/wily

« back to all changes in this revision

Viewing changes to src/corelib/preferences.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-03-31 23:05:43 UTC
  • mfrom: (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20090331230543-0h2hfwpwlu9opbv2
* New upstream release. (Closes: #523791)
  - Reworked subtitle font preferences. (Closes: #503295)
  - No longer installs qt_fr.qm. (Closes: #486314)
* debian/control:
  - Bumped Standards-Version to 3.8.1.
  - Changed maintainer name (still the same person and GPG key).
  - Changed section to video.
  - Build-depend on zlib1g-dev for findsubtitles.
  - Require Qt >= 4.3 per readme.
  - Added ${misc:Depends}.
  - Make smplayer-translations depend on smplayer and smplayer recommend
    smplayer-translations, not the other way round. (Closes: #489375)
* debian/copyright:
  - Significantly expanded per-file with new upstream authors.
* debian/rules:
  - Make make use correct uic in install.
  - Clean svn_revision.
  - Removed get-orig-source - not needed with uscan --repack.
* debian/patches/01_gl_translation.patch:
  - Added patch to fix lrelease error on smplayer_gl.ts.
* Added debian/README.source for simple-patchsys.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  smplayer, GUI front-end for mplayer.
2
 
    Copyright (C) 2006-2008 Ricardo Villalba <rvm@escomposlinux.org>
3
 
 
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.
8
 
 
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.
13
 
 
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
17
 
*/
18
 
 
19
 
 
20
 
#ifndef _PREFERENCES_H_
21
 
#define _PREFERENCES_H_
22
 
 
23
 
/* Global settings */
24
 
 
25
 
#include <QString>
26
 
#include "config.h"
27
 
 
28
 
class Preferences {
29
 
 
30
 
public:
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,
36
 
                         ChangeSpeed = 4 };
37
 
        enum OptionState { Detect = -1, Disabled = 0, Enabled = 1 };
38
 
        enum H264LoopFilter { LoopDisabled = 0, LoopEnabled = 1, LoopDisabledOnHD = 2 };
39
 
 
40
 
        Preferences();
41
 
        virtual ~Preferences();
42
 
 
43
 
        virtual void reset();
44
 
 
45
 
#ifndef NO_USE_INI_FILES
46
 
        void save();
47
 
        void load();
48
 
#endif
49
 
 
50
 
        QString mplayer_bin;
51
 
        QString vo; // video output
52
 
        QString ao; // audio output
53
 
 
54
 
#if USE_COLORKEY
55
 
        unsigned int color_key;
56
 
#endif
57
 
 
58
 
        // Subtitles font
59
 
        bool use_fontconfig;
60
 
        QString font_file;
61
 
        QString font_name;
62
 
        QString subcp; // -subcp
63
 
        int font_autoscale; // -subfont-autoscale
64
 
        bool use_ass_subtitles;
65
 
        bool autoload_sub;
66
 
        int subfuzziness;
67
 
        unsigned int ass_color;
68
 
        unsigned int ass_border_color;
69
 
        QString ass_styles;
70
 
        OptionState change_sub_scale_should_restart;
71
 
 
72
 
        bool use_closed_caption_subs;
73
 
        bool use_forced_subs_only;
74
 
 
75
 
        // Use the new sub_vob, sub_demux and sub_file commands
76
 
        // instead of sub_select
77
 
        OptionState use_new_sub_commands; 
78
 
 
79
 
        int osd;
80
 
 
81
 
        OptionState fast_audio_change; // If activated, not restart mplayer
82
 
#if !SMART_DVD_CHAPTERS
83
 
        bool fast_chapter_change;
84
 
#endif
85
 
 
86
 
        QString dvd_device;
87
 
        QString cdrom_device;
88
 
 
89
 
        int cache_for_files;
90
 
        int cache_for_streams;
91
 
        int cache_for_dvds;
92
 
        int cache_for_vcds;
93
 
        int cache_for_audiocds;
94
 
 
95
 
        bool use_mplayer_window;
96
 
 
97
 
        QString monitor_aspect;
98
 
        double monitor_aspect_double();
99
 
 
100
 
        //! Directory of the latest file loaded
101
 
        QString latest_dir;
102
 
        QString last_url;
103
 
        QString last_dvd_directory;
104
 
 
105
 
        QString mplayer_verbose;
106
 
 
107
 
        //! Mainwindow resize method
108
 
        int resize_method;
109
 
 
110
 
        bool disable_screensaver;
111
 
        bool use_direct_rendering;
112
 
        bool use_double_buffer;
113
 
 
114
 
        QString screenshot_directory;
115
 
        bool subtitles_on_screenshots;
116
 
 
117
 
        bool use_soft_video_eq;
118
 
        bool use_soft_vol;
119
 
 
120
 
        int softvol_max;
121
 
        OptionState use_scaletempo;
122
 
 
123
 
        QString audio_lang;             // Preferred audio language
124
 
        QString subtitle_lang;          // Preferred subtitle language
125
 
 
126
 
        bool use_idx; //!< Use -idx
127
 
 
128
 
        bool dont_change_volume; // Don't change volume on startup
129
 
 
130
 
        bool use_hwac3; // -afm hwac3
131
 
 
132
 
        int vcd_initial_title;
133
 
 
134
 
 
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;
139
 
 
140
 
        // Performance
141
 
        int priority;
142
 
        bool frame_drop;
143
 
        bool hard_frame_drop;
144
 
        bool autosync;
145
 
        int autosync_factor;
146
 
 
147
 
        H264LoopFilter h264_skip_loop_filter;
148
 
        //! An HD is a video which height is equal or greater than this.
149
 
        int HD_height; 
150
 
 
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
155
 
 
156
 
#if STYLE_SWITCHING
157
 
        // SMPlayer look
158
 
        QString style;
159
 
#endif
160
 
 
161
 
        bool fullscreen;
162
 
        bool start_in_fullscreen;
163
 
 
164
 
        bool compact_mode;
165
 
        bool stay_on_top;
166
 
        int size_factor;
167
 
 
168
 
        bool show_frame_counter;
169
 
        bool show_motion_vectors;
170
 
        
171
 
        //! Postprocessing quality
172
 
        int autoq;
173
 
 
174
 
        //! Loop. If true repeat the file
175
 
        bool loop;
176
 
 
177
 
        bool use_single_instance;
178
 
        int connection_port;
179
 
 
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;
187
 
        int wheel_function;
188
 
 
189
 
        //! Max items in recent's list
190
 
        int recents_max_items;
191
 
 
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
197
 
 
198
 
        bool update_while_seeking;
199
 
#if ENABLE_DELAYED_DRAGGING     
200
 
        int time_slider_drag_delay;
201
 
#endif
202
 
 
203
 
        // Logs
204
 
        bool log_mplayer;
205
 
        bool log_smplayer;
206
 
        QString log_filter;
207
 
 
208
 
        QString language;
209
 
 
210
 
        QString iconset;
211
 
 
212
 
        //! If true, mplayerlayer erases its background
213
 
        bool always_clear_video_background; 
214
 
 
215
 
        //! Make configurable some of the mplayerprocess regular expressions
216
 
        QString rx_endoffile;
217
 
        QString rx_novideo;
218
 
 
219
 
        //! Number of times to show the balloon remembering that the program
220
 
        //! is still running in the system tray.
221
 
        int balloon_count;
222
 
 
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;
226
 
 
227
 
        //! If true, the position of the main window will be saved before
228
 
        //! entering in fullscreen and will restore when going back to
229
 
        //! window mode.
230
 
        bool restore_pos_after_fullscreen;
231
 
 
232
 
        bool save_window_size_on_exit;
233
 
 
234
 
#ifdef Q_OS_WIN
235
 
        //bool enable_vcd_on_windows;
236
 
        bool enable_audiocd_on_windows;
237
 
#endif
238
 
 
239
 
        //! Close the main window when a file or playlist finish
240
 
        bool close_on_finish;
241
 
 
242
 
        QString default_font;
243
 
 
244
 
        //!< Pause the current file when the main window is not visible
245
 
        bool pause_when_hidden; 
246
 
 
247
 
        //!< Allow frre movement of the video window
248
 
        bool allow_video_movement;
249
 
 
250
 
        //! If true it will autoload edl files with the same name of the file
251
 
    //! to play
252
 
        bool use_edl_files;
253
 
 
254
 
        QString gui; //!< The name of the GUI to use
255
 
 
256
 
        // Initial values for some options
257
 
        double initial_sub_scale;
258
 
#if SCALE_ASS_SUBS
259
 
        double initial_sub_scale_ass;
260
 
#endif
261
 
        int initial_volume;
262
 
        int initial_contrast;
263
 
        int initial_brightness;
264
 
        int initial_hue;
265
 
        int initial_saturation;
266
 
        int initial_gamma;
267
 
 
268
 
        //! Default value for panscan (1.0 = no zoom)
269
 
        double initial_panscan_factor;
270
 
 
271
 
        //! Default value for position of subtitles on screen
272
 
        //! 100 = 100% at the bottom
273
 
        int initial_sub_pos;
274
 
 
275
 
        bool initial_postprocessing; //!< global postprocessing filter
276
 
        bool initial_volnorm;
277
 
 
278
 
        int initial_deinterlace;
279
 
 
280
 
        int initial_audio_channels;
281
 
 
282
 
        int initial_audio_track;
283
 
        int initial_subtitle_track;
284
 
 
285
 
    //mplayer log autosaving
286
 
    bool autosave_mplayer_log;
287
 
    QString mplayer_log_saveto;
288
 
    //mplayer log autosaving end
289
 
 
290
 
        bool auto_add_to_playlist; //!< Add files to open to playlist
291
 
        OptionState use_volume_option2; //!< Use -volume in command line
292
 
 
293
 
        //! Windows only. If true, smplayer will pass short filenames to mplayer.
294
 
        //! To workaround a bug in mplayer.
295
 
        bool use_short_pathnames; 
296
 
 
297
 
        //! Latest version of mplayer parsed
298
 
        int mplayer_detected_version;
299
 
        bool mplayer_has_volume_option;
300
 
 
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;
304
 
};
305
 
 
306
 
#endif