1 ///////////////////////////////////////////////////////////////////////////////
2 // Simple x264 Launcher
3 // Copyright (C) 2004-2014 LoRd_MuldeR <MuldeR2@GMX.de>
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License along
16 // with this program; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
43 RCMode rcMode(void) const { return m_rcMode; }
44 unsigned int bitrate(void) const { return m_bitrate; }
45 double quantizer(void) const { return m_quantizer; }
46 QString preset(void) const { return m_preset; }
47 QString tune(void) const { return m_tune; }
48 QString profile(void) const { return m_profile; }
49 QString customX264(void) const { return m_custom_x264; }
50 QString customAvs2YUV(void) const { return m_custom_avs2yuv; }
53 void setRCMode(RCMode mode) { m_rcMode = qBound(RCMode_CRF, mode, RCMode_ABR); }
54 void setBitrate(unsigned int bitrate) { m_bitrate = qBound(10U, bitrate, 800000U); }
55 void setQuantizer(double quantizer) { m_quantizer = qBound(0.0, quantizer, 52.0); }
56 void setPreset(const QString &preset) { m_preset = preset.trimmed(); }
57 void setTune(const QString &tune) { m_tune = tune.trimmed(); }
58 void setProfile(const QString &profile) { m_profile = profile.trimmed(); }
59 void setCustomX264(const QString &custom) { m_custom_x264 = custom.trimmed(); }
60 void setCustomAvs2YUV(const QString &custom) { m_custom_avs2yuv = custom.trimmed(); }
63 bool equals(OptionsModel *model);
66 static QString rcMode2String(RCMode mode);
67 static bool saveTemplate(OptionsModel *model, const QString &name);
68 static bool loadTemplate(OptionsModel *model, const QString &name);
69 static QMap<QString, OptionsModel*> loadAllTemplates(void);
70 static bool templateExists(const QString &name);
71 static bool deleteTemplate(const QString &name);
75 unsigned int m_bitrate;
80 QString m_custom_x264;
81 QString m_custom_avs2yuv;