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

Last change on this file since 166 was 165, checked in by Silvan Scherrer, 11 years ago

SMPlayer: update trunk to latest 0.8.7

  • Property svn:eol-style set to LF
File size: 4.7 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2014 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, Aspect118 = 11,
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, ChFull61 = 7, ChFull71 = 8 };
45 enum StereoMode { Stereo = 0, Left = 1, Right = 2, Mono = 3, Reverse = 4 };
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 enum SubFPS { SFPS_None, SFPS_23, SFPS_24, SFPS_25, SFPS_30, SFPS_23976, SFPS_29970 };
53
54 MediaSettings();
55 virtual ~MediaSettings();
56
57 virtual void reset();
58
59 double current_sec;
60 int current_sub_id;
61
62#if PROGRAM_SWITCH
63 int current_program_id;
64#endif
65
66 int current_video_id;
67 int current_audio_id;
68
69 int current_title_id;
70 int current_chapter_id;
71 int current_angle_id;
72
73 int aspect_ratio_id;
74
75 //bool fullscreen;
76
77 int volume;
78 bool mute;
79
80 int brightness, contrast, gamma, hue, saturation;
81
82 AudioEqualizerList audio_equalizer;
83
84 QString external_subtitles;
85 int external_subtitles_fps;
86 QString external_audio; // external audio file
87
88 int sub_delay;
89 int audio_delay;
90
91 // Subtitles position (0-100)
92 int sub_pos;
93 double sub_scale;
94 double sub_scale_ass;
95
96 int closed_caption_channel; // 0 = disabled
97
98 double speed; // Speed of playback: 1.0 = normal speed
99
100 int current_deinterlacer;
101
102 bool add_letterbox;
103
104 // Filters in menu
105 bool phase_filter;
106 bool deblock_filter;
107 bool dering_filter;
108 bool gradfun_filter;
109 bool noise_filter;
110 bool postprocessing_filter;
111 bool upscaling_filter; //!< Software scaling
112
113 int current_denoiser;
114 int current_unsharp;
115
116 bool karaoke_filter;
117 bool extrastereo_filter;
118 bool volnorm_filter;
119
120 int audio_use_channels;
121 int stereo_mode;
122
123 double zoom_factor; // mplayerwindow zoom
124
125#if USE_MPLAYER_PANSCAN
126 double panscan_factor;
127#endif
128
129 int rotate;
130 bool flip; //!< Flip image
131 bool mirror; //!< Mirrors the image on the Y axis.
132
133 bool loop; //!< Loop. If true repeat the file
134 int A_marker;
135 int B_marker;
136
137 // This a property of the video and it should be
138 // in mediadata, but we have to save it to preserve
139 // this data among restarts.
140 double starting_time; // Some videos don't start at 0
141
142 //! The codec of the video is ffh264 and it's high definition
143 bool is264andHD;
144
145 // Advanced settings
146 QString forced_demuxer;
147 QString forced_video_codec;
148 QString forced_audio_codec;
149
150 // A copy of the original values, so we can restore them.
151 QString original_demuxer;
152 QString original_video_codec;
153 QString original_audio_codec;
154
155 // Options to mplayer (for this file only)
156 QString mplayer_additional_options;
157 QString mplayer_additional_video_filters;
158 QString mplayer_additional_audio_filters;
159
160 // Some things that were before in mediadata
161 // They can vary, because of filters, so better here
162
163 //Resolution used by mplayer
164 //Can be bigger that video resolution
165 //because of the aspect ratio or expand filter
166 int win_width;
167 int win_height;
168 double win_aspect();
169
170 //! Returns the aspect as a double. Returns 0 if aspect == AspectNone.
171 double aspectToNum(Aspect aspect);
172 static QString aspectToString(Aspect aspect);
173
174 void list();
175
176#ifndef NO_USE_INI_FILES
177 void save(QSettings * set);
178 void load(QSettings * set);
179#endif
180};
181
182#endif
Note: See TracBrowser for help on using the repository browser.