blob: bb4239396a7ae1b268c1068a0c4d3451a54f9614 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
/*
* $Id$
*
* (C) 2002-2003 Andreas Oberritter <obi@saftware.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef __dvb_table_capmt_h__
#define __dvb_table_capmt_h__
#include <lib/dvb_si/ca_descriptor.h>
#include "pmt.h"
class CaLengthField
{
protected:
unsigned sizeIndicator : 1;
unsigned lengthValue : 7;
unsigned lengthFieldSize : 7;
std::vector<uint8_t> lengthValueByte;
public:
CaLengthField(const uint64_t length);
};
class CaElementaryStreamInfo
{
protected:
unsigned streamType : 8;
unsigned reserved1 : 3;
unsigned elementaryPid : 13;
unsigned reserved2 : 4;
unsigned esInfoLength : 12;
unsigned caPmtCmdId : 8;
CaDescriptorVector descriptors;
public:
CaElementaryStreamInfo(const ElementaryStreamInfo * const info, const uint8_t cmdId);
~CaElementaryStreamInfo(void);
uint16_t getLength(void) const;
};
typedef std::vector<CaElementaryStreamInfo *> CaElementaryStreamInfoVector;
typedef CaElementaryStreamInfoVector::iterator CaElementaryStreamInfoIterator;
typedef CaElementaryStreamInfoVector::const_iterator CaElementaryStreamInfoConstIterator;
class CaProgramMapTable
{
protected:
unsigned caPmtTag : 24;
CaLengthField *lengthField;
unsigned caPmtListManagement : 8;
unsigned programNumber : 16;
unsigned reserved1 : 2;
unsigned versionNumber : 5;
unsigned currentNextIndicator : 1;
unsigned reserved2 : 4;
unsigned programInfoLength : 12;
unsigned caPmtCmdId : 8;
CaDescriptorVector descriptors;
CaElementaryStreamInfoVector esInfo;
public:
CaProgramMapTable(const ProgramMapTable * const pmt, const uint8_t listManagement, const uint8_t cmdId);
~CaProgramMapTable(void);
};
typedef std::vector<CaProgramMapTable *> CaProgramMapTableVector;
typedef CaProgramMapTableVector::iterator CaProgramMapTableIterator;
typedef CaProgramMapTableVector::const_iterator CaProgramMapTableConstIterator;
#endif /* __dvb_table_capmt_h__ */
|