libdvbpsi  2.0.0-git
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 {
84 } dvbpsi_rst_t;
85 
86 
87 /*****************************************************************************
88  * dvbpsi_rst_callback
89  *****************************************************************************/
95 typedef void (* dvbpsi_rst_callback)(void* p_cb_data, dvbpsi_rst_t* p_new_rst);
96 
97 /*****************************************************************************
98  * dvbpsi_rst_attach
99  *****************************************************************************/
109 bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi, dvbpsi_rst_callback pf_callback,
110  void* p_cb_data);
111 
112 /*****************************************************************************
113  * dvbpsi_rst_detach
114  *****************************************************************************/
124 void dvbpsi_rst_detach(dvbpsi_t *p_dvbpsi);
125 
126 /*****************************************************************************
127  * dvbpsi_rst_init/dvbpsi_rst_new
128  *****************************************************************************/
135 void dvbpsi_rst_init(dvbpsi_rst_t* p_rst);
136 
143 
144 /*****************************************************************************
145  * dvbpsi_rst_empty/dvbpsi_rst_delete
146  *****************************************************************************/
153 void dvbpsi_rst_empty(dvbpsi_rst_t* p_rst);
154 
161 void dvbpsi_rst_delete(dvbpsi_rst_t *p_rst);
162 
163 /*****************************************************************************
164  * dvbpsi_rst_event_add
165  *****************************************************************************/
183  uint16_t i_ts_id,
184  uint16_t i_orig_network_id,
185  uint16_t i_service_id,
186  uint16_t i_event_id,
187  uint8_t i_running_status);
188 
189 /*****************************************************************************
190  * dvbpsi_rst_sections_generate
191  *****************************************************************************/
202 
203 #ifdef __cplusplus
204 };
205 #endif
206 
207 #else
208 #error "Multiple inclusions of rst.h"
209 #endif
dvbpsi_psi_section_t * dvbpsi_rst_sections_generate(dvbpsi_t *p_dvbpsi, dvbpsi_rst_t *p_rst)
RST generator.
void(* dvbpsi_rst_callback)(void *p_cb_data, dvbpsi_rst_t *p_new_rst)
Callback type definition.
Definition: rst.h:95
uint16_t i_orig_network_id
Definition: rst.h:57
RST structure.
Definition: rst.h:81
dvbpsi_rst_event_t * p_first_event
Definition: rst.h:83
uint8_t i_running_status
Definition: rst.h:60
struct dvbpsi_rst_event_s * p_next
Definition: rst.h:62
struct dvbpsi_rst_event_s dvbpsi_rst_event_t
dvbpsi_rst_event_t type definition.
bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi, dvbpsi_rst_callback pf_callback, void *p_cb_data)
Creation and initialization of a RST decoder. It will be attached to p_dvbpsi.
void dvbpsi_rst_empty(dvbpsi_rst_t *p_rst)
Clean a dvbpsi_rst_t structure.
PSI section structure.
Definition: psi.h:68
uint16_t i_event_id
Definition: rst.h:59
RST service description structure.
Definition: rst.h:54
uint16_t i_ts_id
Definition: sis.h:103
uint16_t i_ts_id
Definition: rst.h:56
dvbpsi_rst_t * dvbpsi_rst_new(void)
Allocate and initialize a new dvbpsi_rst_t structure.
void dvbpsi_rst_init(dvbpsi_rst_t *p_rst)
Initialize a user-allocated dvbpsi_cat_t structure.
uint16_t i_service_id
Definition: rst.h:58
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.
DVBPSI handle structure.
Definition: dvbpsi.h:142
struct dvbpsi_rst_s dvbpsi_rst_t
dvbpsi_rst_t type definition.
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)
Destroy a RST decoder.