MythTV  master
premieredescriptors.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 #ifndef PREMIERE_DESCRIPTORS_H
3 #define PREMIERE_DESCRIPTORS_H
4 
5 // C++ headers
6 #include <cinttypes>
7 #include <cstdint>
8 #include <vector>
9 using namespace std;
10 
11 // Qt headers
12 #include <QString>
13 #include <QDateTime>
14 
15 // MythTV headers
16 #include "mpegdescriptors.h"
17 
19 {
20  public:
21  explicit PremiereContentTransmissionDescriptor(const unsigned char *data,
22  int len = 300)
23  : MPEGDescriptor(data, len,
24  PrivateDescriptorID::premiere_content_transmission)
25  {
27  m_data = nullptr;
28  }
29 
30  // descriptor_tag 8 0.0
31 
32  // descriptor_length 8 1.0
33 
34  // transport id 16 2.0
35  uint TSID() const
36  { return (m_data[2] << 8) | m_data[3]; }
37  // original network id 16 4.0
39  { return (m_data[4] << 8) | m_data[5]; }
40  // service id 16 6.0
41  uint ServiceID() const
42  { return (m_data[6] << 8) | m_data[7]; }
43 
44  // start date 16 8.0
45  // transmission count 8 10.0
46  // for(i=0;i<N;i++)
47  // start_time 24 11.0+x
48 
49  uint TransmissionCount(void) const { return m_transmissionCount; }
50 
51  QDateTime StartTimeUTC(uint i) const;
52 
53  private:
54  virtual bool Parse(void);
55 
56  uint m_transmissionCount { 0 };
57  mutable vector<const uint8_t*> m_datePtrs;
58  mutable vector<const uint8_t*> m_timePtrs;
59 };
60 
61 #endif // PREMIERE_DESCRIPTORS_H
unsigned int uint
Definition: compat.h:140
PremiereContentTransmissionDescriptor(const unsigned char *data, int len=300)