MythTV  master
mythdvdinfo.h
Go to the documentation of this file.
1 #ifndef MYTHDVDINFO_H
2 #define MYTHDVDINFO_H
3 
4 // C++
5 #include <array>
6 
7 // Qt
8 #include <QCoreApplication>
9 
10 // MythTV
11 #include "libmythtv/mythtvexp.h"
12 
13 // libdvd
14 #include "dvdnav/dvdnav.h"
15 
16 static constexpr size_t DVD_BLOCK_SIZE { 2048 };
17 using DvdBuffer = std::array<uint8_t,DVD_BLOCK_SIZE>;
18 
20 {
21  friend class MythDVDBuffer;
22  Q_DECLARE_TR_FUNCTIONS(DVDInfo)
23 
24  public:
25  explicit MythDVDInfo(const QString &Filename);
26  ~MythDVDInfo(void);
27 
28  bool IsValid (void) const;
29  bool GetNameAndSerialNum (QString &Name, QString &SerialNumber);
30  QString GetLastError (void) const;
31 
32  protected:
33  static void GetNameAndSerialNum(dvdnav_t* Nav, QString &Name,
34  QString &Serialnum, const QString &Filename,
35  const QString &LogPrefix);
36 
37  dvdnav_t *m_nav { nullptr };
38  QString m_name;
39  QString m_serialnumber;
40  QString m_lastError;
41 };
42 
43 #endif // MYTHDVDINFO_H
DvdBuffer
std::array< uint8_t, DVD_BLOCK_SIZE > DvdBuffer
Definition: mythdvdinfo.h:17
mythtvexp.h
MythDVDInfo::m_name
QString m_name
Definition: mythdvdinfo.h:38
MythDVDInfo::m_lastError
QString m_lastError
Definition: mythdvdinfo.h:40
DVD_BLOCK_SIZE
static constexpr size_t DVD_BLOCK_SIZE
Definition: mythdvdinfo.h:16
MythDVDInfo::m_serialnumber
QString m_serialnumber
Definition: mythdvdinfo.h:39
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
Name
Definition: channelsettings.cpp:71
MythDVDBuffer::GetNameAndSerialNum
bool GetNameAndSerialNum(QString &Name, QString &SerialNumber) override
Get the dvd title and serial num.
Definition: mythdvdbuffer.cpp:1908
MythMediaBuffer::GetLastError
QString GetLastError(void) const
Definition: mythmediabuffer.cpp:1761
MythDVDBuffer
Definition: mythdvdbuffer.h:37
MythDVDInfo
Definition: mythdvdinfo.h:19