OSDN Git Service

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