2021-02-17 18:42:10 +00:00
|
|
|
/*
|
2021-02-21 04:02:05 +00:00
|
|
|
* Sailfin: a Jellyfin client written using Qt
|
|
|
|
* Copyright (C) 2021 Chris Josten and the Sailfin Contributors.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* WARNING: THIS IS AN AUTOMATICALLY GENERATED FILE! PLEASE DO NOT EDIT THIS, AS YOUR EDITS WILL GET
|
|
|
|
* OVERWRITTEN AT SOME POINT!
|
|
|
|
*
|
|
|
|
* If there is a bug in this file, please fix the code generator used to generate this file found in
|
|
|
|
* core/openapigenerator.d.
|
|
|
|
*
|
|
|
|
* This file is generated based on Jellyfin's OpenAPI description, "openapi.json". Please update that
|
|
|
|
* file with a newer file if needed instead of manually updating the files.
|
|
|
|
*/
|
2021-02-17 18:42:10 +00:00
|
|
|
|
|
|
|
#ifndef JELLYFIN_DTO_MEDIASTREAM_H
|
|
|
|
#define JELLYFIN_DTO_MEDIASTREAM_H
|
|
|
|
|
2021-02-21 04:02:05 +00:00
|
|
|
#include <QJsonObject>
|
2021-03-20 02:30:50 +00:00
|
|
|
#include <QJsonValue>
|
2021-02-17 18:42:10 +00:00
|
|
|
#include <QString>
|
2021-03-20 02:30:50 +00:00
|
|
|
#include <optional>
|
2021-02-17 18:42:10 +00:00
|
|
|
|
2021-02-21 04:02:05 +00:00
|
|
|
#include "JellyfinQt/DTO/mediastreamtype.h"
|
|
|
|
#include "JellyfinQt/DTO/subtitledeliverymethod.h"
|
2021-03-20 02:30:50 +00:00
|
|
|
#include "JellyfinQt/support/jsonconv.h"
|
2021-02-17 18:42:10 +00:00
|
|
|
|
|
|
|
namespace Jellyfin {
|
|
|
|
namespace DTO {
|
|
|
|
|
|
|
|
|
2021-03-20 02:30:50 +00:00
|
|
|
class MediaStream {
|
|
|
|
public:
|
|
|
|
explicit MediaStream();
|
|
|
|
static MediaStream fromJson(QJsonObject source);
|
|
|
|
void setFromJson(QJsonObject source);
|
|
|
|
QJsonObject toJson();
|
|
|
|
|
|
|
|
// Properties
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the codec.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString codec() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the codec.
|
|
|
|
*/
|
|
|
|
void setCodec(QString newCodec);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the codec tag.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString codecTag() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the codec tag.
|
|
|
|
*/
|
|
|
|
void setCodecTag(QString newCodecTag);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the language.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString language() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the language.
|
|
|
|
*/
|
|
|
|
void setLanguage(QString newLanguage);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the color range.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString colorRange() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the color range.
|
|
|
|
*/
|
|
|
|
void setColorRange(QString newColorRange);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the color space.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString colorSpace() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the color space.
|
|
|
|
*/
|
|
|
|
void setColorSpace(QString newColorSpace);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the color transfer.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString colorTransfer() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the color transfer.
|
|
|
|
*/
|
|
|
|
void setColorTransfer(QString newColorTransfer);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the color primaries.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString colorPrimaries() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the color primaries.
|
|
|
|
*/
|
|
|
|
void setColorPrimaries(QString newColorPrimaries);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the comment.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString comment() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the comment.
|
|
|
|
*/
|
|
|
|
void setComment(QString newComment);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the time base.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString timeBase() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the time base.
|
|
|
|
*/
|
|
|
|
void setTimeBase(QString newTimeBase);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the codec time base.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString codecTimeBase() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the codec time base.
|
|
|
|
*/
|
|
|
|
void setCodecTimeBase(QString newCodecTimeBase);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the title.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString title() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the title.
|
|
|
|
*/
|
|
|
|
void setTitle(QString newTitle);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the video range.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString videoRange() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the video range.
|
|
|
|
*/
|
|
|
|
void setVideoRange(QString newVideoRange);
|
|
|
|
|
|
|
|
QString localizedUndefined() const;
|
|
|
|
|
|
|
|
void setLocalizedUndefined(QString newLocalizedUndefined);
|
|
|
|
|
|
|
|
QString localizedDefault() const;
|
|
|
|
|
|
|
|
void setLocalizedDefault(QString newLocalizedDefault);
|
|
|
|
|
|
|
|
QString localizedForced() const;
|
|
|
|
|
|
|
|
void setLocalizedForced(QString newLocalizedForced);
|
|
|
|
|
|
|
|
QString displayTitle() const;
|
|
|
|
|
|
|
|
void setDisplayTitle(QString newDisplayTitle);
|
|
|
|
|
|
|
|
QString nalLengthSize() const;
|
|
|
|
|
|
|
|
void setNalLengthSize(QString newNalLengthSize);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether this instance is interlaced.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
bool isInterlaced() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether this instance is interlaced.
|
|
|
|
*/
|
|
|
|
void setIsInterlaced(bool newIsInterlaced);
|
|
|
|
|
|
|
|
bool isAVC() const;
|
|
|
|
|
|
|
|
void setIsAVC(bool newIsAVC);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the channel layout.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString channelLayout() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the channel layout.
|
|
|
|
*/
|
|
|
|
void setChannelLayout(QString newChannelLayout);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the bit rate.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 bitRate() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the bit rate.
|
|
|
|
*/
|
|
|
|
void setBitRate(qint32 newBitRate);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the bit depth.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 bitDepth() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the bit depth.
|
|
|
|
*/
|
|
|
|
void setBitDepth(qint32 newBitDepth);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the reference frames.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 refFrames() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the reference frames.
|
|
|
|
*/
|
|
|
|
void setRefFrames(qint32 newRefFrames);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the length of the packet.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 packetLength() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the length of the packet.
|
|
|
|
*/
|
|
|
|
void setPacketLength(qint32 newPacketLength);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the channels.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 channels() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the channels.
|
|
|
|
*/
|
|
|
|
void setChannels(qint32 newChannels);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the sample rate.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 sampleRate() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the sample rate.
|
|
|
|
*/
|
|
|
|
void setSampleRate(qint32 newSampleRate);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether this instance is default.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
bool isDefault() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether this instance is default.
|
|
|
|
*/
|
|
|
|
void setIsDefault(bool newIsDefault);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether this instance is forced.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
bool isForced() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether this instance is forced.
|
|
|
|
*/
|
|
|
|
void setIsForced(bool newIsForced);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the height.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 height() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the height.
|
|
|
|
*/
|
|
|
|
void setHeight(qint32 newHeight);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the width.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 width() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the width.
|
|
|
|
*/
|
|
|
|
void setWidth(qint32 newWidth);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the average frame rate.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
float averageFrameRate() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the average frame rate.
|
|
|
|
*/
|
|
|
|
void setAverageFrameRate(float newAverageFrameRate);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the real frame rate.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
float realFrameRate() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the real frame rate.
|
|
|
|
*/
|
|
|
|
void setRealFrameRate(float newRealFrameRate);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the profile.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString profile() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the profile.
|
|
|
|
*/
|
|
|
|
void setProfile(QString newProfile);
|
|
|
|
|
|
|
|
MediaStreamType type() const;
|
|
|
|
|
|
|
|
void setType(MediaStreamType newType);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the aspect ratio.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString aspectRatio() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the aspect ratio.
|
|
|
|
*/
|
|
|
|
void setAspectRatio(QString newAspectRatio);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the index.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 index() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the index.
|
|
|
|
*/
|
|
|
|
void setIndex(qint32 newIndex);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the score.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
qint32 score() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the score.
|
|
|
|
*/
|
|
|
|
void setScore(qint32 newScore);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether this instance is external.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
bool isExternal() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether this instance is external.
|
|
|
|
*/
|
|
|
|
void setIsExternal(bool newIsExternal);
|
|
|
|
|
|
|
|
SubtitleDeliveryMethod deliveryMethod() const;
|
|
|
|
|
|
|
|
void setDeliveryMethod(SubtitleDeliveryMethod newDeliveryMethod);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the delivery URL.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString deliveryUrl() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the delivery URL.
|
|
|
|
*/
|
|
|
|
void setDeliveryUrl(QString newDeliveryUrl);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether this instance is external URL.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
bool isExternalUrl() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether this instance is external URL.
|
|
|
|
*/
|
|
|
|
void setIsExternalUrl(bool newIsExternalUrl);
|
|
|
|
|
|
|
|
bool isTextSubtitleStream() const;
|
|
|
|
|
|
|
|
void setIsTextSubtitleStream(bool newIsTextSubtitleStream);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether [supports external stream].
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
bool supportsExternalStream() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets a value indicating whether [supports external stream].
|
|
|
|
*/
|
|
|
|
void setSupportsExternalStream(bool newSupportsExternalStream);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the filename.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString path() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the filename.
|
|
|
|
*/
|
|
|
|
void setPath(QString newPath);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the pixel format.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
QString pixelFormat() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the pixel format.
|
|
|
|
*/
|
|
|
|
void setPixelFormat(QString newPixelFormat);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets or sets the level.
|
|
|
|
*/
|
2021-03-20 02:30:50 +00:00
|
|
|
double level() const;
|
|
|
|
/**
|
|
|
|
* @brief Gets or sets the level.
|
|
|
|
*/
|
|
|
|
void setLevel(double newLevel);
|
2021-02-21 04:02:05 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets a value indicating whether this instance is anamorphic.
|
|
|
|
*/
|
|
|
|
bool isAnamorphic() const;
|
2021-03-20 02:30:50 +00:00
|
|
|
/**
|
|
|
|
* @brief Gets a value indicating whether this instance is anamorphic.
|
|
|
|
*/
|
2021-02-21 04:02:05 +00:00
|
|
|
void setIsAnamorphic(bool newIsAnamorphic);
|
2021-03-20 02:30:50 +00:00
|
|
|
|
2021-02-21 04:02:05 +00:00
|
|
|
protected:
|
|
|
|
QString m_codec;
|
|
|
|
QString m_codecTag;
|
|
|
|
QString m_language;
|
|
|
|
QString m_colorRange;
|
|
|
|
QString m_colorSpace;
|
|
|
|
QString m_colorTransfer;
|
|
|
|
QString m_colorPrimaries;
|
|
|
|
QString m_comment;
|
|
|
|
QString m_timeBase;
|
|
|
|
QString m_codecTimeBase;
|
|
|
|
QString m_title;
|
|
|
|
QString m_videoRange;
|
|
|
|
QString m_localizedUndefined;
|
|
|
|
QString m_localizedDefault;
|
|
|
|
QString m_localizedForced;
|
|
|
|
QString m_displayTitle;
|
|
|
|
QString m_nalLengthSize;
|
|
|
|
bool m_isInterlaced;
|
|
|
|
bool m_isAVC;
|
|
|
|
QString m_channelLayout;
|
|
|
|
qint32 m_bitRate;
|
|
|
|
qint32 m_bitDepth;
|
|
|
|
qint32 m_refFrames;
|
|
|
|
qint32 m_packetLength;
|
|
|
|
qint32 m_channels;
|
|
|
|
qint32 m_sampleRate;
|
|
|
|
bool m_isDefault;
|
|
|
|
bool m_isForced;
|
|
|
|
qint32 m_height;
|
|
|
|
qint32 m_width;
|
|
|
|
float m_averageFrameRate;
|
|
|
|
float m_realFrameRate;
|
|
|
|
QString m_profile;
|
|
|
|
MediaStreamType m_type;
|
|
|
|
QString m_aspectRatio;
|
|
|
|
qint32 m_index;
|
|
|
|
qint32 m_score;
|
|
|
|
bool m_isExternal;
|
|
|
|
SubtitleDeliveryMethod m_deliveryMethod;
|
|
|
|
QString m_deliveryUrl;
|
|
|
|
bool m_isExternalUrl;
|
|
|
|
bool m_isTextSubtitleStream;
|
|
|
|
bool m_supportsExternalStream;
|
|
|
|
QString m_path;
|
|
|
|
QString m_pixelFormat;
|
|
|
|
double m_level;
|
|
|
|
bool m_isAnamorphic;
|
2021-02-17 18:42:10 +00:00
|
|
|
};
|
|
|
|
|
2021-02-21 04:02:05 +00:00
|
|
|
} // NS Jellyfin
|
|
|
|
} // NS DTO
|
2021-02-17 18:42:10 +00:00
|
|
|
|
|
|
|
#endif // JELLYFIN_DTO_MEDIASTREAM_H
|