~ubuntu-branches/debian/sid/smplayer/sid

« back to all changes in this revision

Viewing changes to src/corelib/mediasettings.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-03-31 23:05:43 UTC
  • mto: (1.1.9 upstream) (3.1.2 squeeze)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20090331230543-nsklbxenl2hf2n6h
Tags: upstream-0.6.7
ImportĀ upstreamĀ versionĀ 0.6.7

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
 
#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
 
 
30
 
class QSettings;
31
 
 
32
 
class MediaSettings {
33
 
 
34
 
public:
35
 
        enum Denoise { NoDenoise = 0, DenoiseNormal = 1, DenoiseSoft = 2 };
36
 
#if NEW_ASPECT_CODE
37
 
        enum Aspect { AspectAuto = 1, Aspect43 = 2, Aspect169 = 3, Aspect235 = 4,
38
 
                  Aspect149 = 8, Aspect1610 = 9, Aspect54 = 10 };
39
 
#else
40
 
        enum Aspect { AspectAuto = 1, Aspect43 = 2, Aspect169 = 3, Aspect235 = 4,
41
 
                  Aspect43Letterbox = 5, Aspect43Panscan = 6, 
42
 
                  Aspect43To169 = 7, Aspect149 = 8, Aspect1610 = 9, 
43
 
                  Aspect54 = 10, Aspect169Letterbox = 11 };
44
 
        enum LetterboxType { NoLetterbox = 0, Letterbox_43 = 1, Letterbox_169 = 2 };
45
 
#endif
46
 
        enum Deinterlace { NoDeinterlace = 0, L5 = 1, Yadif = 2, LB = 3, 
47
 
                       Yadif_1 = 4, Kerndeint = 5 };
48
 
        enum AudioChannels { ChDefault = 0, ChStereo = 2, ChSurround = 4, 
49
 
                         ChFull51 = 6 };
50
 
        enum StereoMode { Stereo = 0, Left = 1, Right = 2 };
51
 
 
52
 
        enum Rotate { NoRotate = -1, Clockwise_flip = 0, Clockwise = 1, 
53
 
                  Counterclockwise = 2, Counterclockwise_flip = 3 };
54
 
 
55
 
        enum IDs { NoneSelected = -1000, SubNone = 90000 };
56
 
 
57
 
        MediaSettings();
58
 
        virtual ~MediaSettings();
59
 
 
60
 
        virtual void reset();
61
 
 
62
 
        double current_sec;
63
 
        int current_sub_id;
64
 
 
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
 
        QString external_subtitles;
81
 
        QString external_audio; // external audio file
82
 
 
83
 
        int sub_delay;
84
 
        int audio_delay;
85
 
 
86
 
        // Subtitles position (0-100)
87
 
        int sub_pos;
88
 
        double sub_scale;
89
 
#if SCALE_ASS_SUBS
90
 
        double sub_scale_ass;
91
 
#endif
92
 
 
93
 
        double speed; // Speed of playback: 1.0 = normal speed
94
 
 
95
 
        int current_deinterlacer;
96
 
 
97
 
#if NEW_ASPECT_CODE
98
 
        bool add_letterbox;
99
 
#else
100
 
        LetterboxType letterbox; // Force letterbox
101
 
        QString panscan_filter;
102
 
        QString crop_43to169_filter;
103
 
#endif
104
 
 
105
 
        // Filters in menu
106
 
        bool phase_filter;
107
 
        int current_denoiser;
108
 
        bool deblock_filter;
109
 
        bool dering_filter;
110
 
        bool noise_filter;
111
 
        bool postprocessing_filter;
112
 
        bool upscaling_filter; //!< Software scaling
113
 
 
114
 
        bool karaoke_filter;
115
 
        bool extrastereo_filter;
116
 
        bool volnorm_filter;
117
 
 
118
 
        int audio_use_channels;
119
 
        int stereo_mode;
120
 
 
121
 
        double panscan_factor; // mplayerwindow zoom
122
 
 
123
 
        int rotate;
124
 
        bool flip; //!< Flip image
125
 
 
126
 
        // This a property of the video and it should be
127
 
    // in mediadata, but we have to save it to preserve 
128
 
        // this data among restarts.
129
 
        double starting_time; // Some videos don't start at 0
130
 
 
131
 
        //! The codec of the video is ffh264 and it's high definition
132
 
        bool is264andHD;
133
 
 
134
 
        // Advanced settings
135
 
        QString forced_demuxer;
136
 
        QString forced_video_codec;
137
 
        QString forced_audio_codec;
138
 
 
139
 
        // A copy of the original values, so we can restore them.
140
 
        QString original_demuxer;
141
 
        QString original_video_codec;
142
 
        QString original_audio_codec;
143
 
 
144
 
        // Options to mplayer (for this file only)
145
 
        QString mplayer_additional_options;
146
 
        QString mplayer_additional_video_filters;
147
 
        QString mplayer_additional_audio_filters;
148
 
 
149
 
        // Some things that were before in mediadata
150
 
        // They can vary, because of filters, so better here
151
 
 
152
 
        //Resolution used by mplayer
153
 
    //Can be bigger that video resolution
154
 
    //because of the aspect ratio or expand filter
155
 
    int win_width;
156
 
    int win_height;
157
 
    double win_aspect();
158
 
 
159
 
 
160
 
        void list();
161
 
 
162
 
#ifndef NO_USE_INI_FILES
163
 
        void save(QSettings * set);
164
 
        void load(QSettings * set);
165
 
#endif
166
 
};
167
 
 
168
 
#endif