digiKam
vidslidesettings.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2017-05-25
7  * Description : a tool to generate video slideshow from images.
8  *
9  * Copyright (C) 2017-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * ============================================================ */
22 
23 #ifndef DIGIKAM_VIDSLIDE_SETTINGS_H
24 #define DIGIKAM_VIDSLIDE_SETTINGS_H
25 
26 // Qt includes
27 
28 #include <QString>
29 #include <QList>
30 #include <QUrl>
31 #include <QSize>
32 #include <QMap>
33 
34 // Local includes
35 
36 #include "filesaveconflictbox.h"
37 #include "transitionmngr.h"
38 #include "effectmngr.h"
39 #include "digikam_export.h"
40 
41 class KConfigGroup;
42 
43 namespace Digikam
44 {
45 
46 class DIGIKAM_EXPORT VidSlideSettings
47 {
48 public:
49 
53  enum Selection
54  {
55  IMAGES = 0,
56  ALBUMS
57  };
58 
62  enum VidPlayer
63  {
64  NOPLAYER = 0,
66  DESKTOP
67  };
68 
72  enum VidCodec
73  {
74  X264 = 0,
81  WMV7,
82  WMV8,
83  WMV9
84  };
85 
89  enum VidStd
90  {
91  PAL = 0,
92  NTSC
93  };
94 
100  enum VidType
101  {
102  QVGA = 0,
113  EGA,
114  VGA,
156  UW16K
157  };
158 
163  {
164  VBR04 = 0,
176  VBR80
177  };
178 
183  {
184  AVI = 0,
185  MKV,
186  MP4,
187  MPG
188  };
189 
190 public:
191 
192  explicit VidSlideSettings();
193  ~VidSlideSettings();
194 
198  void readSettings(KConfigGroup& group);
199  void writeSettings(KConfigGroup& group);
200 
201  QSize videoSize() const;
202  int videoBitRate() const;
203  qreal videoFrameRate() const;
204  QString videoCodec() const;
205  QString videoFormat() const;
206 
210  static QMap<VidType, QString> videoTypeNames();
211  static QMap<VidBitRate, QString> videoBitRateNames();
212  static QMap<VidStd, QString> videoStdNames();
213  static QMap<VidCodec, QString> videoCodecNames();
214  static QMap<VidFormat, QString> videoFormatNames();
215  static QMap<VidPlayer, QString> videoPlayerNames();
216 
217  static QSize videoSizeFromType(VidType type);
218  static bool isVideoTVFormat(VidType type);
219 
220 public:
221 
223 
224  // -- Generator settings ------
225 
228 
230 
231  int imgFrames;
232 
233  int abitRate;
240 
242  QUrl outputDir;
243 
244  // ---------------------
245 
246  QString outputVideo;
248 };
249 
250 } // namespace Digikam
251 
252 #endif // DIGIKAM_VIDSLIDE_SETTINGS_H
EffectType
Definition: effectmngr.h:47
ConflictRule
Definition: filesaveconflictbox.h:46
TransType
Definition: transitionmngr.h:44
Definition: vidslidesettings.h:47
QString outputVideo
Target video file encoded at end.
Definition: vidslidesettings.h:246
VidPlayer outputPlayer
Open video stream in player at end.
Definition: vidslidesettings.h:247
QList< QUrl > inputImages
Images stream.
Definition: vidslidesettings.h:226
FileSaveConflictBox::ConflictRule conflictRule
Rule to follow if video file already exists.
Definition: vidslidesettings.h:241
VidCodec
Definition: vidslidesettings.h:73
@ MJPEG
https://en.wikipedia.org/wiki/Motion_JPEG
Definition: vidslidesettings.h:77
@ THEORA
https://en.wikipedia.org/wiki/Theora
Definition: vidslidesettings.h:80
@ MPEG4
https://en.wikipedia.org/wiki/MPEG-4
Definition: vidslidesettings.h:75
@ FLASH
https://en.wikipedia.org/wiki/Adobe_Flash
Definition: vidslidesettings.h:78
@ WMV8
https://en.wikipedia.org/wiki/Windows_Media_Video
Definition: vidslidesettings.h:82
@ WEBMVP8
https://en.wikipedia.org/wiki/VP8
Definition: vidslidesettings.h:79
@ WMV7
https://en.wikipedia.org/wiki/Windows_Media_Video
Definition: vidslidesettings.h:81
@ MPEG2
https://en.wikipedia.org/wiki/MPEG-2
Definition: vidslidesettings.h:76
VidStd vStandard
Encoded Video standard => frame rate in img/s.
Definition: vidslidesettings.h:235
VidFormat vFormat
Encoded video container format.
Definition: vidslidesettings.h:238
QList< QUrl > inputAudio
Soundtracks stream.
Definition: vidslidesettings.h:227
QUrl outputDir
Encoded video stream directory.
Definition: vidslidesettings.h:242
VidType vType
Encoded video type.
Definition: vidslidesettings.h:236
int imgFrames
Amount of frames by image to encode in video (ex: 125 frames = 5 s at 25 img/s).
Definition: vidslidesettings.h:231
EffectMngr::EffectType vEffect
Encoded video effect while displaying images.
Definition: vidslidesettings.h:239
VidStd
Definition: vidslidesettings.h:90
VidCodec vCodec
Encoded video codec.
Definition: vidslidesettings.h:237
VidType
Definition: vidslidesettings.h:101
@ EGA
640 x 350 - 16:9 - Computer Graphics
Definition: vidslidesettings.h:113
@ HSXGA
5120 x 4096 - 5:4 - Computer Graphics
Definition: vidslidesettings.h:149
@ DVD1
720 x 480 - 3:2 - Digital TV
Definition: vidslidesettings.h:117
@ SDTV2
544 x 480 - 17:15 - Digital TV
Definition: vidslidesettings.h:110
@ SVGA
800 x 600 - 4:3 - Computer Graphics
Definition: vidslidesettings.h:120
@ WUXGA
1920 x 1200 - 8:5 - Computer Graphics
Definition: vidslidesettings.h:133
@ UW10K
10240 x 4320 - 21:9 - Computer Graphics
Definition: vidslidesettings.h:155
@ SXGA
1280 x 1024 - 5:4 - Computer Graphics
Definition: vidslidesettings.h:126
@ WSXGA
1440 x 900 - 8:5 - Computer Graphics
Definition: vidslidesettings.h:128
@ WQSXGA
3200 x 2048 - 25:16 - Computer Graphics
Definition: vidslidesettings.h:142
@ SDTV3
704 x 480 - 22:15 - Digital TV
Definition: vidslidesettings.h:115
@ WQXGAPLUS
3200 x 1800 - 16:9 - Computer Graphics
Definition: vidslidesettings.h:141
@ DVD2
720 x 576 - 5:4 - Digital TV
Definition: vidslidesettings.h:118
@ WQXGA
2560 x 1600 - 8:5 - Computer Graphics
Definition: vidslidesettings.h:138
@ QSXGA
2560 x 2048 - 5:4 - Computer Graphics
Definition: vidslidesettings.h:139
@ SXGAPLUS
1400 x 1050 - 4:3 - Computer Graphics
Definition: vidslidesettings.h:127
@ SDTV1
528 x 480 - 11:10 - Digital TV
Definition: vidslidesettings.h:109
@ BLUERAY
1920 x 1080 - 19:9 - Digital TV
Definition: vidslidesettings.h:132
@ UHD6K
6016 x 3384 - 16:9 - Computer Graphics
Definition: vidslidesettings.h:150
@ UWFHD
2560 < 1080 - 21:9 - Computer Graphics
Definition: vidslidesettings.h:136
@ WHSXGA
6400 x 4096 - 25:16 - Computer Graphics
Definition: vidslidesettings.h:151
@ EDTV1
544 x 576 - 17;18 - Digital TV
Definition: vidslidesettings.h:111
@ UXGA
1600 x 1200 - 4:3 - Computer Graphics
Definition: vidslidesettings.h:130
@ XVGA
1024 x 576 - 16:9 - Computer Graphics
Definition: vidslidesettings.h:122
@ CVD2
352 x 576 - 11:18 - Digital TV
Definition: vidslidesettings.h:106
@ HUXGA
6400 x 4800 - 4:3 - Computer Graphics
Definition: vidslidesettings.h:152
@ WXGA2
1280 x 800 - 8:5 - Computer Graphics
Definition: vidslidesettings.h:125
@ UHD4K
3840 x 2160 - 19:9 - Digital TV
Definition: vidslidesettings.h:144
@ QUXGA
3200 x 2400 - 4:3 - Computer Graphics
Definition: vidslidesettings.h:143
@ SVCD1
480 x 480 - 1:1 - Digital TV
Definition: vidslidesettings.h:108
@ HDPLUS
1600 x 900 - 16:9 - Digital TV
Definition: vidslidesettings.h:129
@ HDTV
1280 x 720 - 16:9 - Digital TV
Definition: vidslidesettings.h:123
@ UHD8K
7680 x 4320 - 16:9 - Digital TV
Definition: vidslidesettings.h:153
@ WVGA
800 x 450 - 16:9 - Computer Graphics
Definition: vidslidesettings.h:119
@ WHUXGA
7680 x 4800 - 8:5 - Computer Graphics
Definition: vidslidesettings.h:154
@ WQUXGA
3840 x 2400 - 8:5 - Computer Graphics
Definition: vidslidesettings.h:145
@ HVGA
480 x 270 - 16:9 - Computer Graphics
Definition: vidslidesettings.h:107
@ QXGA
2048 x 1536 - 4:3 - Computer Graphics
Definition: vidslidesettings.h:135
@ WSXGAPLUS
1680 x 1050 - 8:5 - Computer Graphics
Definition: vidslidesettings.h:131
@ VCD2
352 x 288 - 6:5 - Digital TV
Definition: vidslidesettings.h:104
@ QSXGAPLUS
2800 x 2100 - 4:3 - Computer Graphics
Definition: vidslidesettings.h:140
@ SVCD2
480 x 576 - 5:6 - Digital TV
Definition: vidslidesettings.h:112
@ UHD5K
5120 x 2880 - 16:9 - Computer Graphics
Definition: vidslidesettings.h:147
@ HXGA
4096 x 3072 - 4:3 - Computer Graphics
Definition: vidslidesettings.h:146
@ WQHD
2560 x 1440 - 16:9 - Computer Graphics
Definition: vidslidesettings.h:137
@ DVGA
960 x 640 - 3:2 - Computer Graphics
Definition: vidslidesettings.h:121
@ CVD1
352 x 480 - 11:15 - Digital TV
Definition: vidslidesettings.h:105
@ WXGA1
1280 x 768 - 5:3 - Computer Graphics
Definition: vidslidesettings.h:124
@ EDTV2
704 x 576 - 11;9 - Digital TV
Definition: vidslidesettings.h:116
@ TXGA
1920 x 1440 - 7:5 - Computer Graphics
Definition: vidslidesettings.h:134
@ VCD1
352 x 240 - 7:5 - Digital TV
Definition: vidslidesettings.h:103
@ WHXGA
5120 x 3200 - 8:5 - Computer Graphics
Definition: vidslidesettings.h:148
@ VGA
640 x 480 - 4:3 - Computer Graphics
Definition: vidslidesettings.h:114
Selection
Definition: vidslidesettings.h:54
VidPlayer
Definition: vidslidesettings.h:63
@ INTERNAL
Definition: vidslidesettings.h:65
VidFormat
Definition: vidslidesettings.h:183
@ MP4
https://en.wikipedia.org/wiki/MPEG-4_Part_14
Definition: vidslidesettings.h:186
@ MKV
https://en.wikipedia.org/wiki/Matroska
Definition: vidslidesettings.h:185
TransitionMngr::TransType transition
Transition type between images.
Definition: vidslidesettings.h:229
int abitRate
Encoded Audio stream bit rate in bit/s.
Definition: vidslidesettings.h:233
VidBitRate vbitRate
Encoded Video stream bit rate in bit/s.
Definition: vidslidesettings.h:234
Selection selMode
Items selection mode.
Definition: vidslidesettings.h:222
VidBitRate
Definition: vidslidesettings.h:163
@ VBR30
3000000
Definition: vidslidesettings.h:171
@ VBR12
1200000
Definition: vidslidesettings.h:167
@ VBR50
5000000
Definition: vidslidesettings.h:174
@ VBR45
4500000
Definition: vidslidesettings.h:173
@ VBR15
1500000
Definition: vidslidesettings.h:168
@ VBR60
6000000
Definition: vidslidesettings.h:175
@ VBR10
1000000
Definition: vidslidesettings.h:166
@ VBR40
4000000
Definition: vidslidesettings.h:172
@ VBR20
2000000
Definition: vidslidesettings.h:169
@ VBR25
2500000
Definition: vidslidesettings.h:170
@ VBR05
500000
Definition: vidslidesettings.h:165
Definition: datefolderview.cpp:43