MythTV  master
mythedid.h
Go to the documentation of this file.
1 #ifndef MYTHEDID_H
2 #define MYTHEDID_H
3 
4 // Qt
5 #include <QSize>
6 #include <QStringList>
7 
8 // MythTV
9 #include "mythuiexp.h"
10 
12 {
13  public:
14  // This structure matches VideoColourSpace::ColourPrimaries
15  // TODO move ColourPrimaries into MythDisplay
16  struct Primaries
17  {
18  float primaries[3][2];
19  float whitepoint[2];
20  };
21 
22  MythEDID(void) = default;
23  explicit MythEDID(QByteArray &Data);
24  MythEDID(const char* Data, int Length);
25 
26  bool Valid (void) const;
27  QStringList SerialNumbers (void) const;
28  QSize DisplaySize (void) const;
29  double DisplayAspect (void) const;
30  uint16_t PhysicalAddress (void) const;
31  float Gamma (void) const;
32  bool IsHDMI (void) const;
33  bool IsSRGB (void) const;
34  bool IsLikeSRGB (void) const;
35  Primaries ColourPrimaries (void) const;
36  int AudioLatency (bool Interlaced) const;
37  int VideoLatency (bool Interlaced) const;
38  void Debug (void) const;
39 
40  private:
41  void Parse (void);
42  bool ParseBaseBlock (const quint8 *Data);
43  bool ParseCTA861 (const quint8 *Data, uint Offset);
44  bool ParseCTABlock (const quint8 *Data, uint Offset);
45  bool ParseVSDB (const quint8 *Data, uint Offset, uint Length);
46 
47  bool m_valid { false };
48  QByteArray m_data { };
49  uint m_size { 0 };
50  quint8 m_minorVersion { 0 };
51  QSize m_displaySize { }; // N.B. Either size or aspect are valid
52  double m_displayAspect { 0.0 };
53  QStringList m_serialNumbers { };
54  float m_gamma { 0.0F }; // Invalid
55  bool m_sRGB { false };
56  bool m_likeSRGB { false }; // Temporary until Colourspace handling in libmythui
57  Primaries m_primaries { {{0.0F, 0.0F}, {0.0F, 0.0F}, {0.0F, 0.0F}}, {0.0F, 0.0F} };
58  bool m_isHDMI { false };
59  uint16_t m_physicalAddress { 0 };
60  bool m_latencies { false };
61  bool m_interLatencies { false };
62  int m_audioLatency[2] { 0 };
63  int m_videoLatency[2] { 0 };
64 };
65 
66 #endif // MYTHEDID_H
unsigned int uint
Definition: compat.h:140
unsigned short uint16_t
Definition: iso6937tables.h:1
#define MUI_PUBLIC
Definition: mythuiexp.h:9
static HostComboBoxSetting * ColourPrimaries()