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

Last change on this file since 181 was 181, checked in by Silvan Scherrer, 9 years ago

smplayer: update trunk to version 16.8.0

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