kodi
StreamInfo.h
1 /*
2  * Copyright (C) 2016-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "utils/Geometry.h"
12 
13 #include <string>
14 
15 template <typename T> class CRectGen;
16 typedef CRectGen<float> CRect;
17 
18 enum StreamFlags
19 {
20  FLAG_NONE = 0x0000,
21  FLAG_DEFAULT = 0x0001,
22  FLAG_DUB = 0x0002,
23  FLAG_ORIGINAL = 0x0004,
24  FLAG_COMMENT = 0x0008,
25  FLAG_LYRICS = 0x0010,
26  FLAG_KARAOKE = 0x0020,
27  FLAG_FORCED = 0x0040,
28  FLAG_HEARING_IMPAIRED = 0x0080,
29  FLAG_VISUAL_IMPAIRED = 0x0100,
30  FLAG_STILL_IMAGES = 0x100000
31 };
32 
33 enum class StreamHdrType
34 {
35  HDR_TYPE_NONE,
36  HDR_TYPE_HDR10,
37  HDR_TYPE_DOLBYVISION,
38  HDR_TYPE_HLG
39 };
40 
41 struct StreamInfo
42 {
43  bool valid = false;
44  int bitrate = 0;
45  std::string language;
46  std::string name;
47  std::string codecName;
48  StreamFlags flags = StreamFlags::FLAG_NONE;
49 
50 protected:
51  StreamInfo() = default;
52  virtual ~StreamInfo() = default;
53 };
54 
56 {
57  int channels = 0;
58  int samplerate = 0;
59  int bitspersample = 0;
60 };
61 
63 {};
64 
66 {
67  float videoAspectRatio = 0.0f;
68  int height = 0;
69  int width = 0;
70  CRect SrcRect;
71  CRect DestRect;
72  CRect VideoRect;
73  std::string stereoMode;
74  int angles = 0;
75  StreamHdrType hdrType = StreamHdrType::HDR_TYPE_NONE;
76 };
77 
79 {
80  int id = -1;
81  bool playing = false;
82  std::string name;
83 };
Definition: StreamInfo.h:15
Definition: StreamInfo.h:65
Definition: StreamInfo.h:55
Definition: StreamInfo.h:62
Definition: StreamInfo.h:41
Definition: StreamInfo.h:78