libdvbpsi
1.1.0
Main Page
Related Pages
Data Structures
Files
File List
Globals
src
tables
sis.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* sis.h
3
* Copyright (c) 2010-2011 VideoLAN
4
* $Id$
5
*
6
* Authors: Jean-Paul Saman <jpsaman@videolan.org>
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_SIS_H_
34
#define _DVBPSI_SIS_H_
35
36
#ifdef __cplusplus
37
extern
"C"
{
38
#endif
39
40
/*****************************************************************************
41
* dvbpsi_sis_t
42
*****************************************************************************/
54
typedef
struct
dvbpsi_sis_s
55
{
56
/* section */
57
uint8_t
i_table_id
;
58
uint16_t
i_extension
;
60
uint16_t
i_ts_id
;
61
uint8_t
i_version
;
62
uint8_t
i_protocol_version
;
64
bool
b_current_next
;
66
/* encryption */
67
bool
b_encrypted_packet
;
69
uint8_t
i_encryption_algorithm
;
72
uint64_t
i_pts_adjustment
;
73
uint8_t
cw_index
;
75
/* splice command */
76
uint16_t
i_splice_command_length
;
77
uint8_t
i_splice_command_type
;
79
/* Splice Command:
80
* splice_command_type splice_info_section
81
* 0x00 splice_null()
82
* 0x01 reserved
83
* 0x02 reserved
84
* 0x03 reserved
85
* 0x04 splice_schedule()
86
* 0x05 splice_insert()
87
* 0x06 time_signal()
88
* 0x07 bandwidth_reservation()
89
* 0x08 - 0xff reserved
90
*/
91
void
*
p_splice_command
;
94
/* descriptors */
95
uint16_t
i_descriptors_length
;
97
dvbpsi_descriptor_t
*
p_first_descriptor
;
100
/* FIXME: alignment stuffing */
101
uint32_t
i_ecrc
;
103
} __attribute__((packed)) dvbpsi_sis_t;
104
105
/*****************************************************************************
106
* Splice Commands
107
*****************************************************************************/
120
typedef struct
dvbpsi_sis_cmd_splice_null_s
121
{
122
/* nothing */
123
}
dvbpsi_sis_cmd_splice_null_t
;
124
133
typedef
struct
dvbpsi_sis_break_duration_s
134
{
135
bool
b_auto_return
;
139
uint64_t
i_duration
;
143
}
dvbpsi_sis_break_duration_t
;
144
149
typedef
struct
dvbpsi_sis_component_utc_splice_time_s
dvbpsi_sis_component_utc_splice_time_t
;
154
struct
dvbpsi_sis_component_utc_splice_time_s
155
{
156
uint8_t
component_tag
;
159
uint32_t
i_utc_splice_time
;
165
dvbpsi_sis_component_utc_splice_time_t
*
p_next
;
166
};
167
176
typedef
struct
dvbpsi_sis_splice_event_s
dvbpsi_sis_splice_event_t
;
177
struct
dvbpsi_sis_splice_event_s
178
{
179
uint32_t
i_splice_event_id
;
180
bool
b_splice_event_cancel_indicator
;
182
/* if (!b_splice_event_cancel_indicator) */
183
bool
b_out_of_network_indicator
;
184
bool
b_program_splice_flag
;
185
bool
b_duration_flag
;
186
/* if (b_program_splice_flag) */
187
uint32_t
i_utc_splice_time
;
192
/* if (!b_program_splice_flag) */
193
uint8_t
i_component_count
;
196
dvbpsi_sis_component_utc_splice_time_t
*
p_data
;
200
/* if (b_duration_flag) */
201
dvbpsi_sis_break_duration_t
*
p_break_duration
;
203
/* */
204
205
uint16_t
i_unique_program_id
;
207
uint8_t
i_avail_num
;
209
uint8_t
i_avails_expected
;
211
/* end */
212
213
dvbpsi_sis_splice_event_t
*
p_next
;
214
};
215
224
typedef
struct
dvbpsi_sis_cmd_splice_schedule_s
225
{
226
uint8_t
i_splice_count
;
227
dvbpsi_sis_splice_event_t
*
p_splice_event
;
228
}
dvbpsi_sis_cmd_splice_schedule_t
;
229
238
typedef
struct
dvbpsi_sis_splice_time_s
dvbpsi_sis_splice_time_t
;
239
struct
dvbpsi_sis_splice_time_s
240
{
241
bool
b_time_specified_flag
;
242
/* if (b_time_specified_flag) */
243
uint64_t
i_pts_time
;
246
/* else reserved */
247
/* end */
248
249
dvbpsi_sis_splice_time_t
*
p_next
;
250
};
251
260
typedef
struct
dvbpsi_sis_component_splice_time_s
dvbpsi_sis_component_splice_time_t
;
261
struct
dvbpsi_sis_component_splice_time_s
262
{
263
uint8_t
i_component_tag
;
266
/* if (splice_immediate_flag) */
267
dvbpsi_sis_splice_time_t
*
p_splice_time
;
268
/* */
269
270
dvbpsi_sis_component_splice_time_t
*
p_next
;
271
};
272
281
typedef
struct
dvbpsi_sis_cmd_splice_insert_s
282
{
283
uint32_t
i_splice_event_id
;
284
bool
b_splice_event_cancel_indicator
;
286
/* if (!b_splice_event_cancel_indicator) */
287
bool
b_out_of_network_indicator
;
288
bool
b_program_splice_flag
;
289
bool
b_duration_flag
;
290
bool
b_splice_immediate_flag
;
292
/* if (b_program_splice_flag) && (!b_splice_immediate_flag) */
293
dvbpsi_sis_splice_time_t
*
p_splice_time
;
295
/* if (!b_program_splice_flag) */
296
uint8_t
i_component_count
;
298
dvbpsi_sis_component_splice_time_t
*
p_data
;
301
/* if (b_duration_flag) */
302
dvbpsi_sis_break_duration_t
*
p_break_duration
;
304
/* */
305
uint16_t
i_unique_program_id
;
306
uint8_t
i_avail_num
;
308
uint8_t
i_avails_expected
;
310
/* end */
311
}
dvbpsi_sis_cmd_splice_insert_t
;
312
321
typedef
struct
dvbpsi_sis_cmd_time_signal_s
322
{
323
dvbpsi_sis_splice_time_t
*
p_splice_time
;
324
}
dvbpsi_sis_cmd_time_signal_t
;
325
334
typedef
struct
dvbpsi_sis_cmd_bandwidth_reservation_s
335
{
336
/* nothing */
337
}
dvbpsi_sis_cmd_bandwidth_reservation_t
;
338
339
/*****************************************************************************
340
* dvbpsi_sis_callback
341
*****************************************************************************/
347
typedef
void (*
dvbpsi_sis_callback
)(
void
* p_cb_data, dvbpsi_sis_t* p_new_sis);
348
349
/*****************************************************************************
350
* dvbpsi_sis_attach
351
*****************************************************************************/
364
bool
dvbpsi_sis_attach
(
dvbpsi_t
* p_dvbpsi, uint8_t
i_table_id
, uint16_t
i_extension
,
365
dvbpsi_sis_callback
pf_callback,
void
* p_cb_data);
366
367
/*****************************************************************************
368
* dvbpsi_sis_detach
369
*****************************************************************************/
379
void
dvbpsi_sis_detach
(
dvbpsi_t
*p_dvbpsi, uint8_t
i_table_id
, uint16_t
i_extension
);
380
381
/*****************************************************************************
382
* dvbpsi_sis_init/dvbpsi_sis_new
383
*****************************************************************************/
396
void
dvbpsi_sis_init
(dvbpsi_sis_t *p_sis, uint8_t
i_table_id
, uint16_t
i_extension
,
397
uint8_t
i_version
,
bool
b_current_next
, uint8_t
i_protocol_version
);
398
410
dvbpsi_sis_t*
dvbpsi_sis_new
(uint8_t
i_table_id
, uint16_t
i_extension
, uint8_t
i_version
,
411
bool
b_current_next
, uint8_t
i_protocol_version
);
412
413
/*****************************************************************************
414
* dvbpsi_sis_empty/dvbpsi_sis_delete
415
*****************************************************************************/
422
void
dvbpsi_sis_empty
(dvbpsi_sis_t *p_sis);
423
430
void
dvbpsi_sis_delete
(dvbpsi_sis_t *p_sis);
431
432
/*****************************************************************************
433
* dvbpsi_sis_descriptor_add
434
*****************************************************************************/
446
dvbpsi_descriptor_t
*
dvbpsi_sis_descriptor_add
(dvbpsi_sis_t *p_sis,
447
uint8_t i_tag, uint8_t i_length,
448
uint8_t *p_data);
449
450
/*****************************************************************************
451
* dvbpsi_sis_sections_generate
452
*****************************************************************************
453
* Generate SIS sections based on the dvbpsi_sis_t structure.
454
*****************************************************************************/
464
dvbpsi_psi_section_t
*
dvbpsi_sis_sections_generate
(
dvbpsi_t
*p_dvbpsi, dvbpsi_sis_t * p_sis);
465
466
#ifdef __cplusplus
467
};
468
#endif
469
470
#else
471
#error "Multiple inclusions of sis.h"
472
#endif
473
Generated on Sat May 25 2013 17:44:03 for libdvbpsi by
1.8.4