libdvbv5  1.11.0
Library to work with Digital TV devices on Linux
desc_ca.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 - Andre Roth <neolynx@gmail.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation version 2.1 of the License.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
17  *
18  * Described at ETSI EN 300 468 V1.11.1 (2010-04)
19  */
20 
38 #ifndef _CA_H
39 #define _CA_H
40 
41 #include <libdvbv5/descriptors.h>
42 
56 struct dvb_desc_ca {
57  uint8_t type;
58  uint8_t length;
59  struct dvb_desc *next;
60 
61  uint16_t ca_id;
62  union {
63  uint16_t bitfield1;
64  struct {
65  uint16_t ca_pid:13;
66  uint16_t reserved:3;
67  } __attribute__((packed));
68  } __attribute__((packed));
69 
70  uint8_t *privdata;
71  uint8_t privdata_len;
72 } __attribute__((packed));
73 
74 struct dvb_v5_fe_parms;
75 
77 #define dvb_desc_ca_field_first ca_id
78 
79 #define dvb_desc_ca_field_last privdata
80 
81 #ifdef __cplusplus
82 extern "C" {
83 #endif
84 
100 int dvb_desc_ca_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf,
101  struct dvb_desc *desc);
102 
110 void dvb_desc_ca_print(struct dvb_v5_fe_parms *parms,
111  const struct dvb_desc *desc);
112 
119 void dvb_desc_ca_free(struct dvb_desc *desc);
120 
121 #ifdef __cplusplus
122 }
123 #endif
124 
125 #endif
uint8_t length
Definition: desc_ca.h:58
uint16_t reserved
Definition: desc_ca.h:66
Contains the private data for Conditional Access.
Definition: desc_ca.h:56
uint16_t ca_id
Definition: desc_ca.h:61
uint8_t type
Definition: desc_ca.h:57
uint8_t * privdata
Definition: desc_ca.h:70
struct dvb_desc * next
Definition: desc_ca.h:59
Keeps data needed to handle the DVB frontend.
Definition: dvb-fe.h:117
uint16_t ca_pid
Definition: desc_ca.h:65
void dvb_desc_ca_free(struct dvb_desc *desc)
Frees all data allocated by the CA descriptor.
Linked list containing the several descriptors found on a MPEG-TS table.
Definition: descriptors.h:117
uint8_t privdata_len
Definition: desc_ca.h:71
uint16_t bitfield1
Definition: desc_ca.h:63
int dvb_desc_ca_init(struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc)
Initializes and parses the CA descriptor.
Provides a way to handle MPEG-TS descriptors found on Digital TV streams.
void dvb_desc_ca_print(struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc)
Prints the content of the CA descriptor.