libdvbpsi 1.3.2
pat.h
Go to the documentation of this file.
1/*****************************************************************************
2 * pat.h
3 * Copyright (C) 2001-2011 VideoLAN
4 * $Id$
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
33#ifndef _DVBPSI_PAT_H_
34#define _DVBPSI_PAT_H_
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40/*****************************************************************************
41 * dvbpsi_pat_program_t
42 *****************************************************************************/
55{
56 uint16_t i_number;
57 uint16_t i_pid;
58
61
63
64
65/*****************************************************************************
66 * dvbpsi_pat_t
67 *****************************************************************************/
88
89
90/*****************************************************************************
91 * dvbpsi_pat_callback
92 *****************************************************************************/
98typedef void (* dvbpsi_pat_callback)(void* p_cb_data, dvbpsi_pat_t* p_new_pat);
99
100/*****************************************************************************
101 * dvbpsi_pat_attach
102 *****************************************************************************/
112 void* p_cb_data);
113
114/*****************************************************************************
115 * dvbpsi_pat_detach
116 *****************************************************************************/
126
127/*****************************************************************************
128 * dvbpsi_pat_init/dvbpsi_pat_new
129 *****************************************************************************/
140void dvbpsi_pat_init(dvbpsi_pat_t* p_pat, uint16_t i_ts_id, uint8_t i_version,
141 bool b_current_next);
142
153
154/*****************************************************************************
155 * dvbpsi_pat_empty/dvbpsi_pat_delete
156 *****************************************************************************/
164
172
173/*****************************************************************************
174 * dvbpsi_pat_program_add
175 *****************************************************************************/
187 uint16_t i_number, uint16_t i_pid);
188
189/*****************************************************************************
190 * dvbpsi_pat_sections_generate
191 *****************************************************************************/
205 dvbpsi_pat_t* p_pat, int i_max_pps);
206
207#ifdef __cplusplus
208};
209#endif
210
211#else
212#error "Multiple inclusions of pat.h"
213#endif
struct dvbpsi_psi_section_s dvbpsi_psi_section_t
dvbpsi_psi_section_t type definition.
Definition dvbpsi.h:209
struct dvbpsi_s dvbpsi_t
DVBPSI handle structure abstration.
Definition dvbpsi.h:66
bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, dvbpsi_pat_callback pf_callback, void *p_cb_data)
Creation and initialization of a PAT decoder. The decoder will be attached to 'p_dvbpsi' argument.
struct dvbpsi_pat_program_s dvbpsi_pat_program_t
dvbpsi_pat_program_t type definition.
dvbpsi_psi_section_t * dvbpsi_pat_sections_generate(dvbpsi_t *p_dvbpsi, dvbpsi_pat_t *p_pat, int i_max_pps)
PAT generator.
struct dvbpsi_pat_s dvbpsi_pat_t
dvbpsi_pat_t type definition.
void(* dvbpsi_pat_callback)(void *p_cb_data, dvbpsi_pat_t *p_new_pat)
Callback type definition.
Definition pat.h:98
void dvbpsi_pat_empty(dvbpsi_pat_t *p_pat)
Clean a dvbpsi_pat_t structure.
dvbpsi_pat_program_t * dvbpsi_pat_program_add(dvbpsi_pat_t *p_pat, uint16_t i_number, uint16_t i_pid)
Add a program at the end of the PAT.
void dvbpsi_pat_delete(dvbpsi_pat_t *p_pat)
Clean and free a dvbpsi_pat_t structure.
dvbpsi_pat_t * dvbpsi_pat_new(uint16_t i_ts_id, uint8_t i_version, bool b_current_next)
Allocate and initialize a new dvbpsi_pat_t structure.
void dvbpsi_pat_init(dvbpsi_pat_t *p_pat, uint16_t i_ts_id, uint8_t i_version, bool b_current_next)
Initialize a user-allocated dvbpsi_pat_t structure.
void dvbpsi_pat_detach(dvbpsi_t *p_dvbpsi)
Destroy a PAT decoder.
uint8_t i_version
Definition sis.h:5
uint16_t i_ts_id
Definition sis.h:4
bool b_current_next
Definition sis.h:8
PAT program structure.
Definition pat.h:55
uint16_t i_number
Definition pat.h:56
struct dvbpsi_pat_program_s * p_next
Definition pat.h:59
uint16_t i_pid
Definition pat.h:57
PAT structure.
Definition pat.h:80
bool b_current_next
Definition pat.h:83
uint16_t i_ts_id
Definition pat.h:81
uint8_t i_version
Definition pat.h:82
dvbpsi_pat_program_t * p_first_program
Definition pat.h:85