├── FFCommand_Engine
├── Colorlab
├── FFCommand_Engine.icns
├── FFCommand_Engine.ico
├── FFCommand_Engine.png
├── FFCommand_Engine.rc
├── FFMPEG_QFE.pro.user
├── aboutdialog.cpp
├── aboutdialog.h
├── aboutdialog.ui
├── colorlab.png
├── colorlab.qrc
├── ff_commandmodel.qmodel
├── ffcommand_engine.pro
├── ffmpegarg.h
├── ffmpegbinarydialog.cpp
├── ffmpegbinarydialog.h
├── ffmpegbinarydialog.ui
├── ffprocessobj.cpp
├── ffprocessobj.h
├── ffprocessobj.ui
├── images.qrc
├── main.cpp
├── outputfileform.cpp
├── outputfileform.h
├── outputfileform.ui
├── parsecommanddialog.cpp
├── parsecommanddialog.h
├── parsecommanddialog.ui
├── presetsavedialog.cpp
├── presetsavedialog.h
├── presetsavedialog.ui
├── processqueuedialog.cpp
├── processqueuedialog.h
├── processqueuedialog.ui
├── qfe_window.cpp
├── qfe_window.h
├── qfe_window.ui
├── qfetablewidget.cpp
├── qfetablewidget.h
├── qjsonmodel.cpp
└── qjsonmodel.h
└── README.md
/FFCommand_Engine/Colorlab:
--------------------------------------------------------------------------------
1 | Hello WOrld
2 |
--------------------------------------------------------------------------------
/FFCommand_Engine/FFCommand_Engine.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlabMD/FFCommand_Engine/b490af7d6f1d68bafe22a324d9bbc9d34704dbb2/FFCommand_Engine/FFCommand_Engine.icns
--------------------------------------------------------------------------------
/FFCommand_Engine/FFCommand_Engine.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlabMD/FFCommand_Engine/b490af7d6f1d68bafe22a324d9bbc9d34704dbb2/FFCommand_Engine/FFCommand_Engine.ico
--------------------------------------------------------------------------------
/FFCommand_Engine/FFCommand_Engine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlabMD/FFCommand_Engine/b490af7d6f1d68bafe22a324d9bbc9d34704dbb2/FFCommand_Engine/FFCommand_Engine.png
--------------------------------------------------------------------------------
/FFCommand_Engine/FFCommand_Engine.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON DISCARDABLE "FFCommand_Engine.ico"
2 |
--------------------------------------------------------------------------------
/FFCommand_Engine/FFMPEG_QFE.pro.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | EnvironmentId
7 | {06657152-53bc-47ad-934b-1e50773f056d}
8 |
9 |
10 | ProjectExplorer.Project.ActiveTarget
11 | 0
12 |
13 |
14 | ProjectExplorer.Project.EditorSettings
15 |
16 | true
17 | false
18 | true
19 |
20 | Cpp
21 |
22 | CppGlobal
23 |
24 |
25 |
26 | QmlJS
27 |
28 | QmlJSGlobal
29 |
30 |
31 | 2
32 | UTF-8
33 | false
34 | 4
35 | false
36 | 80
37 | true
38 | true
39 | 1
40 | true
41 | false
42 | 0
43 | true
44 | true
45 | 0
46 | 8
47 | true
48 | 1
49 | true
50 | true
51 | true
52 | false
53 |
54 |
55 |
56 | ProjectExplorer.Project.PluginSettings
57 |
58 |
59 | true
60 |
61 |
62 |
63 | ProjectExplorer.Project.Target.0
64 |
65 | Desktop Qt 5.12.1 clang 64bit
66 | Desktop Qt 5.12.1 clang 64bit
67 | qt.qt5.5121.clang_64_kit
68 | 0
69 | 0
70 | 0
71 |
72 | /Users/taschenbach/Documents/QTCode/build-FFMPEG_QFE-Desktop_Qt_5_12_1_clang_64bit-Debug
73 |
74 |
75 | true
76 | qmake
77 |
78 | QtProjectManager.QMakeBuildStep
79 | true
80 |
81 | false
82 | false
83 | false
84 |
85 |
86 | true
87 | Make
88 |
89 | Qt4ProjectManager.MakeStep
90 |
91 | false
92 |
93 |
94 | false
95 |
96 | 2
97 | Build
98 |
99 | ProjectExplorer.BuildSteps.Build
100 |
101 |
102 |
103 | true
104 | Make
105 |
106 | Qt4ProjectManager.MakeStep
107 |
108 | true
109 | clean
110 |
111 | false
112 |
113 | 1
114 | Clean
115 |
116 | ProjectExplorer.BuildSteps.Clean
117 |
118 | 2
119 | false
120 |
121 | Debug
122 | Debug
123 | Qt4ProjectManager.Qt4BuildConfiguration
124 | 2
125 | true
126 |
127 |
128 | /Users/taschenbach/Documents/QTCode/build-FFMPEG_QFE-Desktop_Qt_5_12_1_clang_64bit-Release
129 |
130 |
131 | true
132 | qmake
133 |
134 | QtProjectManager.QMakeBuildStep
135 | false
136 |
137 | false
138 | false
139 | true
140 |
141 |
142 | true
143 | Make
144 |
145 | Qt4ProjectManager.MakeStep
146 |
147 | false
148 |
149 |
150 | false
151 |
152 | 2
153 | Build
154 |
155 | ProjectExplorer.BuildSteps.Build
156 |
157 |
158 |
159 | true
160 | Make
161 |
162 | Qt4ProjectManager.MakeStep
163 |
164 | true
165 | clean
166 |
167 | false
168 |
169 | 1
170 | Clean
171 |
172 | ProjectExplorer.BuildSteps.Clean
173 |
174 | 2
175 | false
176 |
177 | Release
178 | Release
179 | Qt4ProjectManager.Qt4BuildConfiguration
180 | 0
181 | true
182 |
183 |
184 | /Users/taschenbach/Documents/QTCode/build-FFMPEG_QFE-Desktop_Qt_5_12_1_clang_64bit-Profile
185 |
186 |
187 | true
188 | qmake
189 |
190 | QtProjectManager.QMakeBuildStep
191 | true
192 |
193 | false
194 | true
195 | true
196 |
197 |
198 | true
199 | Make
200 |
201 | Qt4ProjectManager.MakeStep
202 |
203 | false
204 |
205 |
206 | false
207 |
208 | 2
209 | Build
210 |
211 | ProjectExplorer.BuildSteps.Build
212 |
213 |
214 |
215 | true
216 | Make
217 |
218 | Qt4ProjectManager.MakeStep
219 |
220 | true
221 | clean
222 |
223 | false
224 |
225 | 1
226 | Clean
227 |
228 | ProjectExplorer.BuildSteps.Clean
229 |
230 | 2
231 | false
232 |
233 | Profile
234 | Profile
235 | Qt4ProjectManager.Qt4BuildConfiguration
236 | 0
237 | true
238 |
239 | 3
240 |
241 |
242 | 0
243 | Deploy
244 |
245 | ProjectExplorer.BuildSteps.Deploy
246 |
247 | 1
248 | Deploy Configuration
249 |
250 | ProjectExplorer.DefaultDeployConfiguration
251 |
252 | 1
253 |
254 |
255 | false
256 | false
257 | 1000
258 |
259 | true
260 |
261 | false
262 | false
263 | false
264 | false
265 | true
266 | 0.01
267 | 10
268 | true
269 | 1
270 | 25
271 |
272 | 1
273 | true
274 | false
275 | true
276 | valgrind
277 |
278 | 0
279 | 1
280 | 2
281 | 3
282 | 4
283 | 5
284 | 6
285 | 7
286 | 8
287 | 9
288 | 10
289 | 11
290 | 12
291 | 13
292 | 14
293 |
294 | 2
295 |
296 | FFMPEG_QFE
297 |
298 | Qt4ProjectManager.Qt4RunConfiguration:/Users/taschenbach/Documents/QTCode/FFMPEG_QFE/FFMPEG_QFE.pro
299 | FFMPEG_QFE.pro
300 |
301 | 3768
302 | false
303 | true
304 | false
305 | true
306 | false
307 | false
308 | true
309 |
310 | /Users/taschenbach/Documents/QTCode/build-FFMPEG_QFE-Desktop_Qt_5_12_1_clang_64bit-Debug/FFCommand_Engine.app/Contents/MacOS
311 |
312 | 1
313 |
314 |
315 |
316 | ProjectExplorer.Project.TargetCount
317 | 1
318 |
319 |
320 | ProjectExplorer.Project.Updater.FileVersion
321 | 20
322 |
323 |
324 | Version
325 | 20
326 |
327 |
328 |
--------------------------------------------------------------------------------
/FFCommand_Engine/aboutdialog.cpp:
--------------------------------------------------------------------------------
1 | #include "aboutdialog.h"
2 | #include "ui_aboutdialog.h"
3 | #include
4 | aboutDialog::aboutDialog(QWidget *parent) :
5 | QDialog(parent),
6 | ui(new Ui::aboutDialog)
7 | {
8 | ui->setupUi(this);
9 |
10 | }
11 |
12 | aboutDialog::~aboutDialog()
13 | {
14 | delete ui;
15 | }
16 |
17 | void aboutDialog::on_label_2_linkActivated(const QString &link)
18 | {
19 |
20 | QDesktopServices::openUrl(QUrl("http://www.colorlab.com/"));
21 | }
22 |
--------------------------------------------------------------------------------
/FFCommand_Engine/aboutdialog.h:
--------------------------------------------------------------------------------
1 | #ifndef ABOUTDIALOG_H
2 | #define ABOUTDIALOG_H
3 |
4 | #include
5 |
6 | namespace Ui {
7 | class aboutDialog;
8 | }
9 |
10 | class aboutDialog : public QDialog
11 | {
12 | Q_OBJECT
13 |
14 | public:
15 | explicit aboutDialog(QWidget *parent = nullptr);
16 | ~aboutDialog();
17 |
18 | private slots:
19 | void on_label_2_linkActivated(const QString &link);
20 |
21 | private:
22 | Ui::aboutDialog *ui;
23 | };
24 |
25 | #endif // ABOUTDIALOG_H
26 |
--------------------------------------------------------------------------------
/FFCommand_Engine/aboutdialog.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | aboutDialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 645
10 | 385
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 |
18 |
19 | 90
20 | 100
21 | 261
22 | 16
23 |
24 |
25 |
26 | Thomas Aschenbach 2019
27 |
28 |
29 |
30 |
31 |
32 | 90
33 | 70
34 | 261
35 | 16
36 |
37 |
38 |
39 | FFCommand Engine Version 0.6
40 |
41 |
42 |
43 |
44 |
45 | 30
46 | 200
47 | 591
48 | 171
49 |
50 |
51 |
52 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
53 | <html><head><meta name="qrichtext" content="1" /><style type="text/css">
54 | p, li { white-space: pre-wrap; }
55 | </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;">
56 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">//-----------------------------------------------------------------------------</span></p>
57 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> FFCommand Engine</span></p>
58 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span></p>
59 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">Copyright</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">(c)</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">2019</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">Thomas</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">Aschenbach,</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">Colorlab</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">Corporation</span></p>
60 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span></p>
61 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">This</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">program</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">is</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">free</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">software;</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">you</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">can</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">redistribute</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">it</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">and/or</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">modify</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">it</span></p>
62 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">under</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">the</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">terms</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">of</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">the</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">GNU</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">General</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">Public</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">License</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">as</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">published</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">by</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">the</span></p>
63 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">Free</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">Software</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">Foundation;</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">either</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">version</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">2</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">of</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">the</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">License,</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">or</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">(at</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">your</span></p>
64 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">option)</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">any</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">later</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">version.</span></p>
65 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span></p>
66 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">FFCommand_Engine</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">is</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">distributed</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">in</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">the</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">hope</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">that</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">it</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">will</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">be</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">useful,</span></p>
67 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">but</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">WITHOUT</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">ANY</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">WARRANTY;</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">without</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">even</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">the</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">implied</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">warranty</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">of</span></p>
68 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">MERCHANTABILITY</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">or</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">FITNESS</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">FOR</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">A</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">PARTICULAR</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">PURPOSE.</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">See</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">the</span></p>
69 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">GNU</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">General</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">Public</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">License</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">for</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">more</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">details.</span></p>
70 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">You</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">should</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">have</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">received</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">a</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">copy</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">of</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">the</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">GNU</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">General</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">Public</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">License</span></p>
71 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">along</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">with</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">this</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">program.</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">If</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">not,</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;">see</span><span style=" font-family:'Monaco'; color:#c0c0c0;"> </span><span style=" font-family:'Monaco'; color:#008000;"><https://www.gnu.org/licenses/>.</span></p>
72 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monaco'; color:#008000;">//--------------------------------------------------------------------------</span></p>
73 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
74 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Monaco';"><br /></p></body></html>
75 |
76 |
77 |
78 |
79 |
80 | 90
81 | 120
82 | 261
83 | 51
84 |
85 |
86 |
87 | <html><head/><body><p><a href="http://www.colorlab.com"><span style=" text-decoration: underline; color:#0000ff;">Colorlab Corporation</span></a></p><p><a href="http://www.colorlab.com"><span style=" text-decoration: underline; color:#0000ff;">www.colorlab.com</span></a></p></body></html>
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/FFCommand_Engine/colorlab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ColorlabMD/FFCommand_Engine/b490af7d6f1d68bafe22a324d9bbc9d34704dbb2/FFCommand_Engine/colorlab.png
--------------------------------------------------------------------------------
/FFCommand_Engine/colorlab.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | Colorlab
4 |
5 |
6 |
--------------------------------------------------------------------------------
/FFCommand_Engine/ff_commandmodel.qmodel:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {73a3ac3a-01b0-48ed-b5b2-441894a53c4d}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {9cd29e4e-9959-4015-9364-74e8119356a2}
13 |
14 |
15 | ff_commandmodel
16 |
17 |
18 |
19 |
20 | -
21 |
22 | {71945bc7-8c31-4fbf-96bf-168db6b15afe}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | {71945bc7-8c31-4fbf-96bf-168db6b15afe}
33 |
34 |
35 | ff_commandmodel
36 |
37 |
38 |
39 |
40 |
-
41 |
42 |
43 |
44 |
45 |
46 |
47 | {fde148ff-81ff-43c8-8c32-7f01bf89330e}
48 |
49 |
50 |
51 | New Item
52 | x:230;y:185
53 | x:-95;y:-75;w:190;h:150
54 | false
55 | 0
56 |
57 |
58 | false
59 |
60 |
61 |
62 |
63 |
64 | 1552138073399
65 | General
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | -
74 |
75 | {d7d7aacd-3855-48a5-bbba-8ec2f47f0237}
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | {d7d7aacd-3855-48a5-bbba-8ec2f47f0237}
84 |
85 |
86 | New Item
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/FFCommand_Engine/ffcommand_engine.pro:
--------------------------------------------------------------------------------
1 |
2 | #-------------------------------------------------
3 | #
4 | # Project created by QtCreator 2019-03-08T19:27:55
5 | #
6 | #-------------------------------------------------
7 |
8 | QT += core gui xml
9 |
10 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
11 |
12 | TARGET = FFCommand_Engine
13 | TEMPLATE = app
14 | RC_FILE = FFCommand_Engine.rc
15 |
16 | # The following define makes your compiler emit warnings if you use
17 | # any feature of Qt which has been marked as deprecated (the exact warnings
18 | # depend on your compiler). Please consult the documentation of the
19 | # deprecated API in order to know how to port your code away from it.
20 | DEFINES += QT_DEPRECATED_WARNINGS
21 |
22 | # You can also make your code fail to compile if you use deprecated APIs.
23 | # In order to do so, uncomment the following line.
24 | # You can also select to disable deprecated APIs only up to a certain version of Qt.
25 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
26 |
27 | CONFIG += c++11
28 |
29 | SOURCES += \
30 | main.cpp \
31 | qfe_window.cpp \
32 | qjsonmodel.cpp \
33 | qfetablewidget.cpp \
34 | outputfileform.cpp \
35 | parsecommanddialog.cpp \
36 | presetsavedialog.cpp \
37 | ffprocessobj.cpp \
38 | processqueuedialog.cpp \
39 | ffmpegbinarydialog.cpp \
40 | aboutdialog.cpp
41 |
42 | HEADERS += \
43 | qfe_window.h \
44 | qjsonmodel.h \
45 | qfetablewidget.h \
46 | outputfileform.h \
47 | ffmpegarg.h \
48 | parsecommanddialog.h \
49 | presetsavedialog.h \
50 | ffprocessobj.h \
51 | processqueuedialog.h \
52 | ffmpegbinarydialog.h \
53 | aboutdialog.h
54 |
55 | FORMS += \
56 | qfe_window.ui \
57 | outputfileform.ui \
58 | parsecommanddialog.ui \
59 | presetsavedialog.ui \
60 | ffprocessobj.ui \
61 | processqueuedialog.ui \
62 | ffmpegbinarydialog.ui \
63 | aboutdialog.ui
64 |
65 | # Default rules for deployment.
66 | qnx: target.path = /tmp/$${TARGET}/bin
67 | else: unix:!android: target.path = /opt/$${TARGET}/bin
68 | !isEmpty(target.path): INSTALLS += target
69 |
70 | win32:DISTFILES += FFCommand_Engine.rc
71 | ICON = FFCommand_Engine.icns
72 | RESOURCES += \
73 | images.qrc
74 |
75 | DISTFILES += \
76 | FFCommand_Engine.png
77 |
--------------------------------------------------------------------------------
/FFCommand_Engine/ffmpegarg.h:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 |
20 | #ifndef FFMPEGARG_H
21 | #define FFMPEGARG_H
22 | #include
23 | #include
24 | #include
25 |
26 | typedef struct ffcommand
27 | {
28 |
29 | QString parameter;
30 | QString parameter_value;
31 |
32 | }ffcommand;
33 |
34 |
35 | typedef struct ffprocess
36 | {
37 |
38 | QElapsedTimer *timer;
39 | QProcess *process;
40 | QString args;
41 |
42 |
43 | }ffprocess;
44 |
45 |
46 |
47 |
48 |
49 | #endif // FFMPEGARG_H
50 |
--------------------------------------------------------------------------------
/FFCommand_Engine/ffmpegbinarydialog.cpp:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 |
20 | #include "ffmpegbinarydialog.h"
21 | #include "ui_ffmpegbinarydialog.h"
22 | #include
23 | ffmpegbinaryDialog::ffmpegbinaryDialog(QWidget *parent) :
24 | QDialog(parent),
25 | ui(new Ui::ffmpegbinaryDialog)
26 | {
27 |
28 | ui->setupUi(this);
29 |
30 | }
31 |
32 | ffmpegbinaryDialog::~ffmpegbinaryDialog()
33 | {
34 |
35 | delete ui;
36 |
37 | }
38 | void ffmpegbinaryDialog::setup(QString currentloc)
39 | {
40 | ui->location_le->setText(currentloc);
41 | location= currentloc;
42 | }
43 |
44 | void ffmpegbinaryDialog::on_setfolder_btn_clicked()
45 | {
46 |
47 | QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
48 | location,
49 | QFileDialog::ShowDirsOnly
50 | | QFileDialog::DontResolveSymlinks);
51 |
52 | if (!dir.isEmpty())
53 | location=dir;
54 |
55 | ui->location_le->setText(location);
56 | }
57 |
58 | void ffmpegbinaryDialog::on_location_le_textChanged(const QString &arg1)
59 | {
60 | location=ui->location_le->text();
61 | }
62 |
--------------------------------------------------------------------------------
/FFCommand_Engine/ffmpegbinarydialog.h:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 | #ifndef FFMPEGBINARYDIALOG_H
20 | #define FFMPEGBINARYDIALOG_H
21 |
22 | #include
23 |
24 | namespace Ui {
25 | class ffmpegbinaryDialog;
26 | }
27 |
28 | class ffmpegbinaryDialog : public QDialog
29 | {
30 | Q_OBJECT
31 |
32 | public:
33 | explicit ffmpegbinaryDialog(QWidget *parent = nullptr);
34 | ~ffmpegbinaryDialog();
35 | QString location;
36 | void setup(QString currentloc);
37 | private slots:
38 | void on_setfolder_btn_clicked();
39 |
40 | void on_location_le_textChanged(const QString &arg1);
41 |
42 |
43 | private:
44 | Ui::ffmpegbinaryDialog *ui;
45 |
46 | };
47 |
48 | #endif // FFMPEGBINARYDIALOG_H
49 |
--------------------------------------------------------------------------------
/FFCommand_Engine/ffmpegbinarydialog.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | ffmpegbinaryDialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 630
10 | 257
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 |
18 |
19 | 250
20 | 210
21 | 341
22 | 32
23 |
24 |
25 |
26 | Qt::Horizontal
27 |
28 |
29 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok
30 |
31 |
32 |
33 |
34 |
35 | 20
36 | 140
37 | 581
38 | 21
39 |
40 |
41 |
42 |
43 |
44 |
45 | 230
46 | 40
47 | 151
48 | 16
49 |
50 |
51 |
52 | ffmpeg binaries folder
53 |
54 |
55 |
56 |
57 |
58 | 30
59 | 100
60 | 171
61 | 32
62 |
63 |
64 |
65 | Select Folder
66 |
67 |
68 |
69 |
70 |
71 |
72 | buttonBox
73 | accepted()
74 | ffmpegbinaryDialog
75 | accept()
76 |
77 |
78 | 248
79 | 254
80 |
81 |
82 | 157
83 | 274
84 |
85 |
86 |
87 |
88 | buttonBox
89 | rejected()
90 | ffmpegbinaryDialog
91 | reject()
92 |
93 |
94 | 316
95 | 260
96 |
97 |
98 | 286
99 | 274
100 |
101 |
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/FFCommand_Engine/ffprocessobj.cpp:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 | #include "ffprocessobj.h"
20 | #include "ui_ffprocessobj.h"
21 | #include
22 | #include
23 | #include
24 | ffprocessobj::ffprocessobj(QWidget *parent) :
25 | QDialog(parent),
26 | ui(new Ui::ffprocessobj)
27 | {
28 |
29 | ui->setupUi(this);
30 | setWindowFlags( Qt::CustomizeWindowHint | Qt::WindowTitleHint |Qt::WindowMinimizeButtonHint);
31 | Status = "queued";
32 | process = new QProcess();
33 | timer=new QElapsedTimer();
34 | ffmpeglocation= "/usr/local/bin";
35 | length =0.00001;
36 | }
37 |
38 |
39 | ffprocessobj::~ffprocessobj()
40 | {
41 | delete ui;
42 | }
43 | void ffprocessobj::process_stdout()
44 | {
45 |
46 | QByteArray ba;
47 | ba = process->readAllStandardOutput();
48 | ba += process->readAllStandardError();
49 | QString checkd;
50 |
51 |
52 | checkd = QString::fromUtf8(ba.data());
53 |
54 |
55 | ui->textBrowser->append((QString::fromUtf8(ba.data())));
56 |
57 | if (checkd.contains("Overwrite ? [y/N]"))
58 | {
59 |
60 |
61 |
62 | QMessageBox::StandardButton reply;
63 | reply = QMessageBox::question(this, "File Exists", "Overwrite?",
64 | QMessageBox::Yes|QMessageBox::No);
65 | if (reply == QMessageBox::Yes) {
66 | process->write("y\n" );
67 |
68 | } else {
69 | process->write("N\n" );
70 | }
71 | }
72 |
73 |
74 | if (checkd.contains("Duration:"))
75 | {
76 |
77 | int c= checkd.lastIndexOf("Duration:");
78 | QString ld = checkd.mid(c+10,11);
79 | //qDebug()<<"Duration"<progressBar->setValue((int)((ctime/length)*100.00));
117 |
118 | ui->p_lb->setText(QString::number((int)((ctime/length)*100.00))+"%");
119 |
120 |
121 | }
122 |
123 | }
124 |
125 |
126 |
127 | }
128 | void ffprocessobj::startprocess()
129 | {
130 | Status = "running";
131 |
132 | this->setWindowTitle("ffmpeg "+process_list.join(" "));
133 | connect(process,SIGNAL(readyReadStandardError()),this,SLOT(process_stdout()));
134 | connect(process,SIGNAL(readyReadStandardOutput()),this,SLOT(process_stdout()));
135 | connect(process , SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(process_completed(int, QProcess::ExitStatus)));
136 | QStringList L;
137 | foreach(QString s ,process_list )
138 | {
139 | s.remove('"'); //QProcess uses quotes in process args?
140 | L.append(s);
141 |
142 | }
143 | process->start(ffmpeglocation+"/ffmpeg",L,QIODevice::ReadWrite);
144 | timer->start();
145 | process->setReadChannel(QProcess::ProcessChannel::StandardOutput);
146 | ui->command_tb->append(args);
147 | }
148 | void ffprocessobj::process_completed(int ec , QProcess::ExitStatus es)
149 | {
150 |
151 | if(ec==0 && es==0)
152 | Status = "completed ";
153 | else
154 | {
155 | Status = "error ";
156 | }
157 | emit finished();
158 | ui->progressBar->setValue(100);
159 | ui->p_lb->setText(QString::number(100)+"%");
160 | double time= timer->elapsed()/1000.0;
161 |
162 | QMessageBox msgBox;
163 | if(ec==0 && es==0)
164 | ui->status_lb->setText("Process Complete in "+QString::number( time)+"seconds");
165 | else {
166 | ui->status_lb->setText("Process Failed --- Error");
167 | }
168 |
169 | //ffstdout->close();
170 |
171 | ui->killclose_btn->setText("Close");
172 |
173 |
174 |
175 |
176 | }
177 | void ffprocessobj::closeEvent( QCloseEvent* event )
178 | {
179 | emit closing();
180 | event->accept();
181 | }
182 |
183 | void ffprocessobj::on_killclose_btn_clicked()
184 | {
185 | if( process->state() == QProcess::Running)
186 | process->kill();
187 | else {
188 | this->close();
189 | }
190 |
191 |
192 | }
193 |
--------------------------------------------------------------------------------
/FFCommand_Engine/ffprocessobj.h:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 |
20 | #ifndef FFPROCESSOBJ_H
21 | #define FFPROCESSOBJ_H
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | namespace Ui {
28 | class ffprocessobj;
29 | }
30 |
31 | class ffprocessobj : public QDialog
32 | {
33 | Q_OBJECT
34 |
35 | public:
36 | explicit ffprocessobj(QWidget *parent = nullptr);
37 | ~ffprocessobj();
38 | void startprocess();
39 | void closeEvent( QCloseEvent* event );
40 | QElapsedTimer *timer;
41 | QProcess *process;
42 | QString args;
43 | QStringList process_list;
44 | QString Status;
45 | QString ffmpeglocation;
46 | double length;
47 |
48 | public slots:
49 | void process_stdout();
50 | void process_completed(int, QProcess::ExitStatus);
51 | signals:
52 | void closing();
53 | void finished();
54 | private slots:
55 | void on_killclose_btn_clicked();
56 |
57 | private:
58 | Ui::ffprocessobj *ui;
59 | };
60 |
61 | #endif // FFPROCESSOBJ_H
62 |
--------------------------------------------------------------------------------
/FFCommand_Engine/ffprocessobj.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | ffprocessobj
4 |
5 |
6 |
7 | 0
8 | 0
9 | 681
10 | 442
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 |
18 |
19 | 20
20 | 20
21 | 641
22 | 351
23 |
24 |
25 |
26 |
27 |
28 |
29 | 530
30 | 400
31 | 114
32 | 32
33 |
34 |
35 |
36 | Kill
37 |
38 |
39 |
40 |
41 |
42 | 20
43 | 380
44 | 411
45 | 16
46 |
47 |
48 |
49 | Running
50 |
51 |
52 |
53 |
54 |
55 | 25
56 | 400
57 | 481
58 | 41
59 |
60 |
61 |
62 |
63 |
64 |
65 | 380
66 | 370
67 | 251
68 | 23
69 |
70 |
71 |
72 | 0
73 |
74 |
75 |
76 |
77 |
78 | 630
79 | 380
80 | 41
81 | 16
82 |
83 |
84 |
85 | 0%
86 |
87 |
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/FFCommand_Engine/images.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | colorlab.png
4 |
5 |
6 |
--------------------------------------------------------------------------------
/FFCommand_Engine/main.cpp:
--------------------------------------------------------------------------------
1 | #include "qfe_window.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | QFE_Window w;
8 | w.show();
9 |
10 | return a.exec();
11 | }
12 |
--------------------------------------------------------------------------------
/FFCommand_Engine/outputfileform.cpp:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 |
20 |
21 | #include "outputfileform.h"
22 | #include "ui_outputfileform.h"
23 | #include
24 | OutputFileForm::OutputFileForm(QWidget *parent) :
25 | QWidget(parent),
26 | ui(new Ui::OutputFileForm)
27 | {
28 | ui->setupUi(this);
29 |
30 | ui->set_dir_btn->setVisible(false);
31 | batchmode=false;
32 | ui->outputparam_table->setSelectionBehavior(ui->outputparam_table->SelectRows);
33 | ui->outputparam_table->setSelectionMode(ui->outputparam_table->SingleSelection);
34 | ui->outputparam_table->setDragDropMode(ui->outputparam_table->InternalMove);
35 | ui->outputparam_table->setDropIndicatorShown(true);
36 | ui->outputparam_table->setDragDropOverwriteMode(false);
37 | }
38 |
39 | OutputFileForm::~OutputFileForm()
40 | {
41 | delete ui;
42 |
43 |
44 |
45 | }
46 |
47 | void OutputFileForm::on_add_param_btn_clicked()
48 | {
49 | int rowadd = ui->outputparam_table->rowCount();
50 | ui->outputparam_table->insertRow(rowadd);
51 |
52 | QTableWidgetItem *newItem1 = new QTableWidgetItem(QString());
53 | QTableWidgetItem *newItem2 = new QTableWidgetItem(QString());
54 |
55 | ui->outputparam_table->setItem(rowadd,0,newItem1);
56 | ui->outputparam_table->setItem(rowadd,1,newItem2);
57 | }
58 |
59 | void OutputFileForm::addrow(QString p,QString v)
60 | {
61 | int rowadd = ui->outputparam_table->rowCount();
62 | ui->outputparam_table->insertRow(rowadd);
63 |
64 | QTableWidgetItem *newItem1 = new QTableWidgetItem(QString(p));
65 | QTableWidgetItem *newItem2 = new QTableWidgetItem(QString(v));
66 |
67 | ui->outputparam_table->setItem(rowadd,0,newItem1);
68 | ui->outputparam_table->setItem(rowadd,1,newItem2);
69 | }
70 | void OutputFileForm::on_delete_param_btn_clicked()
71 | {
72 | ui->outputparam_table->removeRow( ui->outputparam_table->currentRow());
73 |
74 | }
75 | QStringList OutputFileForm::outputstringlist()
76 | {
77 | QStringList out;
78 | QString p, r;
79 | for(int i=0; ioutputparam_table->rowCount();i++)
80 | {
81 | if (ui->outputparam_table->item(i,0))
82 | p= ui->outputparam_table->item(i,0)->text();
83 | if (ui->outputparam_table->item(i,1))
84 | r= ui->outputparam_table->item(i,1)->text().toUtf8();
85 | out.append(p);
86 | out.append(r);
87 | }
88 | return out;
89 | }
90 |
91 | void OutputFileForm::on_outputfile_le_textChanged(const QString &arg1)
92 | {
93 | // OutputFilename =OutputDir+"/"+arg1;
94 | OutputFilename=arg1;
95 | emit updateneeded();
96 | }
97 | void OutputFileForm::setoutputfilename(QString ofn)
98 | {
99 |
100 |
101 | ui->outputfile_le->setText(ofn);
102 |
103 | }
104 |
105 | void OutputFileForm::on_outputparam_table_cellChanged(int row, int column)
106 | {
107 | emit updateneeded();
108 | }
109 |
110 |
111 | void OutputFileForm::setforbatch(bool bm)
112 | {
113 |
114 | if (bm)
115 | {
116 | ui->set_dir_btn->setVisible(true);
117 | batchmode=true;
118 | ui->outputfile_btn->setVisible(false);
119 | ui->label->setText("Append Input File Name");
120 |
121 | }
122 | else {
123 |
124 | ui->set_dir_btn->setVisible(false);
125 | batchmode=false;
126 | ui->outputfile_btn->setVisible(true);
127 |
128 | ui->label->setText(" Output File Name");
129 | }
130 |
131 | emit updateneeded();
132 | }
133 | void OutputFileForm::on_outputfile_btn_clicked()
134 | {
135 |
136 | QString filename = QFileDialog::getSaveFileName(
137 | this,tr("Output File"),".","*.*");
138 | if(filename.isEmpty()) return;
139 | ui->outputfile_le->setText(filename);
140 | emit updateneeded();
141 | }
142 |
143 | void OutputFileForm::on_set_dir_btn_clicked()
144 | {
145 | QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),
146 | "/home",
147 | QFileDialog::ShowDirsOnly
148 | | QFileDialog::DontResolveSymlinks);
149 |
150 | if (!dir.isEmpty())
151 | OutputDir=dir;
152 | emit updateneeded();
153 | }
154 |
--------------------------------------------------------------------------------
/FFCommand_Engine/outputfileform.h:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 |
20 | #ifndef OUTPUTFILEFORM_H
21 | #define OUTPUTFILEFORM_H
22 |
23 | #include
24 | #include "ffmpegarg.h"
25 | namespace Ui {
26 | class OutputFileForm;
27 | }
28 |
29 | class OutputFileForm : public QWidget
30 | {
31 | Q_OBJECT
32 |
33 | public:
34 | explicit OutputFileForm(QWidget *parent = nullptr);
35 | ~OutputFileForm();
36 | Ui::OutputFileForm *ui;
37 | QString OutputFilename;
38 | QString OutputDir;
39 | QStringList outputstringlist();
40 | void addrow(QString p,QString v);
41 | void setoutputfilename(QString ofn);
42 | bool batchmode;
43 | void setforbatch(bool);
44 | signals:
45 |
46 | void updateneeded();
47 |
48 | private slots:
49 | void on_add_param_btn_clicked();
50 |
51 |
52 |
53 | void on_delete_param_btn_clicked();
54 |
55 |
56 | void on_outputfile_le_textChanged(const QString &arg1);
57 |
58 | void on_outputparam_table_cellChanged(int row, int column);
59 |
60 |
61 |
62 | void on_outputfile_btn_clicked();
63 |
64 | void on_set_dir_btn_clicked();
65 |
66 | private:
67 |
68 | QList < ffcommand> ffcommandglobal_list;
69 | };
70 |
71 | #endif // OUTPUTFILEFORM_H
72 |
--------------------------------------------------------------------------------
/FFCommand_Engine/outputfileform.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | OutputFileForm
4 |
5 |
6 |
7 | 0
8 | 0
9 | 824
10 | 202
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 |
19 | 10
20 | 30
21 | 114
22 | 32
23 |
24 |
25 |
26 | Add Arg
27 |
28 |
29 |
30 |
31 |
32 | 130
33 | 10
34 | 681
35 | 141
36 |
37 |
38 |
39 | QAbstractItemView::DragDrop
40 |
41 |
42 | Qt::MoveAction
43 |
44 |
45 | QAbstractItemView::SelectRows
46 |
47 |
48 | true
49 |
50 |
51 |
52 | Parameter
53 |
54 |
55 |
56 |
57 | Value
58 |
59 |
60 |
61 |
62 |
63 |
64 | 10
65 | 60
66 | 114
67 | 32
68 |
69 |
70 |
71 | Delete Arg
72 |
73 |
74 |
75 |
76 |
77 | 180
78 | 160
79 | 521
80 | 31
81 |
82 |
83 |
84 |
85 |
86 |
87 | 10
88 | 170
89 | 161
90 | 16
91 |
92 |
93 |
94 | Output File Name
95 |
96 |
97 |
98 |
99 |
100 | 10
101 | 120
102 | 114
103 | 32
104 |
105 |
106 |
107 | Output Dir
108 |
109 |
110 |
111 |
112 |
113 | 120
114 | 160
115 | 51
116 | 31
117 |
118 |
119 |
120 | ...
121 |
122 |
123 |
124 |
125 |
126 | QFETableWidget
127 | QTableWidget
128 |
129 |
130 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/FFCommand_Engine/parsecommanddialog.cpp:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 |
20 | #include "parsecommanddialog.h"
21 | #include "ui_parsecommanddialog.h"
22 |
23 | parsecommandDialog::parsecommandDialog(QWidget *parent) :
24 | QDialog(parent),
25 | ui(new Ui::parsecommandDialog)
26 | {
27 | ui->setupUi(this);
28 | }
29 |
30 | parsecommandDialog::~parsecommandDialog()
31 | {
32 | delete ui;
33 | }
34 |
35 | void parsecommandDialog::on_lineEdit_textChanged(const QString &arg1)
36 | {
37 | FFCommand=arg1;
38 | }
39 |
--------------------------------------------------------------------------------
/FFCommand_Engine/parsecommanddialog.h:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 | #ifndef PARSECOMMANDDIALOG_H
20 | #define PARSECOMMANDDIALOG_H
21 |
22 | #include
23 |
24 | namespace Ui {
25 | class parsecommandDialog;
26 | }
27 |
28 | class parsecommandDialog : public QDialog
29 | {
30 | Q_OBJECT
31 |
32 | public:
33 | explicit parsecommandDialog(QWidget *parent = nullptr);
34 | ~parsecommandDialog();
35 | QString FFCommand;
36 |
37 | private slots:
38 | void on_lineEdit_textChanged(const QString &arg1);
39 |
40 | private:
41 | Ui::parsecommandDialog *ui;
42 | };
43 |
44 | #endif // PARSECOMMANDDIALOG_H
45 |
--------------------------------------------------------------------------------
/FFCommand_Engine/parsecommanddialog.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | parsecommandDialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 664
10 | 117
11 |
12 |
13 |
14 | Enter FFmpeg Command
15 |
16 |
17 |
18 |
19 | 280
20 | 80
21 | 341
22 | 32
23 |
24 |
25 |
26 | Qt::Horizontal
27 |
28 |
29 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok
30 |
31 |
32 |
33 |
34 |
35 | 50
36 | 40
37 | 561
38 | 21
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | buttonBox
47 | accepted()
48 | parsecommandDialog
49 | accept()
50 |
51 |
52 | 248
53 | 254
54 |
55 |
56 | 157
57 | 274
58 |
59 |
60 |
61 |
62 | buttonBox
63 | rejected()
64 | parsecommandDialog
65 | reject()
66 |
67 |
68 | 316
69 | 260
70 |
71 |
72 | 286
73 | 274
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/FFCommand_Engine/presetsavedialog.cpp:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 |
20 | #include "presetsavedialog.h"
21 | #include "ui_presetsavedialog.h"
22 |
23 | PresetSaveDialog::PresetSaveDialog(QWidget *parent) :
24 | QDialog(parent),
25 | ui(new Ui::PresetSaveDialog)
26 | {
27 | ui->setupUi(this);
28 | }
29 |
30 | PresetSaveDialog::~PresetSaveDialog()
31 | {
32 | delete ui;
33 |
34 | }
35 | void PresetSaveDialog::setup(QStringList inlist)
36 | {
37 | for(int d=0; dcomboBox->addItem(inlist[d].mid(0,inlist[d].length()-4));
40 | }
41 |
42 |
43 | }
44 |
45 | void PresetSaveDialog::on_buttonBox_accepted()
46 | {
47 | file = ui->comboBox->currentText()+".txt";
48 | comment="#"+ui->lineEdit->text();
49 | }
50 |
--------------------------------------------------------------------------------
/FFCommand_Engine/presetsavedialog.h:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 | #ifndef PRESETSAVEDIALOG_H
20 | #define PRESETSAVEDIALOG_H
21 |
22 | #include
23 |
24 | namespace Ui {
25 | class PresetSaveDialog;
26 | }
27 |
28 | class PresetSaveDialog : public QDialog
29 | {
30 | Q_OBJECT
31 |
32 | public:
33 | explicit PresetSaveDialog(QWidget *parent = nullptr);
34 | ~PresetSaveDialog();
35 | void setup(QStringList);
36 | QString file;
37 | QString comment;
38 | private slots:
39 | void on_buttonBox_accepted();
40 |
41 | private:
42 | Ui::PresetSaveDialog *ui;
43 | QStringList PresetsCats;
44 |
45 | };
46 |
47 | #endif // PRESETSAVEDIALOG_H
48 |
--------------------------------------------------------------------------------
/FFCommand_Engine/presetsavedialog.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | PresetSaveDialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 402
10 | 197
11 |
12 |
13 |
14 | Save Command
15 |
16 |
17 |
18 |
19 | 30
20 | 150
21 | 341
22 | 32
23 |
24 |
25 |
26 | Qt::Horizontal
27 |
28 |
29 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok
30 |
31 |
32 |
33 |
34 |
35 | 50
36 | 110
37 | 321
38 | 21
39 |
40 |
41 |
42 |
43 |
44 |
45 | 10
46 | 110
47 | 59
48 | 16
49 |
50 |
51 |
52 | Title
53 |
54 |
55 |
56 |
57 |
58 | 50
59 | 50
60 | 141
61 | 32
62 |
63 |
64 |
65 | true
66 |
67 |
68 |
69 |
70 |
71 |
72 | buttonBox
73 | accepted()
74 | PresetSaveDialog
75 | accept()
76 |
77 |
78 | 248
79 | 164
80 |
81 |
82 | 157
83 | 186
84 |
85 |
86 |
87 |
88 | buttonBox
89 | rejected()
90 | PresetSaveDialog
91 | reject()
92 |
93 |
94 | 316
95 | 170
96 |
97 |
98 | 286
99 | 186
100 |
101 |
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/FFCommand_Engine/processqueuedialog.cpp:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 |
20 | #include "processqueuedialog.h"
21 | #include "ui_processqueuedialog.h"
22 | #include
23 | processqueueDialog::processqueueDialog(QWidget *parent) :
24 | QDialog(parent),
25 | ui(new Ui::processqueueDialog)
26 | {
27 | ui->setupUi(this);
28 | setWindowFlags( Qt::CustomizeWindowHint | Qt::WindowTitleHint |Qt::WindowMinimizeButtonHint);
29 | this->setWindowTitle("Process Queue");
30 | running=false;
31 | }
32 |
33 | processqueueDialog::~processqueueDialog()
34 | {
35 | delete ui;
36 | }
37 |
38 |
39 | void processqueueDialog::enqueue( QList processq)
40 |
41 | {
42 | ui->processqueue_table->clear();
43 | while ( ui->processqueue_table->rowCount()>0)
44 | {
45 | ui->processqueue_table->removeRow(0);
46 | }
47 | //processq.clear();
48 |
49 | for(int i =0; iprocessqueue_table->rowCount();
52 | ui->processqueue_table->insertRow(i);
53 | QTextBrowser * w= new QTextBrowser();
54 | w->append(processq.at(i)->args);
55 | QTableWidgetItem *newItem1 = new QTableWidgetItem(QString(processq.at(i)->Status ));
56 | // QTableWidgetItem *newItem2 = new QTableWidgetItem(QString(processq.at(i)->args));
57 | ui->processqueue_table->setCellWidget(i,1,w);
58 | ui->processqueue_table->setItem(i,0,newItem1);
59 | //ui->processqueue_table->setItem(i,1,newItem2);
60 | }
61 |
62 | }
63 | void processqueueDialog::stopqueue()
64 | {
65 | ui->startstop_btn->setText("start queue");
66 | running=false;
67 |
68 | }
69 |
70 | void processqueueDialog::on_startstop_btn_clicked()
71 | {
72 | if (running == false)
73 | {
74 | running=true;
75 | ui->startstop_btn->setText("stop queue");
76 | emit queuestatechange();
77 | }
78 | else
79 | {
80 |
81 | running=false;
82 | ui->startstop_btn->setText("start queue");
83 | emit queuestatechange();
84 |
85 | }
86 |
87 | }
88 |
89 | void processqueueDialog::on_clear_btn_clicked()
90 | {
91 | emit requestclear();
92 |
93 | }
94 |
--------------------------------------------------------------------------------
/FFCommand_Engine/processqueuedialog.h:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 | #ifndef PROCESSQUEUEDIALOG_H
20 | #define PROCESSQUEUEDIALOG_H
21 |
22 | #include
23 | #include "ffprocessobj.h"
24 | #include
25 | #include
26 | namespace Ui {
27 | class processqueueDialog;
28 | }
29 |
30 | class processqueueDialog : public QDialog
31 | {
32 | Q_OBJECT
33 |
34 | public:
35 | explicit processqueueDialog(QWidget *parent = nullptr);
36 | ~processqueueDialog();
37 | void enqueue(QList );
38 | //QQueue processq;
39 | void stopqueue();
40 |
41 | bool running;
42 | private slots:
43 | void on_startstop_btn_clicked();
44 |
45 | void on_clear_btn_clicked();
46 | signals:
47 | void queuestatechange();
48 | void requestclear();
49 | private:
50 | Ui::processqueueDialog *ui;
51 | };
52 |
53 | #endif // PROCESSQUEUEDIALOG_H
54 |
--------------------------------------------------------------------------------
/FFCommand_Engine/processqueuedialog.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | processqueueDialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 409
10 | 439
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 |
18 |
19 | 20
20 | 10
21 | 371
22 | 371
23 |
24 |
25 |
26 | true
27 |
28 |
29 | 100
30 |
31 |
32 | 100
33 |
34 |
35 |
36 | Status
37 |
38 |
39 |
40 |
41 | Command
42 |
43 |
44 |
45 |
46 |
47 |
48 | 270
49 | 400
50 | 114
51 | 32
52 |
53 |
54 |
55 | Start Queue
56 |
57 |
58 |
59 |
60 |
61 | 20
62 | 400
63 | 114
64 | 32
65 |
66 |
67 |
68 | Clear Queue
69 |
70 |
71 |
72 |
73 |
74 | QFETableWidget
75 | QTableWidget
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/FFCommand_Engine/qfe_window.cpp:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 |
20 |
21 | #include "qfe_window.h"
22 | #include "ui_qfe_window.h"
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 |
29 | QString getResourcesPath()
30 | {
31 | #if defined(Q_OS_WIN)
32 | return QCoreApplication::applicationDirPath() + "/";
33 | #elif defined(Q_OS_OSX)
34 | return QStandardPaths::standardLocations(QStandardPaths::AppDataLocation)[0]; //return QCoreApplication::applicationDirPath() + "/../Resources/";
35 | #elif defined(Q_OS_LINUX)
36 | return QCoreApplication::applicationDirPath() + "/../share/yourapplication/";
37 | #else
38 | return QCoreApplication::applicationDirPath() + "/";
39 | #endif
40 | }
41 |
42 | QFE_Window::QFE_Window(QWidget *parent) :
43 | QMainWindow(parent),
44 | ui(new Ui::QFE_Window)
45 | {
46 | ui->setupUi(this);
47 | if (!QDir(getResourcesPath()).exists())
48 | {
49 | QDir().mkdir(getResourcesPath());
50 | QDir().mkdir(getResourcesPath()+"/Presets");
51 | QFile::copy(QCoreApplication::applicationDirPath() + "/../Resources/ffmpeglocation.txt", getResourcesPath()+"/ffmpeglocation.txt");
52 | QFile::copy(QCoreApplication::applicationDirPath() + "/../Resources/Presets/ffmprovisr.txt", getResourcesPath()+"/Presets/ffmprovisr.txt");
53 | QFile::copy(QCoreApplication::applicationDirPath() + "/../Resources/Presets/user.txt", getResourcesPath()+"/Presets/user.txt");
54 |
55 |
56 |
57 | }
58 | qDebug()<param_table->setSelectionBehavior(ui->param_table->SelectRows);
60 | ui->param_table->setSelectionMode(ui->param_table->SingleSelection);
61 | ui->param_table->setDragDropMode(ui->param_table->InternalMove);
62 | ui->param_table->setDragDropOverwriteMode(false);
63 |
64 |
65 |
66 | ui->file_table->setSelectionBehavior(ui->param_table->SelectRows);
67 | ui->file_table->setSelectionMode(ui->param_table->SingleSelection);
68 | ui->file_table->setDragDropMode(ui->param_table->InternalMove);
69 | ui->file_table->setDropIndicatorShown(true);
70 | ui->file_table->setDragDropOverwriteMode(false);
71 |
72 |
73 | probefilename=" ";
74 |
75 | OutputFileForm * newout = new OutputFileForm();
76 | connect(newout,SIGNAL(updateneeded()),this,SLOT(generate_ffmpeg_command()));
77 | ffoutputs.append(newout);
78 | ui->outputs_tw->insertTab( ui->outputs_tw->currentIndex()+1,newout,"Output"+QString::number(ui->outputs_tw->currentIndex()+1));
79 | pq = new processqueueDialog();
80 | connect(pq,SIGNAL(requestclear()),this,SLOT(queueclearrequest()));
81 | connect(pq,SIGNAL(queuestatechange()),this,SLOT(queuestatechanged()));
82 | QFile filepc(getResourcesPath()+"/"+"ffmpeglocation.txt");
83 | if(!filepc.open(QIODevice::ReadOnly)) {
84 | QMessageBox::information(0, "error", filepc.errorString());
85 | }
86 | QTextStream in(&filepc);
87 | ffmpeglocation = in.readLine();
88 |
89 |
90 |
91 | loadpresetmenu();
92 |
93 |
94 |
95 | //qDebug()<Status=="running")
108 | anyrunning=true;
109 |
110 | }
111 |
112 | if (anyrunning)
113 | {
114 | QMessageBox::StandardButton resBtn = QMessageBox::question( this, "ffcommand engine",
115 | tr("There are processes running, are you sure?\n"),
116 | QMessageBox::Cancel | QMessageBox::No | QMessageBox::Yes,
117 | QMessageBox::Yes);
118 | if (resBtn != QMessageBox::Yes) {
119 | event->ignore();
120 | } else {
121 | event->accept();
122 |
123 | pq->close();
124 | foreach (ffprocessobj* d, ffinstances)
125 | {
126 |
127 | d->close();
128 |
129 |
130 | }
131 | }
132 |
133 | }
134 | else
135 |
136 | {
137 |
138 | pq->close();
139 | foreach (ffprocessobj* d, ffinstances)
140 | {
141 |
142 | d->close();
143 |
144 |
145 | }
146 |
147 | }
148 | }
149 |
150 |
151 |
152 |
153 |
154 |
155 | void QFE_Window::loadpresetmenu()
156 | {
157 | ui->menuPresets->clear();
158 | QDir directory(getResourcesPath()+"/Presets");
159 | QStringList psets = directory.entryList(QStringList() << "*.txt",QDir::Files);
160 | foreach(QString filename, psets) {
161 | //do whatever you need to do
162 |
163 | //********************************** Start Menu
164 | QFile filep(directory.path()+"/"+filename);
165 |
166 | if(!filep.open(QIODevice::ReadOnly)) {
167 | QMessageBox::information(0, "error", filep.errorString());
168 | }
169 | QMenu *ffmproviser = new QMenu();
170 | ffmproviser->setTitle(filename.mid(0,filename.length()-4));
171 | QTextStream in(&filep);
172 | QString Comment;
173 | while(!in.atEnd()) {
174 | QString line = in.readLine();
175 | if (line[0]=='#')
176 | {
177 | QStringList pset;
178 | pset.append(line);
179 | pset.append(in.readLine());
180 |
181 | presets.append(pset);
182 | ffmproviser->addAction(pset[0],this,&QFE_Window::load_preset);
183 | }
184 | else
185 | {
186 |
187 | // qDebug()<<"Command";
188 | }
189 | }
190 |
191 |
192 |
193 | ui->menuPresets->addMenu(ffmproviser);
194 | //**********************************
195 |
196 | }
197 |
198 |
199 |
200 |
201 |
202 |
203 | }
204 | QFE_Window::~QFE_Window()
205 | {
206 | delete ui;
207 | }
208 | void QFE_Window::process_stdout()
209 | {
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 | }
219 |
220 | QList QFE_Window::getfileinputs()
221 | {
222 |
223 | int x=0;
224 | QList infilerows;
225 | for(int i=0; ifile_table->rowCount();i++)
226 | {
227 |
228 | if (ui->file_table->item(i,1))
229 | {
230 |
231 | if (ui->file_table->item(i,1)->text() == "-i")
232 | infilerows.append(i);
233 |
234 | }
235 |
236 | }
237 |
238 |
239 | return infilerows;
240 |
241 |
242 |
243 | }
244 | void QFE_Window:: load_preset()
245 | {
246 | ui->batch_cb->setChecked(false);
247 | on_reset_btn_clicked();
248 | QAction* pAction = (QAction* )sender();
249 | foreach (QStringList sl ,presets)
250 | {
251 | if (sl[0]==pAction->text())
252 | { parsecommand(sl[1]);
253 | generate_ffmpeg_command();
254 |
255 | // qDebug()<text();
256 | break;
257 | }
258 | }
259 |
260 |
261 |
262 | }
263 | void QFE_Window:: process_completed(int, QProcess::ExitStatus)
264 | {
265 |
266 | // double time= ffmpeg_process->timer->elapsed()/1000.0;
267 | QMessageBox msgBox;
268 | // msgBox.setWindowTitle("Process Complete in "+QString::number( time)+"seconds");
269 | // msgBox.setText("The process has finished in "+QString::number( time)+"seconds");
270 | msgBox.setStandardButtons(QMessageBox::Ok);
271 |
272 | //ffstdout->setWindowTitle("Process Complete in "+QString::number( time)+"seconds");
273 | msgBox.setDefaultButton(QMessageBox::Ok);
274 | msgBox.exec();
275 |
276 | //ffstdout->close();
277 |
278 |
279 |
280 |
281 | }
282 | void QFE_Window::processclosed()
283 | {
284 | ffprocessobj* s= (ffprocessobj * ) sender();
285 | for (int i = 0;ibatch_cb->isChecked())
305 | {
306 | generate_ffmpeg_command();
307 | ffprocessobj * t= new ffprocessobj();
308 | connect(t,SIGNAL(closing()),this,SLOT(processclosed()));
309 | connect(t,SIGNAL(finished()),this,SLOT(queueitemfinished()));
310 |
311 | t->ffmpeglocation=ffmpeglocation;
312 | t->process_list=ffmpeg_process_arg;
313 |
314 | //t->show();
315 |
316 | //t->startprocess(ffmpeg_process_arg);
317 |
318 | ffinstances.append(t);
319 | t->args=("ffmpeg "+ffmpeg_process_arg.join(" "));
320 | pq->show();
321 |
322 | pq->enqueue(ffinstances);
323 | }
324 | else {
325 |
326 |
327 |
328 | for(int x=0; x< getfileinputs().count();x++)
329 | {
330 | generate_ffmpeg_command(x);
331 | ffprocessobj * t= new ffprocessobj();
332 | connect(t,SIGNAL(closing()),this,SLOT(processclosed()));
333 | connect(t,SIGNAL(finished()),this,SLOT(queueitemfinished()));
334 |
335 | t->ffmpeglocation=ffmpeglocation;
336 | t->process_list=ffmpeg_process_arg;
337 |
338 | //t->show();
339 |
340 | //t->startprocess(ffmpeg_process_arg);
341 |
342 | ffinstances.append(t);
343 | t->args=("ffmpeg "+ffmpeg_process_arg.join(" "));
344 | pq->show();
345 |
346 | pq->enqueue(ffinstances);
347 |
348 |
349 |
350 |
351 | }
352 |
353 |
354 |
355 |
356 | }
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 | }
368 | void QFE_Window::killprocess()
369 | {
370 |
371 | }
372 |
373 |
374 | void QFE_Window::on_probe_btn_clicked()
375 | {
376 |
377 | probefilename = QFileDialog::getOpenFileName(
378 | this,tr("Input File"),".","*.*");
379 | if(probefilename.isEmpty()) return;
380 | ffprobe_process = new QProcess();
381 | QStringList ffprobe_string = {probefilename,"-v","quiet","-print_format", "json","-show_format","-show_streams"};
382 | ffprobe_process->start(ffmpeglocation+"/ffprobe",ffprobe_string,QIODevice::ReadOnly);
383 |
384 | ffprobe_process->setReadChannel(QProcess::ProcessChannel::StandardOutput);
385 | //ui->ffpcommand_le->setText("ffprobe "+ ffprobe_string.join(" "));
386 | QByteArray ba;
387 | if (ffprobe_process->waitForStarted(-1)) {
388 | while(ffprobe_process->waitForReadyRead(-1)) {
389 | ba += ffprobe_process->readAllStandardOutput();
390 | }
391 | }
392 | QString probe_string = QString::fromUtf8(ba.data());
393 |
394 | ui->ProbeOutput_tb->setText(probe_string);
395 | //qDebug()<close();
398 |
399 |
400 |
401 | if (!probe_string.isEmpty()) {
402 |
403 | QJsonModel *newModel = new QJsonModel;
404 |
405 | ui->treeView->setModel(newModel);
406 | newModel->loadJson(ba);
407 | // delete model;
408 |
409 |
410 |
411 |
412 |
413 | }
414 | }
415 |
416 | void QFE_Window::on_add_param_btn_clicked()
417 | {
418 | ui->param_table->insertRow(0);
419 |
420 | QTableWidgetItem *newItem1 = new QTableWidgetItem(QString());
421 | QTableWidgetItem *newItem2 = new QTableWidgetItem(QString());
422 |
423 | ui->param_table->setItem(0,0,newItem1);
424 | ui->param_table->setItem(0,1,newItem2);
425 | generate_ffmpeg_command();
426 |
427 | }
428 | void QFE_Window::on_add_inputfiles_btn_clicked()
429 | {
430 |
431 | QStringList filenames = QFileDialog::getOpenFileNames(
432 | this,tr("Input Files"),".","*.*");
433 | if(filenames.count()==0) return;
434 | foreach(QString s ,filenames)
435 | { int rowadd = ui->file_table->rowCount();
436 |
437 |
438 | ui->file_table->insertRow(rowadd);
439 |
440 | QTableWidgetItem *newItem1 = new QTableWidgetItem(QString("-i"));
441 | QTableWidgetItem *newItem2 = new QTableWidgetItem(QString(s));
442 |
443 | QPushButton* fnme = new QPushButton();
444 |
445 | connect(fnme,SIGNAL(clicked()),this,SLOT(on_add_input_filedlg_clicked()));
446 | const QSize BUTTON_SIZE = QSize(70, 22);
447 | fnme->setText("...");
448 | //QTableWidgetItem *newItem2 = new QTableWidgetItem(filename);
449 | ui->file_table->setItem(rowadd,1,newItem1);
450 | ui->file_table->setItem(rowadd,2,newItem2);
451 | ui->file_table->setCellWidget(rowadd,0,fnme);
452 | fnme->setMinimumSize(BUTTON_SIZE);
453 | fnme->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
454 |
455 |
456 | fnme->setMinimumSize( BUTTON_SIZE );
457 | fnme->setMaximumSize( BUTTON_SIZE );}
458 | generate_ffmpeg_command();
459 |
460 | }
461 | void QFE_Window::on_add_input_btn_clicked()
462 | {
463 |
464 |
465 | int rowadd = ui->file_table->rowCount();
466 |
467 |
468 | ui->file_table->insertRow(rowadd);
469 |
470 | QTableWidgetItem *newItem1 = new QTableWidgetItem(QString("-i"));
471 | QTableWidgetItem *newItem2 = new QTableWidgetItem(QString());
472 |
473 |
474 | QTableWidgetItem *newItem = new QTableWidgetItem(QString());
475 | ui->file_table->setItem(rowadd,1,newItem1);
476 | ui->file_table->setItem(rowadd,2,newItem2);
477 | ui->file_table->setItem(rowadd,0,newItem);
478 |
479 | generate_ffmpeg_command();
480 | }
481 | void QFE_Window::on_add_input_filedlg_clicked()
482 | {
483 |
484 | QPushButton* sndr= (QPushButton *)sender();
485 | //qDebug()<file_table->rowCount(); i++)
488 | {
489 | // qDebug()<file_table->cellWidget(0,i);
490 | if (ui->file_table->cellWidget(i,0)==sndr)
491 | rownum=i;
492 |
493 | }
494 | QString filename = QFileDialog::getOpenFileName(
495 | this,tr("Input File"),".","*.*");
496 | if(filename.isEmpty()) return;
497 | QTableWidgetItem *newItem2 = new QTableWidgetItem(QString(filename));
498 |
499 | ui->file_table->setItem(rownum,2,newItem2);
500 |
501 | generate_ffmpeg_command();
502 |
503 |
504 | }
505 | void QFE_Window::generate_ffmpeg_command()
506 | {
507 | ffmpeg_process_arg.clear();
508 | QString p;
509 | QString r;
510 | QString inputfname;
511 | //************************ input file variables
512 | if (ui->Overwrite_cb->isChecked())
513 | ffmpeg_process_arg.insert(0,"-y");
514 | if(!ui->batch_cb->isChecked())
515 | {
516 | for(int i=0; ifile_table->rowCount();i++)
517 | {
518 |
519 | if (ui->file_table->item(i,1))
520 | p= ui->file_table->item(i,1)->text();
521 | if (ui->file_table->item(i,2))
522 | r= ui->file_table->item(i,2)->text();
523 | ffmpeg_process_arg.append(p);
524 | ffmpeg_process_arg.append(r);
525 | }
526 | }
527 | else {
528 |
529 | if (ui->file_table->item(0,1))
530 | p= ui->file_table->item(0,1)->text();
531 | if (ui->file_table->item(0,2))
532 | r= ui->file_table->item(0,2)->text();
533 | ffmpeg_process_arg.append(p);
534 | ffmpeg_process_arg.append(r);
535 | inputfname=r;
536 |
537 | }
538 | //************************ global process variables
539 | for(int i=0; iparam_table->rowCount();i++)
540 | {
541 |
542 | if (ui->param_table->item(i,0))
543 | p= ui->param_table->item(i,0)->text();
544 | if (ui->param_table->item(i,1))
545 | r= ui->param_table->item(i,1)->text();
546 | ffmpeg_process_arg.append(p);
547 | ffmpeg_process_arg.append(r);
548 | }
549 |
550 |
551 | //************************ per output process variables
552 |
553 |
554 | for(int f=0; foutputstringlist();
557 | opf.removeAll(QString(""));
558 | ffmpeg_process_arg.append(opf);
559 | if (ffoutputs[f]->batchmode)
560 | {
561 | QString fn= ffoutputs[f]->OutputDir+"/";
562 | fn+=inputfname.split("/").last();
563 | fn.remove(fn.length()-4,4);
564 | fn+=ffoutputs[f]->OutputFilename;
565 | ffmpeg_process_arg.append(fn);
566 | }
567 | else {
568 | ffmpeg_process_arg.append(ffoutputs[f]->OutputFilename);
569 | //qDebug()<OutputFilename;
570 | }
571 |
572 | }
573 |
574 |
575 | ui->ffcommand_tb->clear();
576 | ui->ffcommand_tb->append("ffmpeg "+ffmpeg_process_arg.join(" "));
577 | }
578 |
579 | void QFE_Window::generate_ffmpeg_command(int innumber)
580 | {
581 | ffmpeg_process_arg.clear();
582 | QString p;
583 | QString r;
584 | QString inputfname;
585 | //************************ input file variables
586 |
587 |
588 |
589 |
590 | if (ui->Overwrite_cb->isChecked())
591 | ffmpeg_process_arg.insert(0,"-y");
592 |
593 |
594 | getfileinputs();
595 |
596 | // There is a better way to do this
597 | QList inputfilerows= getfileinputs();
598 | for(int i=0; ifile_table->rowCount()-inputfilerows.count();i++)
599 | {
600 |
601 | if (ui->file_table->item(i,1))
602 | p= ui->file_table->item(i,1)->text();
603 | if (ui->file_table->item(i,2))
604 | r= ui->file_table->item(i,2)->text();
605 | ffmpeg_process_arg.append(p);
606 | ffmpeg_process_arg.append(r);
607 | }
608 | if (ui->file_table->item(inputfilerows[innumber],1))
609 | p= ui->file_table->item(inputfilerows[innumber],1)->text();
610 | if (ui->file_table->item(inputfilerows[innumber],2))
611 | r= ui->file_table->item(inputfilerows[innumber],2)->text();
612 | ffmpeg_process_arg.append(p);
613 | ffmpeg_process_arg.append(r);
614 | inputfname=r;
615 |
616 |
617 | //************************ global process variables
618 | for(int i=0; iparam_table->rowCount();i++)
619 | {
620 |
621 | if (ui->param_table->item(i,1))
622 | p= ui->param_table->item(i,0)->text();
623 | if (ui->param_table->item(i,2))
624 | r= ui->param_table->item(i,1)->text();
625 | ffmpeg_process_arg.append(p);
626 | ffmpeg_process_arg.append(r);
627 | }
628 |
629 |
630 | //************************ per output process variables
631 |
632 |
633 | for(int f=0; foutputstringlist();
636 | opf.removeAll(QString(""));
637 | ffmpeg_process_arg.append(opf);
638 | if (ffoutputs[f]->batchmode)
639 | {
640 | QString fn= ffoutputs[f]->OutputDir+"/";
641 | fn+=inputfname.split("/").last();
642 | fn.remove(fn.length()-4,4);
643 | fn+=ffoutputs[f]->OutputFilename;
644 | ffmpeg_process_arg.append(fn);
645 | }
646 | else {
647 | ffmpeg_process_arg.append(ffoutputs[f]->OutputFilename);
648 | }
649 |
650 | }
651 |
652 |
653 | ui->ffcommand_tb->clear();
654 | ui->ffcommand_tb->append("ffmpeg "+ffmpeg_process_arg.join(" "));
655 | }
656 |
657 | void QFE_Window::on_file_table_cellClicked(int row, int column)
658 | {
659 |
660 | }
661 |
662 | void QFE_Window::on_add_output_btn_clicked()
663 | {
664 |
665 | OutputFileForm * newout = new OutputFileForm();
666 |
667 | connect(newout,SIGNAL(updateneeded()),this,SLOT(generate_ffmpeg_command()));
668 | ffoutputs.append(newout);
669 | if(ui->batch_cb->isChecked())
670 | {
671 |
672 | newout->setforbatch(true);
673 |
674 |
675 |
676 | }
677 | else {
678 |
679 | newout->setforbatch(false);
680 |
681 |
682 |
683 | }
684 |
685 | ui->outputs_tw->insertTab(ffoutputs.length()-1,newout,"Output"+QString::number(ffoutputs.length()-1));
686 |
687 |
688 | }
689 | void QFE_Window::parsecommand(QString incommand)
690 | {
691 | QString commandinput= incommand;
692 | QStringList commandparts;
693 | // store dialog content somewhere
694 | //qDebug()<Overwrite_cb->setChecked(true);
724 |
725 |
726 | }
727 | else {
728 |
729 |
730 | int rowadd = ui->file_table->rowCount();
731 | ui->file_table->insertRow(rowadd);
732 |
733 | QTableWidgetItem *newItem1 = new QTableWidgetItem(QString(commandparts[arginc]));
734 | QTableWidgetItem *newItem2 ;
735 | if (commandparts[arginc+1].at(0)=='-')
736 | newItem2 = new QTableWidgetItem(QString());
737 | else
738 | {
739 | arginc++;
740 | newItem2 = new QTableWidgetItem(QString(commandparts[arginc]));
741 | }
742 |
743 |
744 |
745 | QTableWidgetItem *newItem = new QTableWidgetItem(QString());
746 |
747 | ui->file_table->setItem(rowadd,1,newItem1);
748 | ui->file_table->setItem(rowadd,2,newItem2);
749 | ui->file_table->setItem(rowadd,0,newItem);
750 |
751 | }
752 |
753 |
754 | }
755 | else if (commandparts[arginc]=="-an" ||commandparts[arginc]== "-vn"||commandparts[arginc]== "-dn")
756 | {
757 | ffoutputs[ui->outputs_tw->currentIndex()]->addrow(commandparts[arginc],QString());
758 |
759 | }
760 | else if (commandparts[arginc]=="-y")
761 | {
762 | ui->Overwrite_cb->setChecked(true);
763 |
764 | }
765 | else if (commandparts[arginc].at(0)=='-')
766 | {
767 | QString t;
768 | if (arginc ==commandparts.count()-1)
769 | ffoutputs[ui->outputs_tw->currentIndex()]->setoutputfilename(commandparts[arginc]);
770 | else if (commandparts[arginc+1].at(0)=='-')
771 |
772 |
773 | ffoutputs[ui->outputs_tw->currentIndex()]->addrow(commandparts[arginc],t);
774 | else
775 | {
776 | ffoutputs[ui->outputs_tw->currentIndex()]->addrow(commandparts[arginc],commandparts[arginc+1]);
777 | arginc++;
778 | }
779 |
780 | }
781 | else if (!commandparts[arginc].isEmpty())
782 | {
783 |
784 | ffoutputs[ui->outputs_tw->currentIndex()]->setoutputfilename(commandparts[arginc]);
785 | if (arginc+1!=commandparts.count())
786 | {
787 | on_add_output_btn_clicked();
788 | ui->outputs_tw->setCurrentIndex( ui->outputs_tw->currentIndex()+1);
789 | }
790 |
791 | }
792 |
793 | arginc++;
794 | }
795 |
796 | // generate_ffmpeg_command();
797 |
798 |
799 | }
800 | void QFE_Window::on_ffparse_btn_clicked()
801 | {
802 |
803 |
804 | parsecommandDialog* t =new parsecommandDialog();
805 |
806 |
807 |
808 | if (t->exec() == QDialog::Accepted)
809 | {
810 | on_reset_btn_clicked();
811 | parsecommand(t->FFCommand);
812 |
813 | generate_ffmpeg_command();
814 | }
815 |
816 | }
817 |
818 | void QFE_Window::on_file_table_cellDoubleClicked(int row, int column)
819 | {if (column==1)
820 | {
821 |
822 |
823 |
824 | }
825 |
826 | }
827 |
828 | void QFE_Window::on_file_table_cellChanged(int row, int column)
829 | {
830 | if(!ui->file_table->cellWidget(row,0))
831 | {
832 | QPushButton* fnme = new QPushButton();
833 |
834 | connect(fnme,SIGNAL(clicked()),this,SLOT(on_add_input_filedlg_clicked()));
835 | const QSize BUTTON_SIZE = QSize(22, 22);
836 | fnme->setText("...");
837 | ui->file_table->setCellWidget(row,0,fnme);
838 | fnme->setMinimumSize(BUTTON_SIZE);
839 | fnme->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
840 | }
841 |
842 | // fnme->setMinimumSize( BUTTON_SIZE );
843 | // fnme->setMaximumSize( BUTTON_SIZE );
844 |
845 |
846 | generate_ffmpeg_command();
847 | }
848 |
849 | void QFE_Window::on_delete_output_btn_clicked()
850 | {
851 | if (ui->outputs_tw->count()>0)
852 | {
853 | int idf = ui->outputs_tw->currentIndex();
854 |
855 | ui->outputs_tw->removeTab( idf);
856 | delete ffoutputs[idf];
857 | ffoutputs.removeAt(idf);
858 | }
859 | \
860 | }
861 |
862 | void QFE_Window::on_reset_btn_clicked()
863 | {
864 | ui->batch_cb->setChecked(false);
865 | while (ui->outputs_tw->count()>0)
866 | {
867 |
868 | foreach (OutputFileForm * s, ffoutputs)
869 | {
870 | int idf = ui->outputs_tw->count()-1;
871 | ui->outputs_tw->removeTab( idf);
872 | delete ffoutputs[idf];
873 | ffoutputs.removeAt(idf);
874 |
875 | }
876 |
877 |
878 |
879 | }
880 | OutputFileForm * newout = new OutputFileForm();
881 |
882 | connect(newout,SIGNAL(updateneeded()),this,SLOT(generate_ffmpeg_command()));
883 | ffoutputs.append(newout);
884 | ui->outputs_tw->insertTab(ffoutputs.length()-1,newout,"Output"+QString::number(ffoutputs.length()-1));
885 |
886 |
887 | int incount = ui->file_table->rowCount();
888 | for ( int k = 0; kfile_table->removeRow( 0);
891 |
892 | }
893 |
894 | }
895 |
896 | void QFE_Window::on_del_input_btn_clicked()
897 | {
898 | ui->file_table->removeRow( ui->file_table->currentRow());
899 | }
900 |
901 |
902 | void QFE_Window::on_kill_all_btn_clicked()
903 | {
904 |
905 |
906 | // if (ffmpeg_process->process->state() == QProcess::Running)
907 | // ffmpeg_process->process->kill();
908 | }
909 |
910 | void QFE_Window::on_save_pset_btn_clicked()
911 | {
912 | PresetSaveDialog* t =new PresetSaveDialog();
913 | QDir directory(getResourcesPath()+"/Presets");
914 | QStringList psets = directory.entryList(QStringList() << "*.txt",QDir::Files);
915 | t->setup(psets);
916 |
917 | if (t->exec() == QDialog::Accepted)
918 | {
919 |
920 |
921 | generate_ffmpeg_command();
922 | QFile filepc(getResourcesPath()+"/Presets/"+t->file);
923 | filepc.setPermissions(QFileDevice::ReadOwner | QFileDevice::WriteOwner);
924 | if(!filepc.open(QIODevice::Append)) {
925 | QMessageBox::information(0, "error", filepc.errorString());
926 | }
927 | QTextStream out(&filepc);
928 | out<comment<Status == "running")
945 | {
946 | activeinstancecount++;
947 |
948 | }
949 |
950 | }
951 | return activeinstancecount;
952 | }
953 | QList QFE_Window::getqueudinstances()
954 |
955 | {
956 | QList tld;
957 | int activeinstancecount =0;
958 | for (int i = 0;iStatus == "queued")
962 | {
963 | tld.append(ffinstances[i]);
964 |
965 | }
966 |
967 | }
968 | return tld;
969 | }
970 | void QFE_Window::queuestatechanged()
971 | {
972 |
973 |
974 |
975 |
976 |
977 | QList d;
978 |
979 | if (pq->running)
980 | {
981 | QList d = getqueudinstances();
982 |
983 | while(d.count() > 0 && (getactiveinstances()maxinstance_sb->value()) )
984 | {
985 | //qDebug()<startprocess();
987 | d[0]->show();
988 | d.removeAt(0);
989 |
990 | }
991 | }
992 | else {
993 |
994 | }
995 | pq->enqueue(ffinstances);
996 |
997 | }
998 | void QFE_Window::queueclearrequest()
999 | {
1000 |
1001 |
1002 | foreach(ffprocessobj * s ,ffinstances)
1003 | {
1004 | if (s->Status== "queued" ||s->Status=="completed" )
1005 | ffinstances.removeOne(s);
1006 |
1007 | }
1008 | pq->enqueue(ffinstances);
1009 |
1010 | }
1011 | void QFE_Window::on_showqueue_btn_clicked()
1012 | {
1013 | pq->show();
1014 |
1015 | }
1016 | void QFE_Window::queueitemfinished()
1017 | {
1018 | pq->enqueue(ffinstances);
1019 | if (pq->running)
1020 | {
1021 | QList d = getqueudinstances();
1022 |
1023 | while(d.count() > 0 && (getactiveinstances()maxinstance_sb->value()) )
1024 | {
1025 | //qDebug()<startprocess();
1027 | d[0]->show();
1028 | d.removeAt(0);
1029 |
1030 | }
1031 | if(d.count()==0)
1032 | pq->stopqueue();
1033 | }
1034 | pq->enqueue(ffinstances);
1035 | }
1036 |
1037 | void QFE_Window::on_actionSet_FFmpeg_Dir_triggered()
1038 | {
1039 |
1040 | ffmpegbinaryDialog d;
1041 | d.setup(ffmpeglocation);
1042 |
1043 | if (d.exec() == QDialog::Accepted)
1044 | {
1045 | ffmpeglocation=d.location;
1046 | QFile filepc(getResourcesPath()+"/"+"ffmpeglocation.txt");
1047 | filepc.setPermissions(QFileDevice::ReadOwner | QFileDevice::WriteOwner);
1048 | if(!filepc.open(QIODevice::WriteOnly)) {
1049 | QMessageBox::information(0, "error", filepc.errorString());
1050 | }
1051 | QTextStream out(&filepc);
1052 | out<< ffmpeglocation;
1053 | filepc.close();
1054 |
1055 | }
1056 |
1057 | }
1058 |
1059 | void QFE_Window::on_del_param_btn_clicked()
1060 | {
1061 | ui->param_table->removeRow( ui->param_table->currentRow());
1062 | generate_ffmpeg_command();
1063 | }
1064 |
1065 | void QFE_Window::on_param_table_cellChanged(int row, int column)
1066 | {
1067 | generate_ffmpeg_command();
1068 | }
1069 |
1070 |
1071 |
1072 | void QFE_Window::on_batch_cb_clicked()
1073 | {
1074 | if(ui->batch_cb->isChecked())
1075 | {
1076 | for(int f=0; fsetforbatch(true);
1079 |
1080 |
1081 | }
1082 | }
1083 | else {
1084 | for(int f=0; fsetforbatch(false);
1087 |
1088 |
1089 | }
1090 | }
1091 |
1092 |
1093 | generate_ffmpeg_command();
1094 |
1095 | }
1096 |
1097 | void QFE_Window::on_batch_cb_stateChanged(int arg1)
1098 | {
1099 |
1100 | generate_ffmpeg_command();
1101 | }
1102 |
1103 | void QFE_Window::on_Overwrite_cb_clicked()
1104 | {
1105 | generate_ffmpeg_command();
1106 | }
1107 |
1108 |
1109 | void QFE_Window::on_actionAbout_FFCommand_Engine_triggered()
1110 | {
1111 | aboutDialog n;
1112 |
1113 | n.exec();
1114 |
1115 | }
1116 |
--------------------------------------------------------------------------------
/FFCommand_Engine/qfe_window.h:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 |
20 | #ifndef QFE_WINDOW_H
21 | #define QFE_WINDOW_H
22 |
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | #include "qjsonmodel.h"
31 | #include
32 | #include "outputfileform.h"
33 | #include "ffmpegarg.h"
34 | #include "parsecommanddialog.h"
35 | #include "ffprocessobj.h"
36 | #include "presetsavedialog.h"
37 | #include "processqueuedialog.h"
38 | #include "ffmpegbinarydialog.h"
39 | #include "aboutdialog.h"
40 | namespace Ui {
41 | class QFE_Window;
42 | }
43 |
44 | class QFE_Window : public QMainWindow
45 | {
46 | Q_OBJECT
47 |
48 | public:
49 | explicit QFE_Window(QWidget *parent = nullptr);
50 | void XMLParser(QString xmlqs);
51 |
52 | void parsecommand(QString incommand);
53 | void closeEvent(QCloseEvent * event);
54 | ~QFE_Window();
55 | int getactiveinstances();
56 | QList getqueudinstances();
57 | public slots:
58 | void generate_ffmpeg_command();
59 | void generate_ffmpeg_command(int);
60 | void process_stdout();
61 | void process_completed(int, QProcess::ExitStatus);
62 | void killprocess();
63 | void load_preset();
64 | void loadpresetmenu();
65 | void queuestatechanged(); //from queue dialog
66 | void queueclearrequest(); //from queue dialog
67 | void queueitemfinished();//from proc object
68 | QList getfileinputs();
69 | private slots:
70 | void on_execute_btn_clicked();
71 |
72 |
73 | void processclosed();
74 |
75 | void on_probe_btn_clicked();
76 |
77 | void on_add_param_btn_clicked();
78 |
79 | void on_add_input_btn_clicked();
80 | void on_add_input_filedlg_clicked();
81 |
82 | void on_file_table_cellClicked(int row, int column);
83 |
84 | void on_add_output_btn_clicked();
85 |
86 | void on_ffparse_btn_clicked();
87 |
88 | void on_file_table_cellDoubleClicked(int row, int column);
89 |
90 | void on_file_table_cellChanged(int row, int column);
91 |
92 | void on_delete_output_btn_clicked();
93 |
94 | void on_reset_btn_clicked();
95 |
96 | void on_del_input_btn_clicked();
97 |
98 | void on_kill_all_btn_clicked();
99 |
100 | void on_save_pset_btn_clicked();
101 |
102 | void on_showqueue_btn_clicked();
103 |
104 |
105 | void on_actionSet_FFmpeg_Dir_triggered();
106 |
107 | void on_del_param_btn_clicked();
108 |
109 | void on_param_table_cellChanged(int row, int column);
110 |
111 | void on_add_inputfiles_btn_clicked();
112 |
113 | void on_batch_cb_clicked();
114 |
115 | void on_batch_cb_stateChanged(int arg1);
116 |
117 | void on_Overwrite_cb_clicked();
118 |
119 |
120 | void on_actionAbout_FFCommand_Engine_triggered();
121 |
122 | private:
123 | Ui::QFE_Window *ui;
124 | QString ffmpeglocation;
125 | QString probefilename;
126 | QStringList ffmpeg_process_arg;
127 | // QList < ffcommand> ffcommandinput_list; later tables will keep data for now
128 | // QList < ffcommand> ffcommandglobal_list; later tables will keep data for now
129 | QProcess* ffprobe_process;
130 | QStringList ffprobe_process_arg;
131 | QJsonModel *model;
132 | QStandardItemModel *qsmodel;
133 |
134 | QString FinalCommand;
135 |
136 | QList ffoutputs;
137 |
138 | QList ffinstances;
139 | processqueueDialog * pq;
140 | QList presets;
141 | ffprocessobj * ffprocobj = NULL;
142 |
143 | };
144 |
145 | #endif // QFE_WINDOW_H
146 |
--------------------------------------------------------------------------------
/FFCommand_Engine/qfe_window.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | QFE_Window
4 |
5 |
6 |
7 | 0
8 | 0
9 | 863
10 | 832
11 |
12 |
13 |
14 | Colorlab FFCommand Engine
15 |
16 |
17 |
18 |
19 |
20 | 10
21 | 40
22 | 841
23 | 761
24 |
25 |
26 |
27 | 0
28 |
29 |
30 |
31 | FFmpeg
32 |
33 |
34 |
35 |
36 | 10
37 | 10
38 | 811
39 | 161
40 |
41 |
42 |
43 | Input File Commands
44 |
45 |
46 |
47 |
48 | 140
49 | 30
50 | 651
51 | 121
52 |
53 |
54 |
55 | QAbstractItemView::DragDrop
56 |
57 |
58 | Qt::MoveAction
59 |
60 |
61 | QAbstractItemView::SelectRows
62 |
63 |
64 | 70
65 |
66 |
67 | true
68 |
69 |
70 |
71 | File Dlg
72 |
73 |
74 |
75 |
76 | Parameter
77 |
78 |
79 |
80 |
81 | File Name
82 |
83 |
84 |
85 |
86 |
87 |
88 | 10
89 | 30
90 | 121
91 | 32
92 |
93 |
94 |
95 | Add Arg
96 |
97 |
98 |
99 |
100 |
101 | 10
102 | 90
103 | 121
104 | 32
105 |
106 |
107 |
108 | Delete Arg
109 |
110 |
111 |
112 |
113 |
114 | 10
115 | 60
116 | 121
117 | 32
118 |
119 |
120 |
121 | Add Files Dialog
122 |
123 |
124 |
125 |
126 |
127 | 20
128 | 120
129 | 111
130 | 21
131 |
132 |
133 |
134 | Batch Mode
135 |
136 |
137 |
138 |
139 |
140 |
141 | 10
142 | 170
143 | 811
144 | 121
145 |
146 |
147 |
148 | Global Commands
149 |
150 |
151 |
152 |
153 | 20
154 | 60
155 | 114
156 | 32
157 |
158 |
159 |
160 | Delete Arg
161 |
162 |
163 |
164 |
165 |
166 | 20
167 | 30
168 | 114
169 | 32
170 |
171 |
172 |
173 | Add Arg
174 |
175 |
176 |
177 |
178 |
179 | 140
180 | 30
181 | 651
182 | 81
183 |
184 |
185 |
186 | true
187 |
188 |
189 |
190 | Parameter
191 |
192 |
193 |
194 |
195 | Value
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 | 10
204 | 290
205 | 811
206 | 301
207 |
208 |
209 |
210 | Per Output Commands
211 |
212 |
213 |
214 |
215 | 20
216 | 70
217 | 771
218 | 221
219 |
220 |
221 |
222 | -1
223 |
224 |
225 |
226 |
227 |
228 | 40
229 | 30
230 | 361
231 | 31
232 |
233 |
234 |
235 | -
236 |
237 |
238 | Delete Output
239 |
240 |
241 |
242 | -
243 |
244 |
245 | Add Output
246 |
247 |
248 |
249 | -
250 |
251 |
252 | Overwrite
253 |
254 |
255 | true
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 | 40
266 | 600
267 | 741
268 | 51
269 |
270 |
271 |
272 |
273 |
274 |
275 | 550
276 | 660
277 | 211
278 | 41
279 |
280 |
281 |
282 |
283 | Bauhaus 93
284 | 51
285 |
286 |
287 |
288 | QLabel {
289 | border-image: url(:/colorlab.png);}
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 | 200
299 | 670
300 | 341
301 | 33
302 |
303 |
304 |
305 | -
306 |
307 |
308 | 8
309 |
310 |
311 | 1
312 |
313 |
314 |
315 | -
316 |
317 |
318 | Max FFmpeg Instances
319 |
320 |
321 |
322 | -
323 |
324 |
325 | Add to queue
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 | FFprobe
335 |
336 |
337 |
338 |
339 | 10
340 | 140
341 | 911
342 | 541
343 |
344 |
345 |
346 | QAbstractItemView::InternalMove
347 |
348 |
349 | Qt::MoveAction
350 |
351 |
352 | true
353 |
354 |
355 | 225
356 |
357 |
358 |
359 |
360 |
361 | 20
362 | 10
363 | 131
364 | 32
365 |
366 |
367 |
368 | Probe Input File
369 |
370 |
371 |
372 |
373 | true
374 |
375 |
376 |
377 | 10
378 | 50
379 | 831
380 | 81
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 | 10
390 | 0
391 | 161
392 | 32
393 |
394 |
395 |
396 | Parse Command
397 |
398 |
399 |
400 |
401 |
402 | 700
403 | 0
404 | 161
405 | 32
406 |
407 |
408 |
409 | Reset
410 |
411 |
412 |
413 |
414 |
415 | 170
416 | 0
417 | 161
418 | 32
419 |
420 |
421 |
422 | Save to Presets
423 |
424 |
425 |
426 |
427 |
428 | 540
429 | 0
430 | 161
431 | 32
432 |
433 |
434 |
435 | Show Queue
436 |
437 |
438 |
439 |
463 |
464 |
465 | TopToolBarArea
466 |
467 |
468 | false
469 |
470 |
471 |
472 |
473 |
474 | Set FFmpeg Dir...
475 |
476 |
477 |
478 |
479 | About FFCommand Engine
480 |
481 |
482 |
483 |
484 |
485 |
486 | QFETableWidget
487 | QTableWidget
488 |
489 |
490 |
491 |
492 |
493 |
494 |
--------------------------------------------------------------------------------
/FFCommand_Engine/qfetablewidget.cpp:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 |
20 |
21 | #include "qfetablewidget.h"
22 | //for proper drag and drop reording
23 | QFETableWidget::QFETableWidget(QWidget *parent) : QTableWidget(parent)
24 | {
25 |
26 | }
27 | void QFETableWidget::dropEvent(QDropEvent *event)
28 | {
29 |
30 | if(event->source() == this)
31 | {
32 | int newRow = this->indexAt(event->pos()).row();
33 | QTableWidgetItem *selectedItem;
34 | QList selectedItems = this->selectedItems();
35 |
36 |
37 | if(newRow == -1)
38 | newRow = this->rowCount();
39 | int i;
40 | for(i = 0; i < (selectedItems.length())/this->columnCount(); i++)
41 | {
42 | this->insertRow(newRow);
43 | }
44 | int currentOldRow = -1;
45 | int currentNewRow = newRow-1;
46 | QList deleteRows;
47 | foreach(selectedItem, selectedItems)
48 | {
49 | int column = selectedItem->column();
50 | if(selectedItem->row() != currentOldRow)
51 | {
52 | currentOldRow = selectedItem->row();
53 | deleteRows.append(currentOldRow);
54 | currentNewRow++;
55 | }
56 |
57 | this->takeItem(currentOldRow, column);
58 | this->setItem(currentNewRow, column, selectedItem);
59 | }
60 |
61 | for(i = deleteRows.count()-1; i>=0; i--)
62 | {
63 | this->removeRow(deleteRows.at(i));
64 | }
65 |
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/FFCommand_Engine/qfetablewidget.h:
--------------------------------------------------------------------------------
1 | //-----------------------------------------------------------------------------
2 | // This file is part of FFCommand Engine
3 | //
4 | // Copyright (c) 2019 Thomas Aschenbach, Colorlab Corporation
5 | //
6 | // This program is free software; you can redistribute it and/or modify it
7 | // under the terms of the GNU General Public License as published by the
8 | // Free Software Foundation; either version 2 of the License, or (at your
9 | // option) any later version.
10 | //
11 | // FFCommand Engine is distributed in the hope that it will be useful,
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | // GNU General Public License for more details.
15 | // You should have received a copy of the GNU General Public License
16 | // along with this program. If not, see .
17 | //-----------------------------------------------------------------------------
18 |
19 | #ifndef QFETABLEWIDGET_H
20 |
21 | #define QFETABLEWIDGET_H
22 |
23 | #include
24 | #include
25 | #include
26 | class QFETableWidget : public QTableWidget
27 | {
28 | Q_OBJECT
29 | public:
30 | explicit QFETableWidget(QWidget *parent = nullptr);
31 | void dropEvent(QDropEvent *event)Q_DECL_OVERRIDE;
32 | signals:
33 |
34 |
35 | public slots:
36 | };
37 |
38 | #endif // QFETABLEWIDGET_H
39 |
--------------------------------------------------------------------------------
/FFCommand_Engine/qjsonmodel.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2011 SCHUTZ Sacha
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #include "qjsonmodel.h"
26 | #include
27 | #include
28 | #include
29 |
30 |
31 | QJsonTreeItem::QJsonTreeItem(QJsonTreeItem *parent)
32 | {
33 | mParent = parent;
34 | }
35 |
36 | QJsonTreeItem::~QJsonTreeItem()
37 | {
38 | qDeleteAll(mChilds);
39 | }
40 |
41 | void QJsonTreeItem::appendChild(QJsonTreeItem *item)
42 | {
43 | mChilds.append(item);
44 | }
45 |
46 | QJsonTreeItem *QJsonTreeItem::child(int row)
47 | {
48 | return mChilds.value(row);
49 | }
50 |
51 | QJsonTreeItem *QJsonTreeItem::parent()
52 | {
53 | return mParent;
54 | }
55 |
56 | int QJsonTreeItem::childCount() const
57 | {
58 | return mChilds.count();
59 | }
60 |
61 | int QJsonTreeItem::row() const
62 | {
63 | if (mParent)
64 | return mParent->mChilds.indexOf(const_cast(this));
65 |
66 | return 0;
67 | }
68 |
69 | void QJsonTreeItem::setKey(const QString &key)
70 | {
71 | mKey = key;
72 | }
73 |
74 | void QJsonTreeItem::setValue(const QString &value)
75 | {
76 | mValue = value;
77 | }
78 |
79 | void QJsonTreeItem::setType(const QJsonValue::Type &type)
80 | {
81 | mType = type;
82 | }
83 |
84 | QString QJsonTreeItem::key() const
85 | {
86 | return mKey;
87 | }
88 |
89 | QString QJsonTreeItem::value() const
90 | {
91 | return mValue;
92 | }
93 |
94 | QJsonValue::Type QJsonTreeItem::type() const
95 | {
96 | return mType;
97 | }
98 |
99 | QJsonTreeItem* QJsonTreeItem::load(const QJsonValue& value, QJsonTreeItem* parent)
100 | {
101 | QJsonTreeItem * rootItem = new QJsonTreeItem(parent);
102 | rootItem->setKey("root");
103 |
104 | if ( value.isObject())
105 | {
106 |
107 | //Get all QJsonValue childs
108 | for (QString key : value.toObject().keys()){
109 | QJsonValue v = value.toObject().value(key);
110 | QJsonTreeItem * child = load(v,rootItem);
111 | child->setKey(key);
112 | child->setType(v.type());
113 | rootItem->appendChild(child);
114 |
115 | }
116 |
117 | }
118 |
119 | else if ( value.isArray())
120 | {
121 | //Get all QJsonValue childs
122 | int index = 0;
123 | for (QJsonValue v : value.toArray()){
124 |
125 | QJsonTreeItem * child = load(v,rootItem);
126 | child->setKey(QString::number(index));
127 | child->setType(v.type());
128 | rootItem->appendChild(child);
129 | ++index;
130 | }
131 | }
132 | else
133 | {
134 | rootItem->setValue(value.toVariant().toString());
135 | rootItem->setType(value.type());
136 | }
137 |
138 | return rootItem;
139 | }
140 |
141 | //=========================================================================
142 |
143 | QJsonModel::QJsonModel(QObject *parent)
144 | : QAbstractItemModel(parent)
145 | , mRootItem{new QJsonTreeItem}
146 | {
147 | mHeaders.append("key");
148 | mHeaders.append("value");
149 | }
150 |
151 | QJsonModel::QJsonModel(const QString& fileName, QObject *parent)
152 | : QAbstractItemModel(parent)
153 | , mRootItem{new QJsonTreeItem}
154 | {
155 | mHeaders.append("key");
156 | mHeaders.append("value");
157 | load(fileName);
158 | }
159 |
160 | QJsonModel::QJsonModel(QIODevice * device, QObject *parent)
161 | : QAbstractItemModel(parent)
162 | , mRootItem{new QJsonTreeItem}
163 | {
164 | mHeaders.append("key");
165 | mHeaders.append("value");
166 | load(device);
167 | }
168 |
169 | QJsonModel::QJsonModel(const QByteArray& json, QObject *parent)
170 | : QAbstractItemModel(parent)
171 | , mRootItem{new QJsonTreeItem}
172 | {
173 | mHeaders.append("key");
174 | mHeaders.append("value");
175 | loadJson(json);
176 | }
177 |
178 | QJsonModel::~QJsonModel()
179 | {
180 | delete mRootItem;
181 | }
182 |
183 | bool QJsonModel::load(const QString &fileName)
184 | {
185 | QFile file(fileName);
186 | bool success = false;
187 | if (file.open(QIODevice::ReadOnly)) {
188 | success = load(&file);
189 | file.close();
190 | }
191 | else success = false;
192 |
193 | return success;
194 | }
195 |
196 | bool QJsonModel::load(QIODevice *device)
197 | {
198 | return loadJson(device->readAll());
199 | }
200 |
201 | bool QJsonModel::loadJson(const QByteArray &json)
202 | {
203 | auto const& jdoc = QJsonDocument::fromJson(json);
204 |
205 | if (!jdoc.isNull())
206 | {
207 | beginResetModel();
208 | delete mRootItem;
209 | if (jdoc.isArray()) {
210 | mRootItem = QJsonTreeItem::load(QJsonValue(jdoc.array()));
211 | mRootItem->setType(QJsonValue::Array);
212 |
213 | } else {
214 | mRootItem = QJsonTreeItem::load(QJsonValue(jdoc.object()));
215 | mRootItem->setType(QJsonValue::Object);
216 | }
217 | endResetModel();
218 | return true;
219 | }
220 |
221 | qDebug()<(index.internalPointer());
234 |
235 |
236 | if (role == Qt::DisplayRole) {
237 |
238 | if (index.column() == 0)
239 | return QString("%1").arg(item->key());
240 |
241 | if (index.column() == 1)
242 | return QString("%1").arg(item->value());
243 | } else if (Qt::EditRole == role) {
244 | if (index.column() == 1) {
245 | return QString("%1").arg(item->value());
246 | }
247 | }
248 |
249 |
250 |
251 | return QVariant();
252 |
253 | }
254 |
255 | bool QJsonModel::setData(const QModelIndex &index, const QVariant &value, int role)
256 | {
257 | int col = index.column();
258 | if (Qt::EditRole == role) {
259 | if (col == 1) {
260 | QJsonTreeItem *item = static_cast(index.internalPointer());
261 | item->setValue(value.toString());
262 | emit dataChanged(index, index, {Qt::EditRole});
263 | return true;
264 | }
265 | }
266 |
267 | return false;
268 | }
269 |
270 |
271 |
272 | QVariant QJsonModel::headerData(int section, Qt::Orientation orientation, int role) const
273 | {
274 | if (role != Qt::DisplayRole)
275 | return QVariant();
276 |
277 | if (orientation == Qt::Horizontal)
278 | return mHeaders.value(section);
279 | else
280 | return QVariant();
281 | }
282 |
283 | QModelIndex QJsonModel::index(int row, int column, const QModelIndex &parent) const
284 | {
285 | if (!hasIndex(row, column, parent))
286 | return QModelIndex();
287 |
288 | QJsonTreeItem *parentItem;
289 |
290 | if (!parent.isValid())
291 | parentItem = mRootItem;
292 | else
293 | parentItem = static_cast(parent.internalPointer());
294 |
295 | QJsonTreeItem *childItem = parentItem->child(row);
296 | if (childItem)
297 | return createIndex(row, column, childItem);
298 | else
299 | return QModelIndex();
300 | }
301 |
302 | QModelIndex QJsonModel::parent(const QModelIndex &index) const
303 | {
304 | if (!index.isValid())
305 | return QModelIndex();
306 |
307 | QJsonTreeItem *childItem = static_cast(index.internalPointer());
308 | QJsonTreeItem *parentItem = childItem->parent();
309 |
310 | if (parentItem == mRootItem)
311 | return QModelIndex();
312 |
313 | return createIndex(parentItem->row(), 0, parentItem);
314 | }
315 |
316 | int QJsonModel::rowCount(const QModelIndex &parent) const
317 | {
318 | QJsonTreeItem *parentItem;
319 | if (parent.column() > 0)
320 | return 0;
321 |
322 | if (!parent.isValid())
323 | parentItem = mRootItem;
324 | else
325 | parentItem = static_cast(parent.internalPointer());
326 |
327 | return parentItem->childCount();
328 | }
329 |
330 | int QJsonModel::columnCount(const QModelIndex &parent) const
331 | {
332 | Q_UNUSED(parent)
333 | return 2;
334 | }
335 |
336 | Qt::ItemFlags QJsonModel::flags(const QModelIndex &index) const
337 | {
338 | int col = index.column();
339 | auto item = static_cast(index.internalPointer());
340 |
341 | auto isArray = QJsonValue::Array == item->type();
342 | auto isObject = QJsonValue::Object == item->type();
343 |
344 | if ((col == 1) && !(isArray || isObject))
345 | return Qt::ItemIsEditable | QAbstractItemModel::flags(index);
346 | else
347 | return QAbstractItemModel::flags(index);
348 | }
349 |
350 | QJsonDocument QJsonModel::json() const
351 | {
352 |
353 | auto v = genJson(mRootItem);
354 | QJsonDocument doc;
355 |
356 | if (v.isObject())
357 | doc = QJsonDocument(v.toObject());
358 | else
359 | doc = QJsonDocument(v.toArray());
360 |
361 | return doc;
362 | }
363 |
364 | QJsonValue QJsonModel::genJson(QJsonTreeItem * item) const
365 | {
366 | auto type = item->type();
367 | int nchild = item->childCount();
368 |
369 | if (QJsonValue::Object == type) {
370 | QJsonObject jo;
371 | for (int i = 0; i < nchild; ++i) {
372 | auto ch = item->child(i);
373 | auto key = ch->key();
374 | jo.insert(key, genJson(ch));
375 | }
376 | return jo;
377 | } else if (QJsonValue::Array == type) {
378 | QJsonArray arr;
379 | for (int i = 0; i < nchild; ++i) {
380 | auto ch = item->child(i);
381 | arr.append(genJson(ch));
382 | }
383 | return arr;
384 | } else {
385 | QJsonValue va(item->value());
386 | return va;
387 | }
388 |
389 | }
390 |
--------------------------------------------------------------------------------
/FFCommand_Engine/qjsonmodel.h:
--------------------------------------------------------------------------------
1 | /*
2 | * The MIT License (MIT)
3 | *
4 | * Copyright (c) 2011 SCHUTZ Sacha
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef QJSONMODEL_H
26 | #define QJSONMODEL_H
27 |
28 | #include
29 | #include
30 | #include
31 | #include
32 | #include
33 | #include
34 |
35 | class QJsonModel;
36 | class QJsonItem;
37 |
38 | class QJsonTreeItem
39 | {
40 | public:
41 | QJsonTreeItem(QJsonTreeItem * parent = nullptr);
42 | ~QJsonTreeItem();
43 | void appendChild(QJsonTreeItem * item);
44 | QJsonTreeItem *child(int row);
45 | QJsonTreeItem *parent();
46 | int childCount() const;
47 | int row() const;
48 | void setKey(const QString& key);
49 | void setValue(const QString& value);
50 | void setType(const QJsonValue::Type& type);
51 | QString key() const;
52 | QString value() const;
53 | QJsonValue::Type type() const;
54 |
55 |
56 | static QJsonTreeItem* load(const QJsonValue& value, QJsonTreeItem * parent = 0);
57 |
58 | protected:
59 |
60 |
61 | private:
62 | QString mKey;
63 | QString mValue;
64 | QJsonValue::Type mType;
65 | QList mChilds;
66 | QJsonTreeItem * mParent;
67 |
68 |
69 | };
70 |
71 | //---------------------------------------------------
72 |
73 | class QJsonModel : public QAbstractItemModel
74 | {
75 | Q_OBJECT
76 | public:
77 | explicit QJsonModel(QObject *parent = nullptr);
78 | QJsonModel(const QString& fileName, QObject *parent = nullptr);
79 | QJsonModel(QIODevice * device, QObject *parent = nullptr);
80 | QJsonModel(const QByteArray& json, QObject *parent = nullptr);
81 | ~QJsonModel();
82 | bool load(const QString& fileName);
83 | bool load(QIODevice * device);
84 | bool loadJson(const QByteArray& json);
85 | QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
86 | bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
87 | QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE;
88 | QModelIndex index(int row, int column,const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
89 | QModelIndex parent(const QModelIndex &index) const Q_DECL_OVERRIDE;
90 | int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
91 | int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
92 | Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
93 | QJsonDocument json() const;
94 |
95 | private:
96 | QJsonValue genJson(QJsonTreeItem *) const;
97 |
98 | QJsonTreeItem * mRootItem;
99 | QStringList mHeaders;
100 |
101 |
102 | };
103 |
104 | #endif // QJSONMODEL_H
105 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## FFCommand Engine for easier use of FFmpeg binaries.
2 |
3 | Preloaded with preset commands from [amiaopensource/ffmprovisr](https://github.com/amiaopensource/ffmprovisr)
4 |
5 | This is the initial version of the software for public release.
6 |
7 | Version v0.51 available for Mac and pc in the [release]( https://github.com/ColorlabMD/FFCommand_Engine/releases) tab.
8 |
9 | The windows version may require msvc 2017 redistributable if it is not already installed.
10 |
11 | It is available here: [https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)
12 |
13 | ### **What it does:**
14 |
15 | **Constructs, stores, and operates based off of FFmpeg commands.**
16 |
17 | **Breaks down FFmpeg commands into a more easily understandable form.**
18 |
19 | **Allows those with limited terminal experience use FFmpeg easily.**
20 |
21 | **Creates a queue of FFmpeg processes.**
22 |
23 | **Allows for batch processing of files without scripting knowledge.**
24 |
25 | **Makes it easy to modify commands found online to adapt to your specific needs.**
26 |
27 | ### **What it doesn’t do:**
28 |
29 | **Create GUI for FFmpeg**
30 |
31 | **It provides no syntax checking**
32 |
33 |
34 |
35 |
36 | **How to use**
37 |
38 | 1. Download FFmpeg binaries
39 |
40 | 2. Start FFCommand_Engine
41 |
42 | 3. Set FFmpeg binaries location. File->Set FFmpeg Dir (mac uses default /usr/local/bin most users will not need to change)
43 |
44 | 4. Load a preset or copy and paste a command using the parse command button.
45 |
46 | 5. Change input and output file.
47 |
48 | 6. Add to queue.
49 |
50 | 7. Start queue.
51 |
52 | **Batch Mode**
53 |
54 | 1. Add multiple input files.
55 |
56 | 2. Check “Batch Mode” checkbox
57 |
58 | 3. Set Output Directory
59 |
60 | 4. Set output file name appending
61 |
62 | 5. Add to queue
63 |
64 | 6. Start queue
65 |
--------------------------------------------------------------------------------