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