MythTV  master
bluraymetadata.h
Go to the documentation of this file.
1 #ifndef BLURAYMETADATA_H_
2 #define BLURAYMETADATA_H_
3 
4 #include <utility>
5 
6 // Qt headers
7 #include <QList>
8 #include <QPair>
9 #include <QString>
10 
11 // MythTV headers
12 #include "mythtypes.h"
13 #include "mythmetaexp.h"
14 #include "libbluray/bluray.h"
15 
16 class QStringList;
17 
18 using BlurayTitles = QList< QPair < uint,QString > >;
19 
20 struct meta_dl;
21 class META_PUBLIC BlurayMetadata : public QObject
22 {
24 
25  public:
26  explicit BlurayMetadata(QString path)
27  : m_path(std::move(path)) {}
28  ~BlurayMetadata() override;
29 
30  void toMap(InfoMap &metadataMap);
31 
32  bool OpenDisc(void);
33  bool IsOpen() { return m_bdnav; };
34  bool ParseDisc(void);
35 
36  QString GetTitle(void) { return m_title; };
37  QString GetAlternateTitle(void) { return m_alttitle; };
38  QString GetDiscLanguage(void) { return m_language; };
39 
40  uint GetCurrentDiscNumber(void) const { return m_discnumber; };
41  uint GetTotalDiscNumber(void) const { return m_disctotal; };
42 
43  uint GetTitleCount(void) { return m_titles.count(); };
44  BlurayTitles GetTitles(void) { return m_titles; };
45 
46  uint GetThumbnailCount(void) { return m_images.count(); };
47  QStringList GetThumbnails(void) {return m_images; };
48 
49  bool GetTopMenuSupported(void) const { return m_topMenuSupported; };
50  bool GetFirstPlaySupported(void) const { return m_firstPlaySupported; };
51 
52  uint32_t GetNumHDMVTitles(void) const { return m_numHDMVTitles; };
53  uint32_t GetNumBDJTitles(void) const { return m_numBDJTitles; };
54  uint32_t GetNumUnsupportedTitles(void) const { return m_numUnsupportedTitles; };
55 
56  bool GetAACSDetected(void) const { return m_aacsDetected; };
57  bool GetLibAACSDetected(void) const { return m_libaacsDetected; };
58  bool GetAACSHandled(void) const { return m_aacsHandled; };
59 
60  bool GetBDPlusDetected(void) const { return m_bdplusDetected; };
61  bool GetLibBDPlusDetected(void) const { return m_libbdplusDetected; };
62  bool GetBDPlusHandled(void) const { return m_bdplusHandled; };
63 
64  private:
65  BLURAY *m_bdnav {nullptr};
66 
67  QString m_title;
68  QString m_alttitle;
69  QString m_language;
70 
71  uint m_discnumber {0};
72  uint m_disctotal {0};
73 
74  QString m_path;
75 
77  QStringList m_images;
78 
79  bool m_topMenuSupported {false};
80  bool m_firstPlaySupported {false};
81  uint32_t m_numHDMVTitles {0};
82  uint32_t m_numBDJTitles {0};
83  uint32_t m_numUnsupportedTitles {0};
84  bool m_aacsDetected {false};
85  bool m_libaacsDetected {false};
86  bool m_aacsHandled {false};
87  bool m_bdplusDetected {false};
88  bool m_libbdplusDetected {false};
89  bool m_bdplusHandled {false};
90 };
91 
92 #endif
BlurayMetadata
Definition: bluraymetadata.h:22
BlurayMetadata::GetTitleCount
uint GetTitleCount(void)
Definition: bluraymetadata.h:43
BlurayMetadata::BlurayMetadata
BlurayMetadata(QString path)
Definition: bluraymetadata.h:26
BlurayMetadata::GetCurrentDiscNumber
uint GetCurrentDiscNumber(void) const
Definition: bluraymetadata.h:40
BlurayMetadata::GetThumbnailCount
uint GetThumbnailCount(void)
Definition: bluraymetadata.h:46
BlurayMetadata::m_alttitle
QString m_alttitle
Definition: bluraymetadata.h:68
BlurayMetadata::GetLibAACSDetected
bool GetLibAACSDetected(void) const
Definition: bluraymetadata.h:57
mythmetaexp.h
BlurayMetadata::GetAACSDetected
bool GetAACSDetected(void) const
Definition: bluraymetadata.h:56
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
BlurayMetadata::m_language
QString m_language
Definition: bluraymetadata.h:69
BlurayMetadata::IsOpen
bool IsOpen()
Definition: bluraymetadata.h:33
BlurayTitles
QList< QPair< uint, QString > > BlurayTitles
Definition: bluraymetadata.h:18
BlurayMetadata::GetTitles
BlurayTitles GetTitles(void)
Definition: bluraymetadata.h:44
BlurayMetadata::GetThumbnails
QStringList GetThumbnails(void)
Definition: bluraymetadata.h:47
BlurayMetadata::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(BlurayMetadata)
BlurayMetadata::GetDiscLanguage
QString GetDiscLanguage(void)
Definition: bluraymetadata.h:38
mythtypes.h
uint
unsigned int uint
Definition: compat.h:140
BlurayMetadata::GetAACSHandled
bool GetAACSHandled(void) const
Definition: bluraymetadata.h:58
BlurayMetadata::m_images
QStringList m_images
Definition: bluraymetadata.h:77
BlurayMetadata::m_path
QString m_path
Definition: bluraymetadata.h:74
BlurayMetadata::GetNumUnsupportedTitles
uint32_t GetNumUnsupportedTitles(void) const
Definition: bluraymetadata.h:54
BlurayMetadata::m_title
QString m_title
Definition: bluraymetadata.h:67
BlurayMetadata::GetAlternateTitle
QString GetAlternateTitle(void)
Definition: bluraymetadata.h:37
BlurayMetadata::GetTopMenuSupported
bool GetTopMenuSupported(void) const
Definition: bluraymetadata.h:49
BlurayMetadata::GetTotalDiscNumber
uint GetTotalDiscNumber(void) const
Definition: bluraymetadata.h:41
BlurayMetadata::GetBDPlusHandled
bool GetBDPlusHandled(void) const
Definition: bluraymetadata.h:62
BlurayMetadata::m_titles
BlurayTitles m_titles
Definition: bluraymetadata.h:76
BlurayMetadata::GetFirstPlaySupported
bool GetFirstPlaySupported(void) const
Definition: bluraymetadata.h:50
BlurayMetadata::GetNumBDJTitles
uint32_t GetNumBDJTitles(void) const
Definition: bluraymetadata.h:53
BlurayMetadata::GetNumHDMVTitles
uint32_t GetNumHDMVTitles(void) const
Definition: bluraymetadata.h:52
BlurayMetadata::GetTitle
QString GetTitle(void)
Definition: bluraymetadata.h:36
META_PUBLIC
#define META_PUBLIC
Definition: mythmetaexp.h:9
BlurayMetadata::GetBDPlusDetected
bool GetBDPlusDetected(void) const
Definition: bluraymetadata.h:60
BlurayMetadata::GetLibBDPlusDetected
bool GetLibBDPlusDetected(void) const
Definition: bluraymetadata.h:61