MythTV  master
premieredescriptors.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 #ifndef _PRIVATE_DESCRIPTORS_H_
3 #define _PRIVATE_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  PremiereContentTransmissionDescriptor(const unsigned char *data,
22  int len = 300)
23  : MPEGDescriptor(data, len,
24  PrivateDescriptorID::premiere_content_transmission),
25  _transmission_count(0)
26  {
28  _data = nullptr;
29  }
30 
31  // descriptor_tag 8 0.0
32 
33  // descriptor_length 8 1.0
34 
35  // transport id 16 2.0
36  uint TSID() const
37  { return (_data[2] << 8) | _data[3]; }
38  // original network id 16 4.0
40  { return (_data[4] << 8) | _data[5]; }
41  // service id 16 6.0
42  uint ServiceID() const
43  { return (_data[6] << 8) | _data[7]; }
44 
45  // start date 16 8.0
46  // transmission count 8 10.0
47  // for(i=0;i<N;i++)
48  // start_time 24 11.0+x
49 
50  uint TransmissionCount(void) const { return _transmission_count; }
51 
52  QDateTime StartTimeUTC(uint i) const;
53 
54  private:
55  virtual bool Parse(void);
56 
58  mutable vector<const uint8_t*> _date_ptrs;
59  mutable vector<const uint8_t*> _time_ptrs;
60 };
61 
62 #endif // _PRIVATE_DESCRIPTORS_H_
unsigned int uint
Definition: compat.h:140
PremiereContentTransmissionDescriptor(const unsigned char *data, int len=300)