libdvbpsi  1.2.0
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 
33 #ifndef _DVBPSI_PAT_H_
34 #define _DVBPSI_PAT_H_
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /*****************************************************************************
41  * dvbpsi_pat_program_t
42  *****************************************************************************/
54 typedef struct dvbpsi_pat_program_s
55 {
56  uint16_t i_number;
57  uint16_t i_pid;
63 
64 
65 /*****************************************************************************
66  * dvbpsi_pat_t
67  *****************************************************************************/
79 typedef struct dvbpsi_pat_s
80 {
81  uint16_t i_ts_id;
82  uint8_t i_version;
87 } dvbpsi_pat_t;
88 
89 
90 /*****************************************************************************
91  * dvbpsi_pat_callback
92  *****************************************************************************/
98 typedef void (* dvbpsi_pat_callback)(void* p_cb_data, dvbpsi_pat_t* p_new_pat);
99 
100 /*****************************************************************************
101  * dvbpsi_pat_attach
102  *****************************************************************************/
111 bool dvbpsi_pat_attach(dvbpsi_t *p_dvbpsi, dvbpsi_pat_callback pf_callback,
112  void* p_cb_data);
113 
114 /*****************************************************************************
115  * dvbpsi_pat_detach
116  *****************************************************************************/
125 void dvbpsi_pat_detach(dvbpsi_t *p_dvbpsi);
126 
127 /*****************************************************************************
128  * dvbpsi_pat_init/dvbpsi_pat_new
129  *****************************************************************************/
140 void 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  *****************************************************************************/
163 void dvbpsi_pat_empty(dvbpsi_pat_t* p_pat);
164 
171 void dvbpsi_pat_delete(dvbpsi_pat_t *p_pat);
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