/
StreamInfo.h
83 lines (71 loc) · 1.59 KB
/
StreamInfo.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
/*
* Copyright (C) 2016-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 "utils/Geometry.h"
#include <string>
template <typename T> class CRectGen;
typedef CRectGen<float> CRect;
enum StreamFlags
{
FLAG_NONE = 0x0000,
FLAG_DEFAULT = 0x0001,
FLAG_DUB = 0x0002,
FLAG_ORIGINAL = 0x0004,
FLAG_COMMENT = 0x0008,
FLAG_LYRICS = 0x0010,
FLAG_KARAOKE = 0x0020,
FLAG_FORCED = 0x0040,
FLAG_HEARING_IMPAIRED = 0x0080,
FLAG_VISUAL_IMPAIRED = 0x0100,
FLAG_STILL_IMAGES = 0x100000
};
enum class StreamHdrType
{
HDR_TYPE_NONE, /// < will return an empty string
HDR_TYPE_HDR10, /// < returns "hdr10" when converted to a string
HDR_TYPE_DOLBYVISION, /// < returns "dolbyvision"
HDR_TYPE_HLG /// < returns "hlg"
};
struct StreamInfo
{
bool valid = false;
int bitrate = 0;
std::string language;
std::string name;
std::string codecName;
StreamFlags flags = StreamFlags::FLAG_NONE;
protected:
StreamInfo() = default;
virtual ~StreamInfo() = default;
};
struct AudioStreamInfo : StreamInfo
{
int channels = 0;
int samplerate = 0;
int bitspersample = 0;
};
struct SubtitleStreamInfo : StreamInfo
{};
struct VideoStreamInfo : StreamInfo
{
float videoAspectRatio = 0.0f;
int height = 0;
int width = 0;
CRect SrcRect;
CRect DestRect;
CRect VideoRect;
std::string stereoMode;
int angles = 0;
StreamHdrType hdrType = StreamHdrType::HDR_TYPE_NONE;
};
struct ProgramInfo
{
int id = -1;
bool playing = false;
std::string name;
};