Debian Codegraph @

src/lib/tsreader/Section.h

raw
1 /*
2 * Copyright (C) 2006-2008 Team MediaPortal
3 * http://www.team-mediaportal.com
4 *
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNU Make; see the file COPYING. If not, write to
17 * the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1335 USA
19 * http://www.gnu.org/copyleft/gpl.html
20 *
21 */
22 #pragma once
23
24 #define MAX_SECTION_LENGTH 4300
25
26 namespace MPTV
27 {
28 class CSection
29 {
30 public:
31 CSection(void);
32 virtual ~CSection(void);
33 void Reset();
34 bool DecodeHeader();
35 int CalcSectionLength(byte* tsPacket, int start);
36 bool SectionComplete();
37 CSection& operator = (const CSection& section);
38 void Copy(const CSection &section);
39
40 int table_id;
41 int table_id_extension;
42 int section_length;
43 int section_number;
44 int version_number;
45 int section_syntax_indicator;
46
47 int BufferPos;
48 byte Data[MAX_SECTION_LENGTH * 5];
49 };
50 }
51