libdvbpsi
1.1.0
Main Page
Related Pages
Data Structures
Files
File List
Globals
src
psi.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* psi.h
3
* Copyright (C) 2001-2011 VideoLAN
4
* $Id: psi.h,v 1.6 2002/04/02 17:55:30 bozo Exp $
5
*
6
* Authors: Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
7
*
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2.1 of the License, or (at your option) any later version.
12
*
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
*
22
*****************************************************************************/
23
32
#ifndef _DVBPSI_PSI_H_
33
#define _DVBPSI_PSI_H_
34
35
#ifdef __cplusplus
36
extern
"C"
{
37
#endif
38
39
/*****************************************************************************
40
* dvbpsi_psi_section_t
41
*****************************************************************************/
68
struct
dvbpsi_psi_section_s
69
{
70
/* non-specific section data */
71
uint8_t
i_table_id
;
72
bool
b_syntax_indicator
;
73
bool
b_private_indicator
;
74
uint16_t
i_length
;
76
/* used if b_syntax_indicator is true */
77
uint16_t
i_extension
;
80
uint8_t
i_version
;
81
bool
b_current_next
;
82
uint8_t
i_number
;
83
uint8_t
i_last_number
;
85
/* non-specific section data */
86
/* the content is table-specific */
87
uint8_t *
p_data
;
88
uint8_t *
p_payload_start
;
89
uint8_t *
p_payload_end
;
91
/* used if b_syntax_indicator is true */
92
uint32_t
i_crc
;
94
/* list handling */
95
struct
dvbpsi_psi_section_s
*
p_next
;
97
};
98
99
/*****************************************************************************
100
* dvbpsi_NewPSISection
101
*****************************************************************************/
108
dvbpsi_psi_section_t
*
dvbpsi_NewPSISection
(
int
i_max_size);
109
110
/*****************************************************************************
111
* dvbpsi_DeletePSISections
112
*****************************************************************************/
119
void
dvbpsi_DeletePSISections
(
dvbpsi_psi_section_t
* p_section);
120
121
/*****************************************************************************
122
* dvbpsi_CheckPSISection
123
*****************************************************************************/
135
bool
dvbpsi_CheckPSISection
(
dvbpsi_t
*p_dvbpsi,
dvbpsi_psi_section_t
*p_section,
136
const
uint8_t table_id,
const
char
*psz_table_name);
137
138
/*****************************************************************************
139
* dvbpsi_ValidPSISection
140
*****************************************************************************/
150
bool
dvbpsi_ValidPSISection
(
dvbpsi_psi_section_t
* p_section);
151
152
/*****************************************************************************
153
* dvbpsi_BuildPSISection
154
*****************************************************************************/
162
void
dvbpsi_BuildPSISection
(
dvbpsi_t
*p_dvbpsi,
dvbpsi_psi_section_t
* p_section);
163
164
/*****************************************************************************
165
* dvbpsi_CalculateCRC32
166
*****************************************************************************/
175
void
dvbpsi_CalculateCRC32
(
dvbpsi_psi_section_t
*p_section);
176
177
/*****************************************************************************
178
* dvbpsi_has_CRC32
179
*****************************************************************************/
188
static
inline
bool
dvbpsi_has_CRC32(
dvbpsi_psi_section_t
*p_section)
189
{
190
if
((p_section->
i_table_id
== (uint8_t) 0x70)
/* TDT (has no CRC 32) */
||
191
(p_section->
i_table_id
== (uint8_t) 0x71)
/* RST (has no CRC 32) */
||
192
(p_section->
i_table_id
== (uint8_t) 0x72)
/* ST (has no CRC 32) */
||
193
(p_section->
i_table_id
== (uint8_t) 0x7E))
/* DIT (has no CRC 32) */
194
return
false
;
195
196
return
(p_section->
b_syntax_indicator
|| (p_section->
i_table_id
== 0x73));
197
}
198
199
#ifdef __cplusplus
200
};
201
#endif
202
203
#else
204
#error "Multiple inclusions of psi.h"
205
#endif
206
Generated on Sat May 25 2013 17:44:03 for libdvbpsi by
1.8.4