Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
mediasourceinfo.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_MEDIASOURCEINFO_H
31#define JELLYFIN_DTO_MEDIASOURCEINFO_H
32
33#include <QJsonObject>
34#include <QJsonValue>
35#include <QList>
36#include <QString>
37#include <QStringList>
38#include <optional>
39
49
50namespace Jellyfin {
51// Forward declaration
52class ApiClient;
53}
54namespace Jellyfin {
55namespace DTO {
56
57
59public:
64 bool isRemote,
66 bool ignoreDts,
67 bool ignoreIndex,
68 bool genPtsInput,
72 bool isInfiniteStream,
73 bool requiresOpening,
74 bool requiresClosing,
75 bool requiresLooping,
76 bool supportsProbing,
81 );
82
83 MediaSourceInfo(const MediaSourceInfo &other);
84
88 void replaceData(MediaSourceInfo &other);
89
90 static MediaSourceInfo fromJson(QJsonObject source);
91 void setFromJson(QJsonObject source);
92 QJsonObject toJson() const;
93
94 // Properties
95
96 MediaProtocol protocol() const;
97
98 void setProtocol(MediaProtocol newProtocol);
99
100
101 QString jellyfinId() const;
102
103 void setJellyfinId(QString newJellyfinId);
104 bool jellyfinIdNull() const;
105 void setJellyfinIdNull();
106
107
108 QString path() const;
109
110 void setPath(QString newPath);
111 bool pathNull() const;
112 void setPathNull();
113
114
115 QString encoderPath() const;
116
117 void setEncoderPath(QString newEncoderPath);
118 bool encoderPathNull() const;
119 void setEncoderPathNull();
120
121
123
124 void setEncoderProtocol(MediaProtocol newEncoderProtocol);
125
126
127 MediaSourceType type() const;
128
129 void setType(MediaSourceType newType);
130
131
132 QString container() const;
133
134 void setContainer(QString newContainer);
135 bool containerNull() const;
136 void setContainerNull();
137
138
139 std::optional<qint64> size() const;
140
141 void setSize(std::optional<qint64> newSize);
142 bool sizeNull() const;
143 void setSizeNull();
144
145
146 QString name() const;
147
148 void setName(QString newName);
149 bool nameNull() const;
150 void setNameNull();
151
155 bool isRemote() const;
159 void setIsRemote(bool newIsRemote);
160
161
162 QString eTag() const;
163
164 void setETag(QString newETag);
165 bool eTagNull() const;
166 void setETagNull();
167
168
169 std::optional<qint64> runTimeTicks() const;
170
171 void setRunTimeTicks(std::optional<qint64> newRunTimeTicks);
172 bool runTimeTicksNull() const;
173 void setRunTimeTicksNull();
174
175
176 bool readAtNativeFramerate() const;
177
178 void setReadAtNativeFramerate(bool newReadAtNativeFramerate);
179
180
181 bool ignoreDts() const;
182
183 void setIgnoreDts(bool newIgnoreDts);
184
185
186 bool ignoreIndex() const;
187
188 void setIgnoreIndex(bool newIgnoreIndex);
189
190
191 bool genPtsInput() const;
192
193 void setGenPtsInput(bool newGenPtsInput);
194
195
196 bool supportsTranscoding() const;
197
198 void setSupportsTranscoding(bool newSupportsTranscoding);
199
200
201 bool supportsDirectStream() const;
202
203 void setSupportsDirectStream(bool newSupportsDirectStream);
204
205
206 bool supportsDirectPlay() const;
207
208 void setSupportsDirectPlay(bool newSupportsDirectPlay);
209
210
211 bool isInfiniteStream() const;
212
213 void setIsInfiniteStream(bool newIsInfiniteStream);
214
215
216 bool requiresOpening() const;
217
218 void setRequiresOpening(bool newRequiresOpening);
219
220
221 QString openToken() const;
222
223 void setOpenToken(QString newOpenToken);
224 bool openTokenNull() const;
225 void setOpenTokenNull();
226
227
228 bool requiresClosing() const;
229
230 void setRequiresClosing(bool newRequiresClosing);
231
232
233 QString liveStreamId() const;
234
235 void setLiveStreamId(QString newLiveStreamId);
236 bool liveStreamIdNull() const;
237 void setLiveStreamIdNull();
238
239
240 std::optional<qint32> bufferMs() const;
241
242 void setBufferMs(std::optional<qint32> newBufferMs);
243 bool bufferMsNull() const;
244 void setBufferMsNull();
245
246
247 bool requiresLooping() const;
248
249 void setRequiresLooping(bool newRequiresLooping);
250
251
252 bool supportsProbing() const;
253
254 void setSupportsProbing(bool newSupportsProbing);
255
256
257 VideoType videoType() const;
258
259 void setVideoType(VideoType newVideoType);
260
261
262 IsoType isoType() const;
263
264 void setIsoType(IsoType newIsoType);
265
266
268
269 void setVideo3DFormat(Video3DFormat newVideo3DFormat);
270
271
273
274 void setMediaStreams(QList<MediaStream> newMediaStreams);
275 bool mediaStreamsNull() const;
276 void setMediaStreamsNull();
277
278
280
281 void setMediaAttachments(QList<MediaAttachment> newMediaAttachments);
282 bool mediaAttachmentsNull() const;
284
285
286 QStringList formats() const;
287
288 void setFormats(QStringList newFormats);
289 bool formatsNull() const;
290 void setFormatsNull();
291
292
293 std::optional<qint32> bitrate() const;
294
295 void setBitrate(std::optional<qint32> newBitrate);
296 bool bitrateNull() const;
297 void setBitrateNull();
298
299
301
302 void setTimestamp(TransportStreamTimestamp newTimestamp);
303
304
305 QJsonObject requiredHttpHeaders() const;
306
307 void setRequiredHttpHeaders(QJsonObject newRequiredHttpHeaders);
308 bool requiredHttpHeadersNull() const;
310
311
312 QString transcodingUrl() const;
313
314 void setTranscodingUrl(QString newTranscodingUrl);
315 bool transcodingUrlNull() const;
317
318
319 QString transcodingSubProtocol() const;
320
321 void setTranscodingSubProtocol(QString newTranscodingSubProtocol);
322 bool transcodingSubProtocolNull() const;
324
325
326 QString transcodingContainer() const;
327
328 void setTranscodingContainer(QString newTranscodingContainer);
329 bool transcodingContainerNull() const;
331
332
333 std::optional<qint32> analyzeDurationMs() const;
334
335 void setAnalyzeDurationMs(std::optional<qint32> newAnalyzeDurationMs);
336 bool analyzeDurationMsNull() const;
338
339
340 std::optional<qint32> defaultAudioStreamIndex() const;
341
342 void setDefaultAudioStreamIndex(std::optional<qint32> newDefaultAudioStreamIndex);
343 bool defaultAudioStreamIndexNull() const;
345
346
347 std::optional<qint32> defaultSubtitleStreamIndex() const;
348
349 void setDefaultSubtitleStreamIndex(std::optional<qint32> newDefaultSubtitleStreamIndex);
352
353
354protected:
357 QString m_path;
361 QString m_container;
362 std::optional<qint64> m_size = std::nullopt;
363 QString m_name;
365 QString m_eTag;
366 std::optional<qint64> m_runTimeTicks = std::nullopt;
376 QString m_openToken;
379 std::optional<qint32> m_bufferMs = std::nullopt;
387 QStringList m_formats;
388 std::optional<qint32> m_bitrate = std::nullopt;
394 std::optional<qint32> m_analyzeDurationMs = std::nullopt;
395 std::optional<qint32> m_defaultAudioStreamIndex = std::nullopt;
396 std::optional<qint32> m_defaultSubtitleStreamIndex = std::nullopt;
397
398private:
399 // Private constructor which generates an invalid object, for use withing MediaSourceInfo::fromJson();
401};
402
403
404} // NS DTO
405
406namespace Support {
407
409
410template <>
412
413template<>
415
416} // NS DTO
417} // NS Jellyfin
418
419#endif // JELLYFIN_DTO_MEDIASOURCEINFO_H
Value
Definition isotype.h:49
Value
Definition mediaprotocol.h:49
Definition mediasourceinfo.h:58
void setEncoderPathNull()
Definition mediasourceinfo.cpp:402
bool mediaAttachmentsNull() const
Definition mediasourceinfo.cpp:636
bool openTokenNull() const
Definition mediasourceinfo.cpp:548
void setRequiresLooping(bool newRequiresLooping)
Definition mediasourceinfo.cpp:590
QString name() const
Definition mediasourceinfo.cpp:444
void setJellyfinIdNull()
Definition mediasourceinfo.cpp:376
QList< MediaAttachment > mediaAttachments() const
Definition mediasourceinfo.cpp:631
QString m_transcodingSubProtocol
Definition mediasourceinfo.h:392
bool formatsNull() const
Definition mediasourceinfo.cpp:649
QString m_transcodingContainer
Definition mediasourceinfo.h:393
bool requiredHttpHeadersNull() const
Definition mediasourceinfo.cpp:681
void setContainerNull()
Definition mediasourceinfo.cpp:427
bool requiresOpening() const
Definition mediasourceinfo.cpp:537
void setOpenTokenNull()
Definition mediasourceinfo.cpp:552
bool defaultAudioStreamIndexNull() const
Definition mediasourceinfo.cpp:746
Video3DFormat m_video3DFormat
Definition mediasourceinfo.h:384
QJsonObject requiredHttpHeaders() const
Definition mediasourceinfo.cpp:676
void setSupportsDirectPlay(bool newSupportsDirectPlay)
Definition mediasourceinfo.cpp:527
void setLiveStreamIdNull()
Definition mediasourceinfo.cpp:571
Video3DFormat video3DFormat() const
Definition mediasourceinfo.cpp:612
bool bitrateNull() const
Definition mediasourceinfo.cpp:662
void setVideo3DFormat(Video3DFormat newVideo3DFormat)
Definition mediasourceinfo.cpp:614
MediaProtocol m_encoderProtocol
Definition mediasourceinfo.h:359
QString m_openToken
Definition mediasourceinfo.h:376
void setTranscodingSubProtocol(QString newTranscodingSubProtocol)
Definition mediasourceinfo.cpp:704
std::optional< qint32 > bufferMs() const
Definition mediasourceinfo.cpp:575
bool requiresClosing() const
Definition mediasourceinfo.cpp:556
MediaSourceType m_type
Definition mediasourceinfo.h:360
bool analyzeDurationMsNull() const
Definition mediasourceinfo.cpp:733
bool m_requiresOpening
Definition mediasourceinfo.h:375
std::optional< qint32 > analyzeDurationMs() const
Definition mediasourceinfo.cpp:728
bool m_supportsTranscoding
Definition mediasourceinfo.h:371
bool containerNull() const
Definition mediasourceinfo.cpp:423
void setETagNull()
Definition mediasourceinfo.cpp:472
static MediaSourceInfo fromJson(QJsonObject source)
Definition mediasourceinfo.cpp:172
VideoType videoType() const
Definition mediasourceinfo.cpp:600
void replaceData(MediaSourceInfo &other)
Definition mediasourceinfo.cpp:127
std::optional< qint32 > m_defaultSubtitleStreamIndex
Definition mediasourceinfo.h:396
QList< MediaStream > mediaStreams() const
Definition mediasourceinfo.cpp:618
bool readAtNativeFramerate() const
Definition mediasourceinfo.cpp:489
QString transcodingUrl() const
Definition mediasourceinfo.cpp:689
QList< MediaStream > m_mediaStreams
Definition mediasourceinfo.h:385
void setIsInfiniteStream(bool newIsInfiniteStream)
Definition mediasourceinfo.cpp:533
void setAnalyzeDurationMsNull()
Definition mediasourceinfo.cpp:737
void setType(MediaSourceType newType)
Definition mediasourceinfo.cpp:414
void setMediaAttachmentsNull()
Definition mediasourceinfo.cpp:640
bool requiresLooping() const
Definition mediasourceinfo.cpp:588
bool encoderPathNull() const
Definition mediasourceinfo.cpp:398
QString container() const
Definition mediasourceinfo.cpp:418
void setPath(QString newPath)
Definition mediasourceinfo.cpp:382
TransportStreamTimestamp timestamp() const
Definition mediasourceinfo.cpp:670
bool transcodingUrlNull() const
Definition mediasourceinfo.cpp:694
IsoType m_isoType
Definition mediasourceinfo.h:383
void setRequiresOpening(bool newRequiresOpening)
Definition mediasourceinfo.cpp:539
void setName(QString newName)
Definition mediasourceinfo.cpp:446
bool m_readAtNativeFramerate
Definition mediasourceinfo.h:367
void setBufferMs(std::optional< qint32 > newBufferMs)
Definition mediasourceinfo.cpp:577
QString m_container
Definition mediasourceinfo.h:361
void setTranscodingContainer(QString newTranscodingContainer)
Definition mediasourceinfo.cpp:717
void setIsoType(IsoType newIsoType)
Definition mediasourceinfo.cpp:608
void setDefaultSubtitleStreamIndex(std::optional< qint32 > newDefaultSubtitleStreamIndex)
Definition mediasourceinfo.cpp:756
void setTimestamp(TransportStreamTimestamp newTimestamp)
Definition mediasourceinfo.cpp:672
QJsonObject toJson() const
Definition mediasourceinfo.cpp:225
void setMediaAttachments(QList< MediaAttachment > newMediaAttachments)
Definition mediasourceinfo.cpp:633
void setBufferMsNull()
Definition mediasourceinfo.cpp:584
MediaProtocol encoderProtocol() const
Definition mediasourceinfo.cpp:406
void setContainer(QString newContainer)
Definition mediasourceinfo.cpp:420
QString path() const
Definition mediasourceinfo.cpp:380
bool supportsDirectPlay() const
Definition mediasourceinfo.cpp:525
void setRunTimeTicksNull()
Definition mediasourceinfo.cpp:485
std::optional< qint32 > bitrate() const
Definition mediasourceinfo.cpp:657
std::optional< qint32 > m_defaultAudioStreamIndex
Definition mediasourceinfo.h:395
bool runTimeTicksNull() const
Definition mediasourceinfo.cpp:481
bool isRemote() const
Differentiate internet url vs local network.
Definition mediasourceinfo.cpp:457
void setLiveStreamId(QString newLiveStreamId)
Definition mediasourceinfo.cpp:564
bool supportsDirectStream() const
Definition mediasourceinfo.cpp:519
std::optional< qint64 > m_runTimeTicks
Definition mediasourceinfo.h:366
bool m_isInfiniteStream
Definition mediasourceinfo.h:374
void setRequiredHttpHeadersNull()
Definition mediasourceinfo.cpp:685
bool m_supportsProbing
Definition mediasourceinfo.h:381
void setReadAtNativeFramerate(bool newReadAtNativeFramerate)
Definition mediasourceinfo.cpp:491
bool sizeNull() const
Definition mediasourceinfo.cpp:436
std::optional< qint64 > m_size
Definition mediasourceinfo.h:362
void setBitrateNull()
Definition mediasourceinfo.cpp:666
std::optional< qint64 > runTimeTicks() const
Definition mediasourceinfo.cpp:476
MediaProtocol m_protocol
Definition mediasourceinfo.h:355
bool m_supportsDirectStream
Definition mediasourceinfo.h:372
bool defaultSubtitleStreamIndexNull() const
Definition mediasourceinfo.cpp:759
QJsonObject m_requiredHttpHeaders
Definition mediasourceinfo.h:390
std::optional< qint32 > defaultSubtitleStreamIndex() const
Definition mediasourceinfo.cpp:754
bool m_ignoreIndex
Definition mediasourceinfo.h:369
void setMediaStreams(QList< MediaStream > newMediaStreams)
Definition mediasourceinfo.cpp:620
QString m_encoderPath
Definition mediasourceinfo.h:358
bool pathNull() const
Definition mediasourceinfo.cpp:385
QString eTag() const
Definition mediasourceinfo.cpp:463
bool isInfiniteStream() const
Definition mediasourceinfo.cpp:531
QString encoderPath() const
Definition mediasourceinfo.cpp:393
QString m_name
Definition mediasourceinfo.h:363
void setSupportsTranscoding(bool newSupportsTranscoding)
Definition mediasourceinfo.cpp:515
bool m_requiresClosing
Definition mediasourceinfo.h:377
void setTranscodingSubProtocolNull()
Definition mediasourceinfo.cpp:711
void setIgnoreIndex(bool newIgnoreIndex)
Definition mediasourceinfo.cpp:503
void setBitrate(std::optional< qint32 > newBitrate)
Definition mediasourceinfo.cpp:659
QString m_eTag
Definition mediasourceinfo.h:365
bool nameNull() const
Definition mediasourceinfo.cpp:449
void setSize(std::optional< qint64 > newSize)
Definition mediasourceinfo.cpp:433
void setIgnoreDts(bool newIgnoreDts)
Definition mediasourceinfo.cpp:497
void setSupportsProbing(bool newSupportsProbing)
Definition mediasourceinfo.cpp:596
QString m_path
Definition mediasourceinfo.h:357
void setTranscodingContainerNull()
Definition mediasourceinfo.cpp:724
bool jellyfinIdNull() const
Definition mediasourceinfo.cpp:372
QStringList m_formats
Definition mediasourceinfo.h:387
void setVideoType(VideoType newVideoType)
Definition mediasourceinfo.cpp:602
std::optional< qint64 > size() const
Definition mediasourceinfo.cpp:431
MediaProtocol protocol() const
Definition mediasourceinfo.cpp:361
std::optional< qint32 > defaultAudioStreamIndex() const
Definition mediasourceinfo.cpp:741
bool supportsTranscoding() const
Definition mediasourceinfo.cpp:513
QString transcodingSubProtocol() const
Definition mediasourceinfo.cpp:702
void setEncoderPath(QString newEncoderPath)
Definition mediasourceinfo.cpp:395
void setFormats(QStringList newFormats)
Definition mediasourceinfo.cpp:646
bool m_supportsDirectPlay
Definition mediasourceinfo.h:373
void setJellyfinId(QString newJellyfinId)
Definition mediasourceinfo.cpp:369
bool supportsProbing() const
Definition mediasourceinfo.cpp:594
QList< MediaAttachment > m_mediaAttachments
Definition mediasourceinfo.h:386
bool mediaStreamsNull() const
Definition mediasourceinfo.cpp:623
bool m_isRemote
Definition mediasourceinfo.h:364
void setETag(QString newETag)
Definition mediasourceinfo.cpp:465
QString m_jellyfinId
Definition mediasourceinfo.h:356
void setRunTimeTicks(std::optional< qint64 > newRunTimeTicks)
Definition mediasourceinfo.cpp:478
bool genPtsInput() const
Definition mediasourceinfo.cpp:507
std::optional< qint32 > m_analyzeDurationMs
Definition mediasourceinfo.h:394
QString m_transcodingUrl
Definition mediasourceinfo.h:391
void setNameNull()
Definition mediasourceinfo.cpp:453
void setEncoderProtocol(MediaProtocol newEncoderProtocol)
Definition mediasourceinfo.cpp:408
void setDefaultAudioStreamIndex(std::optional< qint32 > newDefaultAudioStreamIndex)
Definition mediasourceinfo.cpp:743
void setGenPtsInput(bool newGenPtsInput)
Definition mediasourceinfo.cpp:509
void setDefaultSubtitleStreamIndexNull()
Definition mediasourceinfo.cpp:763
void setRequiresClosing(bool newRequiresClosing)
Definition mediasourceinfo.cpp:558
void setFromJson(QJsonObject source)
Definition mediasourceinfo.cpp:179
void setSizeNull()
Definition mediasourceinfo.cpp:440
void setOpenToken(QString newOpenToken)
Definition mediasourceinfo.cpp:545
bool m_ignoreDts
Definition mediasourceinfo.h:368
bool eTagNull() const
Definition mediasourceinfo.cpp:468
bool m_genPtsInput
Definition mediasourceinfo.h:370
bool transcodingContainerNull() const
Definition mediasourceinfo.cpp:720
void setTranscodingUrlNull()
Definition mediasourceinfo.cpp:698
QString openToken() const
Definition mediasourceinfo.cpp:543
VideoType m_videoType
Definition mediasourceinfo.h:382
void setPathNull()
Definition mediasourceinfo.cpp:389
bool ignoreDts() const
Definition mediasourceinfo.cpp:495
void setRequiredHttpHeaders(QJsonObject newRequiredHttpHeaders)
Definition mediasourceinfo.cpp:678
bool ignoreIndex() const
Definition mediasourceinfo.cpp:501
bool transcodingSubProtocolNull() const
Definition mediasourceinfo.cpp:707
void setTranscodingUrl(QString newTranscodingUrl)
Definition mediasourceinfo.cpp:691
void setMediaStreamsNull()
Definition mediasourceinfo.cpp:627
void setAnalyzeDurationMs(std::optional< qint32 > newAnalyzeDurationMs)
Definition mediasourceinfo.cpp:730
TransportStreamTimestamp m_timestamp
Definition mediasourceinfo.h:389
IsoType isoType() const
Definition mediasourceinfo.cpp:606
QStringList formats() const
Definition mediasourceinfo.cpp:644
std::optional< qint32 > m_bufferMs
Definition mediasourceinfo.h:379
std::optional< qint32 > m_bitrate
Definition mediasourceinfo.h:388
bool liveStreamIdNull() const
Definition mediasourceinfo.cpp:567
QString transcodingContainer() const
Definition mediasourceinfo.cpp:715
bool m_requiresLooping
Definition mediasourceinfo.h:380
QString m_liveStreamId
Definition mediasourceinfo.h:378
void setSupportsDirectStream(bool newSupportsDirectStream)
Definition mediasourceinfo.cpp:521
void setFormatsNull()
Definition mediasourceinfo.cpp:653
QString liveStreamId() const
Definition mediasourceinfo.cpp:562
bool bufferMsNull() const
Definition mediasourceinfo.cpp:580
void setDefaultAudioStreamIndexNull()
Definition mediasourceinfo.cpp:750
QString jellyfinId() const
Definition mediasourceinfo.cpp:367
void setIsRemote(bool newIsRemote)
Differentiate internet url vs local network.
Definition mediasourceinfo.cpp:459
MediaSourceType type() const
Definition mediasourceinfo.cpp:412
void setProtocol(MediaProtocol newProtocol)
Definition mediasourceinfo.cpp:363
Value
Definition mediasourcetype.h:49
Value
Definition transportstreamtimestamp.h:49
Value
Definition video3dformat.h:49
Value
Definition videotype.h:49
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