MythTV master
premieretables.h
Go to the documentation of this file.
1// -*- Mode: c++ -*-
2#ifndef PREMIERE_TABLES_H
3#define PREMIERE_TABLES_H
4
5#include <QString>
6#include <cstdint> // uint32_t
7#include "mpegtables.h"
8#include "dvbdescriptors.h"
9
11{
12 public:
13 explicit PremiereContentInformationTable(const PSIPTable& table) : PSIPTable(table)
14 {
16 }
17
18 // content_id 32 0.0
19 uint ContentID(void) const
20 { return ( psipdata()[0]<<24) | (psipdata()[1]<<16) |
21 (psipdata()[2]<< 8) | psipdata()[3]; }
22
23 // event_duration 24 4.0
25 { return ((byteBCD2int(psipdata()[4]) * 3600) +
26 (byteBCD2int(psipdata()[5]) * 60) +
27 (byteBCD2int(psipdata()[6]))); }
28 // descriptor length 8 8.0
30 { return ((psipdata()[7] & 0x0F) << 8) | psipdata()[8]; }
31
32 static uint EventCount(void)
33 { return 1; }
34
35 // descriptor length x 9.0
36 const unsigned char* Descriptors() const
37 { return &psipdata()[9]; }
38
39 static bool IsEIT(uint table_id);
40
41 private:
42 mutable std::vector<const unsigned char*> m_ptrs; // used to parse
43};
44
46{
47 public:
49 {
50 }
51};
52#endif // PREMIERE_TABLES_H
#define assert(x)
A PSIP table is a variant of a PES packet containing an MPEG, ATSC or DVB table.
Definition: mpegtables.h:410
const unsigned char * psipdata(void) const
Definition: mpegtables.h:541
uint TableID(void) const
Definition: mpegtables.h:496
const unsigned char * Descriptors() const
PremiereContentInformationTable(const PSIPTable &table)
static bool IsEIT(uint table_id)
std::vector< const unsigned char * > m_ptrs
PremiereContentPresentationTable(const PSIPTable &table)
static constexpr uint8_t byteBCD2int(uint8_t i)
unsigned int uint
Definition: freesurround.h:24