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

Last change on this file since 97 was 93, checked in by Silvan Scherrer, 15 years ago

smplayer: 0.6.9

File size: 4.6 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2010 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#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 double speed; // Speed of playback: 1.0 = normal speed
94
95 int current_deinterlacer;
96
97 bool add_letterbox;
98
99 // Filters in menu
100 bool phase_filter;
101 int current_denoiser;
102 bool deblock_filter;
103 bool dering_filter;
104 bool noise_filter;
105 bool postprocessing_filter;
106 bool upscaling_filter; //!< Software scaling
107
108 bool karaoke_filter;
109 bool extrastereo_filter;
110 bool volnorm_filter;
111
112 int audio_use_channels;
113 int stereo_mode;
114
115 double zoom_factor; // mplayerwindow zoom
116
117#if USE_MPLAYER_PANSCAN
118 double panscan_factor;
119#endif
120
121 int rotate;
122 bool flip; //!< Flip image
123 bool mirror; //!< Mirrors the image on the Y axis.
124
125 bool loop; //!< Loop. If true repeat the file
126 int A_marker;
127 int B_marker;
128
129 // This a property of the video and it should be
130 // in mediadata, but we have to save it to preserve
131 // this data among restarts.
132 double starting_time; // Some videos don't start at 0
133
134 //! The codec of the video is ffh264 and it's high definition
135 bool is264andHD;
136
137 // Advanced settings
138 QString forced_demuxer;
139 QString forced_video_codec;
140 QString forced_audio_codec;
141
142 // A copy of the original values, so we can restore them.
143 QString original_demuxer;
144 QString original_video_codec;
145 QString original_audio_codec;
146
147 // Options to mplayer (for this file only)
148 QString mplayer_additional_options;
149 QString mplayer_additional_video_filters;
150 QString mplayer_additional_audio_filters;
151
152 // Some things that were before in mediadata
153 // They can vary, because of filters, so better here
154
155 //Resolution used by mplayer
156 //Can be bigger that video resolution
157 //because of the aspect ratio or expand filter
158 int win_width;
159 int win_height;
160 double win_aspect();
161
162 //! Returns the aspect as a double. Returns 0 if aspect == AspectNone.
163 double aspectToNum(Aspect aspect);
164 static QString aspectToString(Aspect aspect);
165
166 void list();
167
168#ifndef NO_USE_INI_FILES
169 void save(QSettings * set);
170 void load(QSettings * set);
171#endif
172};
173
174#endif
Note: See TracBrowser for help on using the repository browser.