OSDN Git Service

initial files
[iptd/iPTd_R3.git] / src / mpeg2 / ts / PMT.h
1 /**
2  * @file PMT.h
3  *
4  */
5
6 #pragma once
7
8 #include "mpeg2/ts/Table.h"
9
10 namespace MPEG2
11 {
12 namespace TS
13 {
14
15 class PMT : public Table
16 {
17 public:
18     uint8_t         _table_id;                  //  8
19     uint8_t         _section_syntax_indicator;  //  1
20                                                 //  1  '0'
21                                                 //  2  reserved
22     uint16_t        _section_length;            // 12
23     uint16_t        _program_number;            // 16
24                                                 //  2  reserved
25     uint8_t         _version_number;            //  5
26     uint8_t         _current_next_indicator;    //  1
27     uint8_t         _section_number;            //  8
28     uint8_t         _last_section_number;       //  8
29                                                 //  3  reserved
30     uint16_t        _PCR_PID;                   // 13
31                                                 //  4  reserved
32     uint16_t        _program_info_length;       // 12
33     uint8_t *       _descriptor;                //  N
34     uint16_t        _element_count;
35     struct _element
36     {
37         uint8_t     _stream_type;               //  8
38                                                 //  3  reserved
39         uint16_t    _elementary_PID;            // 13
40                                                 //  4  reserved
41         uint16_t    _ES_info_length;            // 12
42         uint8_t *   _descriptor;                //  N
43     } *             _elements;
44                                                 // 32  CRC
45
46 protected:
47     bool decode_section();
48
49 public:
50     PMT();
51     ~PMT();
52     void reset();
53 };
54
55 } // TS
56 } // MPEG2