libdvbv5 1.22.1
Library to work with Digital TV devices on Linux
sdt.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2012 - Mauro Carvalho Chehab
3 * Copyright (c) 2012 - Andre Roth <neolynx@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation version 2.1 of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18 *
19 */
20
21#ifndef _SDT_H
22#define _SDT_H
23
42#include <stdint.h>
43#include <unistd.h> /* ssize_t */
44
45#include <libdvbv5/header.h>
46
58#define DVB_TABLE_SDT 0x42
59#define DVB_TABLE_SDT2 0x46
60#define DVB_TABLE_SDT_PID 0x0011
61
88 uint16_t service_id;
90 uint8_t EIT_schedule:1;
91 uint8_t reserved:6;
92 union {
93 uint16_t bitfield;
94 struct {
95 uint16_t desc_length:12;
96 uint16_t free_CA_mode:1;
97 uint16_t running_status:3;
98 } __attribute__((packed));
99 } __attribute__((packed));
102} __attribute__((packed));
103
125 uint16_t network_id;
126 uint8_t reserved;
128} __attribute__((packed));
129
137#define dvb_sdt_service_foreach(_service, _sdt) \
138 if (_sdt && _sdt->service) \
139 for (struct dvb_table_sdt_service *_service = _sdt->service; _service; _service = _service->next ) \
140
141struct dvb_v5_fe_parms;
142
143#ifdef __cplusplus
144extern "C" {
145#endif
146
163ssize_t dvb_table_sdt_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf,
164 ssize_t buflen, struct dvb_table_sdt **table);
165
173
181void dvb_table_sdt_print(struct dvb_v5_fe_parms *parms, struct dvb_table_sdt *table);
182
183#ifdef __cplusplus
184}
185#endif
186
187#endif
void dvb_table_sdt_free(struct dvb_table_sdt *table)
Frees all data allocated by the SDT table parser.
ssize_t dvb_table_sdt_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_sdt **table)
Initializes and parses SDT table.
void dvb_table_sdt_print(struct dvb_v5_fe_parms *parms, struct dvb_table_sdt *table)
Prints the content of the SDT table.
Provides the MPEG TS table headers.
Linked list containing the several descriptors found on a MPEG-TS table.
Definition: descriptors.h:117
Header of a MPEG-TS table.
Definition: header.h:103
MPEG-TS SDT service table.
Definition: sdt.h:87
uint8_t reserved
Definition: sdt.h:91
uint16_t running_status
Definition: sdt.h:97
uint16_t service_id
Definition: sdt.h:88
uint16_t free_CA_mode
Definition: sdt.h:96
uint8_t EIT_schedule
Definition: sdt.h:90
uint8_t EIT_present_following
Definition: sdt.h:89
uint16_t desc_length
Definition: sdt.h:95
struct dvb_desc * descriptor
Definition: sdt.h:100
uint16_t bitfield
Definition: sdt.h:93
struct dvb_table_sdt_service * next
Definition: sdt.h:101
MPEG-TS SDT table.
Definition: sdt.h:123
struct dvb_table_sdt_service * service
Definition: sdt.h:127
uint8_t reserved
Definition: sdt.h:126
struct dvb_table_header header
Definition: sdt.h:124
uint16_t network_id
Definition: sdt.h:125
Keeps data needed to handle the DVB frontend.
Definition: dvb-fe.h:117