source: smplayer/trunk/src/mpvprocess.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

File size: 5.1 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 MPVPROCESS_H
20#define MPVPROCESS_H
21
22#include <QString>
23#include "playerprocess.h"
24#include "config.h"
25
26class QStringList;
27
28class MPVProcess : public PlayerProcess
29{
30 Q_OBJECT
31
32public:
33 MPVProcess(QObject * parent = 0);
34 ~MPVProcess();
35
36 bool start();
37
38 // Command line options
39 void addArgument(const QString & a);
40 void setMedia(const QString & media, bool is_playlist = false);
41 void disableInput();
42 void setFixedOptions();
43 void setOption(const QString & option_name, const QVariant & value = QVariant());
44 void addUserOption(const QString & option);
45 void addVF(const QString & filter_name, const QVariant & value = QVariant());
46 void addAF(const QString & filter_name, const QVariant & value = QVariant());
47 void addStereo3DFilter(const QString & in, const QString & out);
48 void setSubStyles(const AssStyles & styles, const QString & assStylesFile = QString::null);
49
50 // Slave commands
51 void quit();
52 void setVolume(int v);
53 void setOSD(int o);
54 void setAudio(int ID);
55 void setVideo(int ID);
56 void setSubtitle(int type, int ID);
57 void disableSubtitles();
58 void setSecondarySubtitle(int ID);
59 void disableSecondarySubtitles();
60 void setSubtitlesVisibility(bool b);
61 void seek(double secs, int mode, bool precise);
62 void mute(bool b);
63 void setPause(bool b);
64 void frameStep();
65 void frameBackStep();
66 void showOSDText(const QString & text, int duration, int level);
67 void showFilenameOnOSD();
68 void showTimeOnOSD();
69 void setContrast(int value);
70 void setBrightness(int value);
71 void setHue(int value);
72 void setSaturation(int value);
73 void setGamma(int value);
74 void setChapter(int ID);
75 void nextChapter();
76 void previousChapter();
77 void setExternalSubtitleFile(const QString & filename);
78 void setSubPos(int pos);
79 void setSubScale(double value);
80 void setSubStep(int value);
81 void seekSub(int value);
82 void setSubForcedOnly(bool b);
83 void setSpeed(double value);
84#ifdef MPLAYER_SUPPORT
85 void enableKaraoke(bool b);
86#endif
87 void enableExtrastereo(bool b);
88 void enableVolnorm(bool b, const QString & option);
89 void setAudioEqualizer(const QString & values);
90 void setAudioDelay(double delay);
91 void setSubDelay(double delay);
92 void setLoop(int v);
93 void setAMarker(int sec);
94 void setBMarker(int sec);
95 void clearABMarkers();
96 void takeScreenshot(ScreenshotType t, bool include_subtitles = false);
97#ifdef CAPTURE_STREAM
98 void switchCapturing();
99#endif
100 void setTitle(int ID);
101 void changeVF(const QString & filter, bool enable, const QVariant & option = QVariant());
102 void changeStereo3DFilter(bool enable, const QString & in, const QString & out);
103#if DVDNAV_SUPPORT
104 void discSetMousePos(int x, int y);
105 void discButtonPressed(const QString & button_name);
106#endif
107 void setAspect(double aspect);
108 void setFullscreen(bool b);
109#if PROGRAM_SWITCH
110 void setTSProgram(int ID);
111#endif
112 void toggleDeinterlace();
113 void askForLength();
114 void setOSDScale(double value);
115 void setChannelsFile(const QString &);
116
117 void enableScreenshots(const QString & dir, const QString & templ = QString::null, const QString & format = QString::null);
118
119 QString mpvVersion() { return mpv_version; };
120
121protected:
122 bool isOptionAvailable(const QString & option);
123 void addVFIfAvailable(const QString & vf, const QString & value = QString::null);
124 void messageFilterNotSupported(const QString & filter_name);
125
126protected slots:
127 void parseLine(QByteArray ba);
128 void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
129 void gotError(QProcess::ProcessError);
130 void requestChapterInfo();
131 void requestBitrateInfo();
132
133protected:
134#if NOTIFY_AUDIO_CHANGES
135 void updateAudioTrack(int ID, const QString & name, const QString & lang);
136#endif
137#if NOTIFY_SUB_CHANGES
138 void updateSubtitleTrack(int ID, const QString & name, const QString & lang);
139#endif
140
141private:
142 bool notified_mplayer_is_running;
143 bool notified_pause;
144 bool received_end_of_file;
145
146 int last_sub_id;
147
148 int mplayer_svn;
149
150 QString mpv_version;
151 bool verbose;
152
153#if NOTIFY_SUB_CHANGES
154 SubTracks subs;
155
156 bool subtitle_info_received;
157 bool subtitle_info_changed;
158#endif
159
160#if NOTIFY_AUDIO_CHANGES
161 Tracks audios;
162 bool audio_info_changed;
163#endif
164
165#if NOTIFY_VIDEO_CHANGES
166 Tracks videos;
167 bool video_info_changed;
168#endif
169
170#if NOTIFY_CHAPTER_CHANGES
171 Chapters chapters;
172 bool chapter_info_changed;
173#endif
174
175 int dvd_current_title;
176 int br_current_title;
177
178 QString previous_eq;
179
180#ifdef CAPTURE_STREAM
181 bool capturing;
182#endif
183};
184
185#endif
Note: See TracBrowser for help on using the repository browser.