libdvbv5  1.10.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
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation version 2
8  * of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19  *
20  */
21 
22 #ifndef _SDT_H
23 #define _SDT_H
24 
43 #include <stdint.h>
44 #include <unistd.h> /* ssize_t */
45 
46 #include <libdvbv5/header.h>
47 
59 #define DVB_TABLE_SDT 0x42
60 #define DVB_TABLE_SDT2 0x46
61 #define DVB_TABLE_SDT_PID 0x0011
62 
89  uint16_t service_id;
91  uint8_t EIT_schedule:1;
92  uint8_t reserved:6;
93  union {
94  uint16_t bitfield;
95  struct {
96  uint16_t desc_length:12;
97  uint16_t free_CA_mode:1;
98  uint16_t running_status:3;
99  } __attribute__((packed));
100  } __attribute__((packed));
103 } __attribute__((packed));
104 
125  struct dvb_table_header header;
126  uint16_t network_id;
127  uint8_t reserved;
129 } __attribute__((packed));
130 
138 #define dvb_sdt_service_foreach(_service, _sdt) \
139  for (struct dvb_table_sdt_service *_service = _sdt->service; _service; _service = _service->next ) \
140 
141 struct dvb_v5_fe_parms;
142 
143 #ifdef __cplusplus
144 extern "C" {
145 #endif
146 
163 ssize_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 
172 void dvb_table_sdt_free(struct dvb_table_sdt *table);
173 
181 void 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
uint16_t network_id
Definition: sdt.h:126
Header of a MPEG-TS table.
Definition: header.h:93
uint8_t EIT_schedule
Definition: sdt.h:91
Provides the MPEG TS table headers.
MPEG-TS SDT service table.
Definition: sdt.h:88
struct dvb_desc * descriptor
Definition: sdt.h:101
uint8_t EIT_present_following
Definition: sdt.h:90
MPEG-TS SDT table.
Definition: sdt.h:124
uint8_t reserved
Definition: sdt.h:92
uint16_t service_id
Definition: sdt.h:89
void dvb_table_sdt_print(struct dvb_v5_fe_parms *parms, struct dvb_table_sdt *table)
Prints the content of the SDT table.
Keeps data needed to handle the DVB frontend.
Definition: dvb-fe.h:118
struct dvb_table_sdt_service * service
Definition: sdt.h:128
uint16_t desc_length
Definition: sdt.h:96
void dvb_table_sdt_free(struct dvb_table_sdt *table)
Frees all data allocated by the SDT table parser.
struct dvb_table_sdt_service * next
Definition: sdt.h:102
Linked list containing the several descriptors found on a MPEG-TS table.
Definition: descriptors.h:118
uint16_t bitfield
Definition: sdt.h:94
uint8_t reserved
Definition: sdt.h:127
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.
uint16_t free_CA_mode
Definition: sdt.h:97
uint16_t running_status
Definition: sdt.h:98