[videodb] remove unused seasons table from episode_view
[xbmc.git] / xbmc / cores / VideoPlayer / DVDStreamInfo.h
blob1da58a7e6ae50a84d7782d73a70098af4c911725
1 /*
2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include "DVDDemuxers/DVDDemux.h"
13 extern "C"
15 #include <libavcodec/avcodec.h>
16 #include <libavutil/dovi_meta.h>
19 #define CODEC_FORCE_SOFTWARE 0x01
20 #define CODEC_ALLOW_FALLBACK 0x02
22 class CDemuxStream;
23 struct DemuxCryptoSession;
25 class CDVDStreamInfo
27 public:
28 CDVDStreamInfo();
29 CDVDStreamInfo(const CDVDStreamInfo &right, bool withextradata = true);
30 CDVDStreamInfo(const CDemuxStream &right, bool withextradata = true);
32 ~CDVDStreamInfo();
34 void Clear(); // clears current information
35 bool Equal(const CDVDStreamInfo& right, int compare);
36 bool Equal(const CDemuxStream &right, bool withextradata);
38 void Assign(const CDVDStreamInfo &right, bool withextradata);
39 void Assign(const CDemuxStream &right, bool withextradata);
41 enum
43 COMPARE_EXTRADATA = 1,
44 COMPARE_ID = 2,
45 COMPARE_ALL = 3,
48 AVCodecID codec;
49 StreamType type;
50 int uniqueId;
51 int demuxerId = -1;
52 int source{STREAM_SOURCE_NONE};
53 int flags;
54 std::string filename;
55 bool dvd;
56 int codecOptions;
58 // VIDEO
59 int fpsscale; // scale of 1001 and a rate of 60000 will result in 59.94 fps
60 int fpsrate;
61 bool interlaced;
62 int height; // height of the stream reported by the demuxer
63 int width; // width of the stream reported by the demuxer
64 double aspect; // display aspect as reported by demuxer
65 bool vfr; // variable framerate
66 bool stills; // there may be odd still frames in video
67 int level; // encoder level of the stream reported by the decoder. used to qualify hw decoders.
68 int profile; // encoder profile of the stream reported by the decoder. used to qualify hw decoders.
69 bool ptsinvalid; // pts cannot be trusted (avi's).
70 bool forced_aspect; // aspect is forced from container
71 int orientation; // orientation of the video in degrees counter clockwise
72 int bitsperpixel;
73 int bitdepth;
74 StreamHdrType hdrType;
75 AVColorSpace colorSpace;
76 AVColorRange colorRange;
77 AVColorPrimaries colorPrimaries;
78 AVColorTransferCharacteristic colorTransferCharacteristic;
79 std::shared_ptr<AVMasteringDisplayMetadata> masteringMetadata;
80 std::shared_ptr<AVContentLightMetadata> contentLightMetadata;
81 std::string stereo_mode; // stereoscopic 3d mode
82 AVDOVIDecoderConfigurationRecord dovi{};
84 // AUDIO
85 int channels;
86 int samplerate;
87 int bitrate;
88 int blockalign;
89 int bitspersample;
90 uint64_t channellayout;
92 // SUBTITLE
94 // CODEC EXTRADATA
95 FFmpegExtraData extradata; // extra data for codec to use
96 unsigned int codec_tag; // extra identifier hints for decoding
98 // Crypto initialization Data
99 std::shared_ptr<DemuxCryptoSession> cryptoSession;
100 std::shared_ptr<ADDON::IAddonProvider> externalInterfaces;
102 bool operator==(const CDVDStreamInfo& right) { return Equal(right, COMPARE_ALL); }
103 bool operator!=(const CDVDStreamInfo& right) { return !Equal(right, COMPARE_ALL); }
105 CDVDStreamInfo& operator=(const CDVDStreamInfo& right)
107 if (this != &right)
108 Assign(right, true);
110 return *this;
113 bool operator==(const CDemuxStream& right)
115 return Equal(CDVDStreamInfo(right, true), COMPARE_ALL);
117 bool operator!=(const CDemuxStream& right)
119 return !Equal(CDVDStreamInfo(right, true), COMPARE_ALL);
122 CDVDStreamInfo& operator=(const CDemuxStream& right)
124 Assign(right, true);
125 return *this;