Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
transcodingprofile.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_TRANSCODINGPROFILE_H
31#define JELLYFIN_DTO_TRANSCODINGPROFILE_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QList>
36#include <QString>
37#include <QStringList>
38#include <optional>
39
46
47namespace Jellyfin {
48// Forward declaration
49class ApiClient;
50}
51namespace Jellyfin {
52namespace DTO {
53
54
56public:
58 QString container,
60 QString videoCodec,
61 QString audioCodec,
63 std::optional<bool> estimateContentLength,
64 std::optional<bool> enableMpegtsM2TsMode,
66 std::optional<bool> copyTimestamps,
68 std::optional<bool> enableSubtitlesInManifest,
69 std::optional<qint32> minSegments,
70 std::optional<qint32> segmentLength,
71 std::optional<bool> breakOnNonKeyFrames,
73 std::optional<bool> enableAudioVbrEncoding
74 );
75
77
82
83 static TranscodingProfile fromJson(QJsonObject source);
84 void setFromJson(QJsonObject source);
85 QJsonObject toJson() const;
86
87 // Properties
91 QString container() const;
95 void setContainer(QString newContainer);
96
97
98 DlnaProfileType type() const;
99
100 void setType(DlnaProfileType newType);
101
105 QString videoCodec() const;
109 void setVideoCodec(QString newVideoCodec);
110
114 QString audioCodec() const;
118 void setAudioCodec(QString newAudioCodec);
119
120
122
123 void setProtocol(MediaStreamProtocol newProtocol);
124
128 std::optional<bool> estimateContentLength() const;
132 void setEstimateContentLength(std::optional<bool> newEstimateContentLength);
133
137 std::optional<bool> enableMpegtsM2TsMode() const;
141 void setEnableMpegtsM2TsMode(std::optional<bool> newEnableMpegtsM2TsMode);
142
143
145
146 void setTranscodeSeekInfo(TranscodeSeekInfo newTranscodeSeekInfo);
147
151 std::optional<bool> copyTimestamps() const;
155 void setCopyTimestamps(std::optional<bool> newCopyTimestamps);
156
157
158 EncodingContext context() const;
159
160 void setContext(EncodingContext newContext);
161
165 std::optional<bool> enableSubtitlesInManifest() const;
169 void setEnableSubtitlesInManifest(std::optional<bool> newEnableSubtitlesInManifest);
170
174 QString maxAudioChannels() const;
178 void setMaxAudioChannels(QString newMaxAudioChannels);
179 bool maxAudioChannelsNull() const;
181
185 std::optional<qint32> minSegments() const;
189 void setMinSegments(std::optional<qint32> newMinSegments);
190
194 std::optional<qint32> segmentLength() const;
198 void setSegmentLength(std::optional<qint32> newSegmentLength);
199
203 std::optional<bool> breakOnNonKeyFrames() const;
207 void setBreakOnNonKeyFrames(std::optional<bool> newBreakOnNonKeyFrames);
208
216 void setConditions(QList<ProfileCondition> newConditions);
217
221 std::optional<bool> enableAudioVbrEncoding() const;
225 void setEnableAudioVbrEncoding(std::optional<bool> newEnableAudioVbrEncoding);
226
227
228protected:
229 QString m_container;
234 std::optional<bool> m_estimateContentLength = std::nullopt;
235 std::optional<bool> m_enableMpegtsM2TsMode = std::nullopt;
237 std::optional<bool> m_copyTimestamps = std::nullopt;
239 std::optional<bool> m_enableSubtitlesInManifest = std::nullopt;
241 std::optional<qint32> m_minSegments = std::nullopt;
242 std::optional<qint32> m_segmentLength = std::nullopt;
243 std::optional<bool> m_breakOnNonKeyFrames = std::nullopt;
245 std::optional<bool> m_enableAudioVbrEncoding = std::nullopt;
246
247private:
248 // Private constructor which generates an invalid object, for use withing TranscodingProfile::fromJson();
250};
251
252
253} // NS DTO
254
255namespace Support {
256
258
259template <>
261
262template<>
264
265} // NS DTO
266} // NS Jellyfin
267
268#endif // JELLYFIN_DTO_TRANSCODINGPROFILE_H
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition transcodingprofile.h:55
void setTranscodeSeekInfo(TranscodeSeekInfo newTranscodeSeekInfo)
Definition transcodingprofile.cpp:213
QJsonObject toJson() const
Definition transcodingprofile.cpp:142
MediaStreamProtocol protocol() const
Definition transcodingprofile.cpp:193
std::optional< bool > enableSubtitlesInManifest() const
Gets or sets a value indicating whether subtitles are allowed in the manifest.
Definition transcodingprofile.cpp:229
void setCopyTimestamps(std::optional< bool > newCopyTimestamps)
Gets or sets a value indicating whether timestamps should be copied.
Definition transcodingprofile.cpp:219
std::optional< bool > m_enableSubtitlesInManifest
Definition transcodingprofile.h:239
void setContainer(QString newContainer)
Gets or sets the container.
Definition transcodingprofile.cpp:171
void setAudioCodec(QString newAudioCodec)
Gets or sets the audio codec.
Definition transcodingprofile.cpp:189
std::optional< bool > estimateContentLength() const
Gets or sets a value indicating whether the content length should be estimated.
Definition transcodingprofile.cpp:199
TranscodeSeekInfo transcodeSeekInfo() const
Definition transcodingprofile.cpp:211
QString container() const
Gets or sets the container.
Definition transcodingprofile.cpp:169
std::optional< bool > breakOnNonKeyFrames() const
Gets or sets a value indicating whether breaking the video stream on non-keyframes is supported.
Definition transcodingprofile.cpp:260
MediaStreamProtocol m_protocol
Definition transcodingprofile.h:233
void replaceData(TranscodingProfile &other)
Definition transcodingprofile.cpp:94
QList< ProfileCondition > conditions() const
Gets or sets the profile conditions.
Definition transcodingprofile.cpp:266
QString m_videoCodec
Definition transcodingprofile.h:231
void setEstimateContentLength(std::optional< bool > newEstimateContentLength)
Gets or sets a value indicating whether the content length should be estimated.
Definition transcodingprofile.cpp:201
QString videoCodec() const
Gets or sets the video codec.
Definition transcodingprofile.cpp:181
std::optional< bool > m_estimateContentLength
Definition transcodingprofile.h:234
void setSegmentLength(std::optional< qint32 > newSegmentLength)
Gets or sets the segment length.
Definition transcodingprofile.cpp:256
bool maxAudioChannelsNull() const
Definition transcodingprofile.cpp:240
void setProtocol(MediaStreamProtocol newProtocol)
Definition transcodingprofile.cpp:195
EncodingContext m_context
Definition transcodingprofile.h:238
TranscodeSeekInfo m_transcodeSeekInfo
Definition transcodingprofile.h:236
std::optional< qint32 > m_segmentLength
Definition transcodingprofile.h:242
QString m_container
Definition transcodingprofile.h:229
QString m_maxAudioChannels
Definition transcodingprofile.h:240
void setEnableSubtitlesInManifest(std::optional< bool > newEnableSubtitlesInManifest)
Gets or sets a value indicating whether subtitles are allowed in the manifest.
Definition transcodingprofile.cpp:231
std::optional< qint32 > m_minSegments
Definition transcodingprofile.h:241
TranscodingProfile(QString container, DlnaProfileType type, QString videoCodec, QString audioCodec, MediaStreamProtocol protocol, std::optional< bool > estimateContentLength, std::optional< bool > enableMpegtsM2TsMode, TranscodeSeekInfo transcodeSeekInfo, std::optional< bool > copyTimestamps, EncodingContext context, std::optional< bool > enableSubtitlesInManifest, std::optional< qint32 > minSegments, std::optional< qint32 > segmentLength, std::optional< bool > breakOnNonKeyFrames, QList< ProfileCondition > conditions, std::optional< bool > enableAudioVbrEncoding)
Definition transcodingprofile.cpp:36
std::optional< bool > m_enableMpegtsM2TsMode
Definition transcodingprofile.h:235
void setMinSegments(std::optional< qint32 > newMinSegments)
Gets or sets the minimum amount of segments.
Definition transcodingprofile.cpp:250
QString maxAudioChannels() const
Gets or sets the maximum audio channels.
Definition transcodingprofile.cpp:235
void setVideoCodec(QString newVideoCodec)
Gets or sets the video codec.
Definition transcodingprofile.cpp:183
void setType(DlnaProfileType newType)
Definition transcodingprofile.cpp:177
DlnaProfileType type() const
Definition transcodingprofile.cpp:175
void setEnableAudioVbrEncoding(std::optional< bool > newEnableAudioVbrEncoding)
Gets or sets a value indicating whether variable bitrate encoding is supported.
Definition transcodingprofile.cpp:274
static TranscodingProfile fromJson(QJsonObject source)
Definition transcodingprofile.cpp:114
void setFromJson(QJsonObject source)
Definition transcodingprofile.cpp:121
std::optional< bool > enableMpegtsM2TsMode() const
Gets or sets a value indicating whether M2TS mode is enabled.
Definition transcodingprofile.cpp:205
void setConditions(QList< ProfileCondition > newConditions)
Gets or sets the profile conditions.
Definition transcodingprofile.cpp:268
std::optional< bool > enableAudioVbrEncoding() const
Gets or sets a value indicating whether variable bitrate encoding is supported.
Definition transcodingprofile.cpp:272
std::optional< bool > m_copyTimestamps
Definition transcodingprofile.h:237
QList< ProfileCondition > m_conditions
Definition transcodingprofile.h:244
void setBreakOnNonKeyFrames(std::optional< bool > newBreakOnNonKeyFrames)
Gets or sets a value indicating whether breaking the video stream on non-keyframes is supported.
Definition transcodingprofile.cpp:262
DlnaProfileType m_type
Definition transcodingprofile.h:230
std::optional< qint32 > minSegments() const
Gets or sets the minimum amount of segments.
Definition transcodingprofile.cpp:248
QString audioCodec() const
Gets or sets the audio codec.
Definition transcodingprofile.cpp:187
std::optional< bool > m_breakOnNonKeyFrames
Definition transcodingprofile.h:243
EncodingContext context() const
Definition transcodingprofile.cpp:223
void setMaxAudioChannelsNull()
Definition transcodingprofile.cpp:244
void setMaxAudioChannels(QString newMaxAudioChannels)
Gets or sets the maximum audio channels.
Definition transcodingprofile.cpp:237
std::optional< bool > copyTimestamps() const
Gets or sets a value indicating whether timestamps should be copied.
Definition transcodingprofile.cpp:217
std::optional< qint32 > segmentLength() const
Gets or sets the segment length.
Definition transcodingprofile.cpp:254
QString m_audioCodec
Definition transcodingprofile.h:232
std::optional< bool > m_enableAudioVbrEncoding
Definition transcodingprofile.h:245
void setContext(EncodingContext newContext)
Definition transcodingprofile.cpp:225
void setEnableMpegtsM2TsMode(std::optional< bool > newEnableMpegtsM2TsMode)
Gets or sets a value indicating whether M2TS mode is enabled.
Definition transcodingprofile.cpp:207
Definition mediaplayer2.h:20
Contains auto-generated Data Transfer Objects for the Jellyfin HTTP API.
MediaStreamProtocolClass::Value MediaStreamProtocol
Definition mediastreamprotocol.h:59
EncodingContextClass::Value EncodingContext
Definition encodingcontext.h:59
DlnaProfileTypeClass::Value DlnaProfileType
Definition dlnaprofiletype.h:62
TranscodeSeekInfoClass::Value TranscodeSeekInfo
Definition transcodeseekinfo.h:59
Definition accessschedule.h:128
Jellyfin::DTO::TranscodingProfile TranscodingProfile
Definition transcodingprofile.h:257
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