Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
transcodinginfo.h
Go to the documentation of this file.
1/*
2 * Sailfin: a Jellyfin client written using Qt
3 * Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19/*
20 * WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
21 * OVERWRITTEN AT SOME POINT!
22 *
23 * If there is a bug in this file, please fix the code generator used to generate this file found in
24 * core/openapigenerator.d.
25 *
26 * This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
27 * file with a newer file if needed instead of manually updating the files.
28 */
29
30#ifndef JELLYFIN_DTO_TRANSCODINGINFO_H
31#define JELLYFIN_DTO_TRANSCODINGINFO_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QList>
36#include <QString>
37#include <QStringList>
38#include <optional>
39
42
43namespace Jellyfin {
44// Forward declaration
45class ApiClient;
46}
47namespace Jellyfin {
48namespace DTO {
49
50
52public:
54 bool isVideoDirect,
55 bool isAudioDirect
56 );
57
58 TranscodingInfo(const TranscodingInfo &other);
59
63 void replaceData(TranscodingInfo &other);
64
65 static TranscodingInfo fromJson(QJsonObject source);
66 void setFromJson(QJsonObject source);
67 QJsonObject toJson() const;
68
69 // Properties
70
71 QString audioCodec() const;
72
73 void setAudioCodec(QString newAudioCodec);
74 bool audioCodecNull() const;
75 void setAudioCodecNull();
76
77
78 QString videoCodec() const;
79
80 void setVideoCodec(QString newVideoCodec);
81 bool videoCodecNull() const;
82 void setVideoCodecNull();
83
84
85 QString container() const;
86
87 void setContainer(QString newContainer);
88 bool containerNull() const;
89 void setContainerNull();
90
91
92 bool isVideoDirect() const;
93
94 void setIsVideoDirect(bool newIsVideoDirect);
95
96
97 bool isAudioDirect() const;
98
99 void setIsAudioDirect(bool newIsAudioDirect);
100
101
102 std::optional<qint32> bitrate() const;
103
104 void setBitrate(std::optional<qint32> newBitrate);
105 bool bitrateNull() const;
106 void setBitrateNull();
107
108
109 std::optional<float> framerate() const;
110
111 void setFramerate(std::optional<float> newFramerate);
112 bool framerateNull() const;
113 void setFramerateNull();
114
115
116 std::optional<double> completionPercentage() const;
117
118 void setCompletionPercentage(std::optional<double> newCompletionPercentage);
119 bool completionPercentageNull() const;
121
122
123 std::optional<qint32> width() const;
124
125 void setWidth(std::optional<qint32> newWidth);
126 bool widthNull() const;
127 void setWidthNull();
128
129
130 std::optional<qint32> height() const;
131
132 void setHeight(std::optional<qint32> newHeight);
133 bool heightNull() const;
134 void setHeightNull();
135
136
137 std::optional<qint32> audioChannels() const;
138
139 void setAudioChannels(std::optional<qint32> newAudioChannels);
140 bool audioChannelsNull() const;
142
143
145
146 void setTranscodeReasons(QList<TranscodeReason> newTranscodeReasons);
147 bool transcodeReasonsNull() const;
149
150
151protected:
154 QString m_container;
157 std::optional<qint32> m_bitrate = std::nullopt;
158 std::optional<float> m_framerate = std::nullopt;
159 std::optional<double> m_completionPercentage = std::nullopt;
160 std::optional<qint32> m_width = std::nullopt;
161 std::optional<qint32> m_height = std::nullopt;
162 std::optional<qint32> m_audioChannels = std::nullopt;
164
165private:
166 // Private constructor which generates an invalid object, for use withing TranscodingInfo::fromJson();
168};
169
170
171} // NS DTO
172
173namespace Support {
174
176
177template <>
179
180template<>
182
183} // NS DTO
184} // NS Jellyfin
185
186#endif // JELLYFIN_DTO_TRANSCODINGINFO_H
Definition transcodinginfo.h:51
void setAudioChannelsNull()
Definition transcodinginfo.cpp:282
std::optional< qint32 > m_audioChannels
Definition transcodinginfo.h:162
bool m_isVideoDirect
Definition transcodinginfo.h:155
void setFromJson(QJsonObject source)
Definition transcodinginfo.cpp:83
QList< TranscodeReason > transcodeReasons() const
Definition transcodinginfo.cpp:286
bool transcodeReasonsNull() const
Definition transcodinginfo.cpp:291
void setFramerateNull()
Definition transcodinginfo.cpp:230
void setVideoCodecNull()
Definition transcodinginfo.cpp:179
bool audioCodecNull() const
Definition transcodinginfo.cpp:162
QString m_audioCodec
Definition transcodinginfo.h:152
bool framerateNull() const
Definition transcodinginfo.cpp:226
QString videoCodec() const
Definition transcodinginfo.cpp:170
std::optional< qint32 > width() const
Definition transcodinginfo.cpp:247
void setVideoCodec(QString newVideoCodec)
Definition transcodinginfo.cpp:172
QList< TranscodeReason > m_transcodeReasons
Definition transcodinginfo.h:163
void setIsAudioDirect(bool newIsAudioDirect)
Definition transcodinginfo.cpp:204
void setAudioChannels(std::optional< qint32 > newAudioChannels)
Definition transcodinginfo.cpp:275
bool isVideoDirect() const
Definition transcodinginfo.cpp:196
bool videoCodecNull() const
Definition transcodinginfo.cpp:175
bool widthNull() const
Definition transcodinginfo.cpp:252
void setWidth(std::optional< qint32 > newWidth)
Definition transcodinginfo.cpp:249
std::optional< qint32 > audioChannels() const
Definition transcodinginfo.cpp:273
QString m_videoCodec
Definition transcodinginfo.h:153
void setTranscodeReasonsNull()
Definition transcodinginfo.cpp:295
void setWidthNull()
Definition transcodinginfo.cpp:256
bool heightNull() const
Definition transcodinginfo.cpp:265
std::optional< float > framerate() const
Definition transcodinginfo.cpp:221
std::optional< qint32 > height() const
Definition transcodinginfo.cpp:260
void setAudioCodecNull()
Definition transcodinginfo.cpp:166
QString audioCodec() const
Definition transcodinginfo.cpp:157
void setIsVideoDirect(bool newIsVideoDirect)
Definition transcodinginfo.cpp:198
void setCompletionPercentageNull()
Definition transcodinginfo.cpp:243
void setHeight(std::optional< qint32 > newHeight)
Definition transcodinginfo.cpp:262
std::optional< double > m_completionPercentage
Definition transcodinginfo.h:159
void setBitrateNull()
Definition transcodinginfo.cpp:217
std::optional< qint32 > m_width
Definition transcodinginfo.h:160
std::optional< qint32 > bitrate() const
Definition transcodinginfo.cpp:208
QString container() const
Definition transcodinginfo.cpp:183
QJsonObject toJson() const
Definition transcodinginfo.cpp:99
void setContainerNull()
Definition transcodinginfo.cpp:192
bool audioChannelsNull() const
Definition transcodinginfo.cpp:278
bool completionPercentageNull() const
Definition transcodinginfo.cpp:239
void setBitrate(std::optional< qint32 > newBitrate)
Definition transcodinginfo.cpp:210
QString m_container
Definition transcodinginfo.h:154
bool m_isAudioDirect
Definition transcodinginfo.h:156
void setFramerate(std::optional< float > newFramerate)
Definition transcodinginfo.cpp:223
std::optional< qint32 > m_bitrate
Definition transcodinginfo.h:157
void setContainer(QString newContainer)
Definition transcodinginfo.cpp:185
void setTranscodeReasons(QList< TranscodeReason > newTranscodeReasons)
Definition transcodinginfo.cpp:288
bool containerNull() const
Definition transcodinginfo.cpp:188
std::optional< float > m_framerate
Definition transcodinginfo.h:158
void replaceData(TranscodingInfo &other)
Definition transcodinginfo.cpp:61
void setHeightNull()
Definition transcodinginfo.cpp:269
void setCompletionPercentage(std::optional< double > newCompletionPercentage)
Definition transcodinginfo.cpp:236
void setAudioCodec(QString newAudioCodec)
Definition transcodinginfo.cpp:159
bool isAudioDirect() const
Definition transcodinginfo.cpp:202
bool bitrateNull() const
Definition transcodinginfo.cpp:213
std::optional< double > completionPercentage() const
Definition transcodinginfo.cpp:234
std::optional< qint32 > m_height
Definition transcodinginfo.h:161
static TranscodingInfo fromJson(QJsonObject source)
Definition transcodinginfo.cpp:76
Definition mediaplayer2.h:20
AccessSchedule fromJsonValue(const QJsonValue &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:133
QJsonValue toJsonValue(const AccessSchedule &source, convertType< AccessSchedule >)
Definition accessschedule.cpp:139
Definition jsonconvimpl.h:45