source: smplayer/trunk/src/mediasettings.h@ 128

Last change on this file since 128 was 128, checked in by Silvan Scherrer, 13 years ago

SMPlayer: trunk update to latest svn

  • Property svn:eol-style set to LF
File size: 4.5 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2012 Ricardo Villalba <rvm@users.sourceforge.net>
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#ifndef _MEDIASETTINGS_H_
20#define _MEDIASETTINGS_H_
21
22
23/* Settings the user has set for this file, and that we need to */
24/* restore the video after a restart */
25
26#include <QString>
27#include <QSize>
28#include "config.h"
29#include "audioequalizerlist.h"
30
31class QSettings;
32
33class MediaSettings {
34
35public:
36 enum Denoise { NoDenoise = 0, DenoiseNormal = 1, DenoiseSoft = 2 };
37 enum Aspect { AspectAuto = 1, Aspect43 = 2, Aspect54 = 3, Aspect149 = 4,
38 Aspect169 = 5, Aspect1610 = 6, Aspect235 = 7, Aspect11 = 8,
39 Aspect32 = 9, Aspect1410 = 10,
40 AspectNone = 0 };
41 enum Deinterlace { NoDeinterlace = 0, L5 = 1, Yadif = 2, LB = 3,
42 Yadif_1 = 4, Kerndeint = 5 };
43 enum AudioChannels { ChDefault = 0, ChStereo = 2, ChSurround = 4,
44 ChFull51 = 6 };
45 enum StereoMode { Stereo = 0, Left = 1, Right = 2 };
46
47 enum Rotate { NoRotate = -1, Clockwise_flip = 0, Clockwise = 1,
48 Counterclockwise = 2, Counterclockwise_flip = 3 };
49
50 enum IDs { NoneSelected = -1000, SubNone = 90000 };
51
52 MediaSettings();
53 virtual ~MediaSettings();
54
55 virtual void reset();
56
57 double current_sec;
58 int current_sub_id;
59
60#if PROGRAM_SWITCH
61 int current_program_id;
62#endif
63
64 int current_video_id;
65 int current_audio_id;
66
67 int current_title_id;
68 int current_chapter_id;
69 int current_angle_id;
70
71 int aspect_ratio_id;
72
73 //bool fullscreen;
74
75 int volume;
76 bool mute;
77
78 int brightness, contrast, gamma, hue, saturation;
79
80 AudioEqualizerList audio_equalizer;
81
82 QString external_subtitles;
83 QString external_audio; // external audio file
84
85 int sub_delay;
86 int audio_delay;
87
88 // Subtitles position (0-100)
89 int sub_pos;
90 double sub_scale;
91 double sub_scale_ass;
92
93 int closed_caption_channel; // 0 = disabled
94
95 double speed; // Speed of playback: 1.0 = normal speed
96
97 int current_deinterlacer;
98
99 bool add_letterbox;
100
101 // Filters in menu
102 bool phase_filter;
103 bool deblock_filter;
104 bool dering_filter;
105 bool gradfun_filter;
106 bool noise_filter;
107 bool postprocessing_filter;
108 bool upscaling_filter; //!< Software scaling
109
110 int current_denoiser;
111 int current_unsharp;
112
113 bool karaoke_filter;
114 bool extrastereo_filter;
115 bool volnorm_filter;
116
117 int audio_use_channels;
118 int stereo_mode;
119
120 double zoom_factor; // mplayerwindow zoom
121
122#if USE_MPLAYER_PANSCAN
123 double panscan_factor;
124#endif
125
126 int rotate;
127 bool flip; //!< Flip image
128 bool mirror; //!< Mirrors the image on the Y axis.
129
130 bool loop; //!< Loop. If true repeat the file
131 int A_marker;
132 int B_marker;
133
134 // This a property of the video and it should be
135 // in mediadata, but we have to save it to preserve
136 // this data among restarts.
137 double starting_time; // Some videos don't start at 0
138
139 //! The codec of the video is ffh264 and it's high definition
140 bool is264andHD;
141
142 // Advanced settings
143 QString forced_demuxer;
144 QString forced_video_codec;
145 QString forced_audio_codec;
146
147 // A copy of the original values, so we can restore them.
148 QString original_demuxer;
149 QString original_video_codec;
150 QString original_audio_codec;
151
152 // Options to mplayer (for this file only)
153 QString mplayer_additional_options;
154 QString mplayer_additional_video_filters;
155 QString mplayer_additional_audio_filters;
156
157 // Some things that were before in mediadata
158 // They can vary, because of filters, so better here
159
160 //Resolution used by mplayer
161 //Can be bigger that video resolution
162 //because of the aspect ratio or expand filter
163 int win_width;
164 int win_height;
165 double win_aspect();
166
167 //! Returns the aspect as a double. Returns 0 if aspect == AspectNone.
168 double aspectToNum(Aspect aspect);
169 static QString aspectToString(Aspect aspect);
170
171 void list();
172
173#ifndef NO_USE_INI_FILES
174 void save(QSettings * set);
175 void load(QSettings * set);
176#endif
177};
178
179#endif
Note: See TracBrowser for help on using the repository browser.