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.
11 #include "DVDDemuxers/DVDDemux.h"
15 #include <libavcodec/avcodec.h>
16 #include <libavutil/dovi_meta.h>
19 #define CODEC_FORCE_SOFTWARE 0x01
20 #define CODEC_ALLOW_FALLBACK 0x02
23 struct DemuxCryptoSession
;
29 CDVDStreamInfo(const CDVDStreamInfo
&right
, bool withextradata
= true);
30 CDVDStreamInfo(const CDemuxStream
&right
, bool withextradata
= true);
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
);
43 COMPARE_EXTRADATA
= 1,
52 int source
{STREAM_SOURCE_NONE
};
59 int fpsscale
; // scale of 1001 and a rate of 60000 will result in 59.94 fps
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
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
{};
90 uint64_t channellayout
;
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
)
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
)