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