Krita Source Code Documentation
Loading...
Searching...
No Matches
KisAnimationRenderingOptions.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6
7#ifndef KISANIMATIONRENDERINGOPTIONS_H
8#define KISANIMATIONRENDERINGOPTIONS_H
9
10#include <QString>
12
13#include "kritaui_export.h"
14
15class KRITAUI_EXPORT KisAnimationRenderingOptions
16{
17public:
19
21#ifdef Q_OS_ANDROID
22 QString videoFormatKey;
23 QString videoFormatPreferencesJson;
24#else
25 QString videoMimeType = QStringLiteral("video/mp4");
26#endif
27 QString frameMimeType = QStringLiteral("image/png");
28
29 QString basename = QStringLiteral("frame");
30 QString directory = QStringLiteral("");
31 int firstFrame = 0;
32 int lastFrame = 0;
33 int sequenceStart = 0;
34
35 // On Android, we only allow either frame or video export, not both. Using
36 // a temporary directory instead of scribbling around in external storage is
37 // just orders of magnitude faster, doesn't spam the user's recent files
38 // with pointless image frames and also makes the export dialog not have to
39 // be so screen-escapingly tall. Hence we only have one boolean there.
40 bool shouldEncodeVideo = false;
41#ifndef Q_OS_ANDROID
42 bool shouldDeleteSequence = false;
43#endif
44 bool includeAudio = false;
45 bool wantsOnlyUniqueFrameSequence = false;
46
47#ifndef Q_OS_ANDROID
48 QString ffmpegPath;
49#endif
50 int frameRate = 25;
51 int width = 0;
52 int height = 0;
53 QString scaleFilter;
55
56#ifndef Q_OS_ANDROID
58#endif
60
61#ifndef Q_OS_ANDROID
62 QString resolveAbsoluteDocumentFilePath(const QString &documentPath) const;
63 QString resolveAbsoluteVideoFilePath(const QString &documentPath) const;
64 QString resolveAbsoluteFramesDirectory(const QString &documentPath) const;
65
66 QString resolveAbsoluteVideoFilePath() const;
67 QString resolveAbsoluteFramesDirectory() const;
68#endif
69
70
74#ifndef Q_OS_ANDROID
75 RENDER_FRAMES_AND_VIDEO
76#endif
77 };
78
79 RenderMode renderMode() const;
80
81
82 KisPropertiesConfigurationSP toProperties() const;
83 void fromProperties(KisPropertiesConfigurationSP config);
84
85};
86
87#endif // KISANIMATIONRENDERINGOPTIONS_H
KisPropertiesConfigurationSP frameExportConfig