-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
/
DVDStreamInfo.h
109 lines (89 loc) · 3.23 KB
/
DVDStreamInfo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*
* Copyright (C) 2005-2018 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSES/README.md for more information.
*/
#pragma once
#include "DVDDemuxers/DVDDemux.h"
extern "C" {
#include <libavcodec/avcodec.h>
}
#define CODEC_FORCE_SOFTWARE 0x01
#define CODEC_ALLOW_FALLBACK 0x02
class CDemuxStream;
struct DemuxCryptoSession;
class CDVDStreamInfo
{
public:
CDVDStreamInfo();
CDVDStreamInfo(const CDVDStreamInfo &right, bool withextradata = true);
CDVDStreamInfo(const CDemuxStream &right, bool withextradata = true);
~CDVDStreamInfo();
void Clear(); // clears current information
bool Equal(const CDVDStreamInfo &right, bool withextradata);
bool Equal(const CDemuxStream &right, bool withextradata);
void Assign(const CDVDStreamInfo &right, bool withextradata);
void Assign(const CDemuxStream &right, bool withextradata);
AVCodecID codec;
StreamType type;
int uniqueId;
int demuxerId = -1;
int flags;
std::string filename;
bool dvd;
int codecOptions;
// VIDEO
int fpsscale; // scale of 1001 and a rate of 60000 will result in 59.94 fps
int fpsrate;
int height; // height of the stream reported by the demuxer
int width; // width of the stream reported by the demuxer
double aspect; // display aspect as reported by demuxer
bool vfr; // variable framerate
bool stills; // there may be odd still frames in video
int level; // encoder level of the stream reported by the decoder. used to qualify hw decoders.
int profile; // encoder profile of the stream reported by the decoder. used to qualify hw decoders.
bool ptsinvalid; // pts cannot be trusted (avi's).
bool forced_aspect; // aspect is forced from container
int orientation; // orientation of the video in degrees counter clockwise
int bitsperpixel;
AVFieldOrder fieldOrder;
AVColorSpace colorSpace;
AVColorRange colorRange;
AVColorPrimaries colorPrimaries;
AVColorTransferCharacteristic colorTransferCharacteristic;
std::shared_ptr<AVMasteringDisplayMetadata> masteringMetadata;
std::shared_ptr<AVContentLightMetadata> contentLightMetadata;
std::string stereo_mode; // stereoscopic 3d mode
// AUDIO
int channels;
int samplerate;
int bitrate;
int blockalign;
int bitspersample;
uint64_t channellayout;
// SUBTITLE
// CODEC EXTRADATA
void* extradata; // extra data for codec to use
unsigned int extrasize; // size of extra data
unsigned int codec_tag; // extra identifier hints for decoding
// Crypto initialization Data
std::shared_ptr<DemuxCryptoSession> cryptoSession;
std::shared_ptr<ADDON::IAddonProvider> externalInterfaces;
bool operator==(const CDVDStreamInfo& right) { return Equal(right, true);}
bool operator!=(const CDVDStreamInfo& right) { return !Equal(right, true);}
CDVDStreamInfo& operator=(const CDVDStreamInfo& right)
{
if (this != &right)
Assign(right, true);
return *this;
}
bool operator==(const CDemuxStream& right) { return Equal( CDVDStreamInfo(right, true), true);}
bool operator!=(const CDemuxStream& right) { return !Equal( CDVDStreamInfo(right, true), true);}
CDVDStreamInfo& operator=(const CDemuxStream& right)
{
Assign(right, true);
return *this;
}
};