libdvbpsi  2.0.0-git
MPEG Transport Stream PSI table parser
rst.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * rst.h
3  * Copyright (c) 2012 VideoLAN
4  * $Id$
5  *
6  * Authors: Corno Roberto <corno.roberto@gmail.com>
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_RST_H_
34 #define _DVBPSI_RST_H_
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /*****************************************************************************
41  * dvbpsi_rst_event_t
42  *****************************************************************************/
54 typedef struct dvbpsi_rst_event_s
55 {
56  uint16_t i_ts_id;
57  uint16_t i_orig_network_id;
58  uint16_t i_service_id;
59  uint16_t i_event_id;
60  uint8_t i_running_status;
66 
67 /*****************************************************************************
68  * dvbpsi_rst_t
69  *****************************************************************************/
81 typedef struct dvbpsi_rst_s
82 {
85 
86 
87 /*****************************************************************************
88  * dvbpsi_rst_callback
89  *****************************************************************************/
95 typedef void (* dvbpsi_rst_callback)(void* p_priv, dvbpsi_rst_t* p_new_rst);
96 
97 /*****************************************************************************
98  * dvbpsi_rst_attach
99  *****************************************************************************/
112 bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension,
113  dvbpsi_rst_callback pf_callback, void* p_priv);
114 
115 /*****************************************************************************
116  * dvbpsi_rst_detach
117  *****************************************************************************/
128 void dvbpsi_rst_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension);
129 
130 /*****************************************************************************
131  * dvbpsi_rst_init/dvbpsi_rst_new
132  *****************************************************************************/
140 
147 
148 /*****************************************************************************
149  * dvbpsi_rst_empty/dvbpsi_rst_delete
150  *****************************************************************************/
158 
166 
167 /*****************************************************************************
168  * dvbpsi_rst_event_add
169  *****************************************************************************/
187  uint16_t i_ts_id,
188  uint16_t i_orig_network_id,
189  uint16_t i_service_id,
190  uint16_t i_event_id,
191  uint8_t i_running_status);
192 
193 /*****************************************************************************
194  * dvbpsi_rst_sections_generate
195  *****************************************************************************/
205 dvbpsi_psi_section_t* dvbpsi_rst_sections_generate(dvbpsi_t *p_dvbpsi, dvbpsi_rst_t* p_rst);
206 
207 #ifdef __cplusplus
208 };
209 #endif
210 
211 #else
212 #error "Multiple inclusions of rst.h"
213 #endif
struct dvbpsi_rst_event_s dvbpsi_rst_event_t
dvbpsi_rst_event_t type definition.
void dvbpsi_rst_empty(dvbpsi_rst_t *p_rst)
Clean a dvbpsi_rst_t structure.
dvbpsi_rst_event_t * dvbpsi_rst_event_add(dvbpsi_rst_t *p_rst, uint16_t i_ts_id, uint16_t i_orig_network_id, uint16_t i_service_id, uint16_t i_event_id, uint8_t i_running_status)
Add an event in the RST.
void(* dvbpsi_rst_callback)(void *p_priv, dvbpsi_rst_t *p_new_rst)
Callback type definition.
Definition: rst.h:95
dvbpsi_rst_t * dvbpsi_rst_new(void)
Allocate and initialize a new dvbpsi_rst_t structure.
struct dvbpsi_rst_s dvbpsi_rst_t
dvbpsi_rst_t type definition.
void dvbpsi_rst_init(dvbpsi_rst_t *p_rst)
Initialize a user-allocated dvbpsi_cat_t structure.
void dvbpsi_rst_delete(dvbpsi_rst_t *p_rst)
Clean and free a dvbpsi_rst_t structure.
void dvbpsi_rst_detach(dvbpsi_t *p_dvbpsi, uint8_t i_table_id, uint16_t i_extension)
Destroy a RST decoder.
uint16_t i_ts_id
Definition: sis.h:4
PSI section structure.
Definition: psi.h:69
RST service description structure.
Definition: rst.h:55
uint16_t i_orig_network_id
Definition: rst.h:57
uint16_t i_ts_id
Definition: rst.h:56
struct dvbpsi_rst_event_s * p_next
Definition: rst.h:62
uint16_t i_event_id
Definition: rst.h:59
uint16_t i_service_id
Definition: rst.h:58
uint8_t i_running_status
Definition: rst.h:60
RST structure.
Definition: rst.h:82
dvbpsi_rst_event_t * p_first_event
Definition: rst.h:83
DVBPSI handle structure.
Definition: dvbpsi.h:143