libdvbv5 1.32.0 Library to work with Digital TV devices on Linux

dvb-v5-std.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2014 - Mauro Carvalho Chehab
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 * Per-delivery system properties defined at libdvbv5 scope, following
19 * the same model as defined at the Linux DVB media specs:
20 * http://linuxtv.org/downloads/v4l-dvb-apis/FE_GET_SET_PROPERTY.html
21 */
22#ifndef _DVB_V5_STD_H
23#define _DVB_V5_STD_H
24
25#include <stddef.h>
26#include "dvb-frontend.h"
27
38
39/*
40 * User DTV codes, for internal usage. There are two sets of
41 * properties. One for DTV properties and another one for statistics
42 */
43
44/*
45 * First set: DTV properties that don't belong to Kernelspace
46 *
47 * Those properties contain data that comes from the MPEG-TS
48 * tables, like audio/video/other PIDs, and satellite config
49 */
50
106
107#define DTV_USER_COMMAND_START 256
108
109#define DTV_POLARIZATION (DTV_USER_COMMAND_START + 0)
110#define DTV_VIDEO_PID (DTV_USER_COMMAND_START + 1)
111#define DTV_AUDIO_PID (DTV_USER_COMMAND_START + 2)
112#define DTV_SERVICE_ID (DTV_USER_COMMAND_START + 3)
113#define DTV_CH_NAME (DTV_USER_COMMAND_START + 4)
114#define DTV_VCHANNEL (DTV_USER_COMMAND_START + 5)
115#define DTV_SAT_NUMBER (DTV_USER_COMMAND_START + 6)
116#define DTV_DISEQC_WAIT (DTV_USER_COMMAND_START + 7)
117#define DTV_DISEQC_LNB (DTV_USER_COMMAND_START + 8)
118#define DTV_FREQ_BPF (DTV_USER_COMMAND_START + 9)
119#define DTV_PLS_CODE (DTV_USER_COMMAND_START + 10)
120#define DTV_PLS_MODE (DTV_USER_COMMAND_START + 11)
121#define DTV_COUNTRY_CODE (DTV_USER_COMMAND_START + 12)
122
123#define DTV_MAX_USER_COMMAND DTV_COUNTRY_CODE
124
125#define DTV_USER_NAME_SIZE (1 + DTV_MAX_USER_COMMAND - DTV_USER_COMMAND_START)
126
138 enum dvb_sat_polarization {
139 POLARIZATION_OFF = 0,
140 POLARIZATION_H = 1,
141 POLARIZATION_V = 2,
142 POLARIZATION_L = 3,
143 POLARIZATION_R = 4,
144};
145
146/*
147 * Second set: DTV statistics
148 *
149 * Those properties contain statistics measurements that aren't
150 * either provided by the Kernel via property cmd/value pair,
151 * like status (with has its own ioctl), or that are derivated
152 * measures from two or more Kernel reported stats.
153 */
154
196
197#define DTV_STAT_COMMAND_START 512
198
199#define DTV_STATUS (DTV_STAT_COMMAND_START + 0)
200#define DTV_BER (DTV_STAT_COMMAND_START + 1)
201#define DTV_PER (DTV_STAT_COMMAND_START + 2)
202#define DTV_QUALITY (DTV_STAT_COMMAND_START + 3)
203#define DTV_PRE_BER (DTV_STAT_COMMAND_START + 4)
204
205#define DTV_MAX_STAT_COMMAND DTV_PRE_BER
206
207#define DTV_STAT_NAME_SIZE (1 + DTV_MAX_STAT_COMMAND - DTV_STAT_COMMAND_START)
208
209/* There are currently 8 stats provided on Kernelspace */
210#define DTV_NUM_KERNEL_STATS 8
211
212#define DTV_NUM_STATS_PROPS (DTV_NUM_KERNEL_STATS + DTV_STAT_NAME_SIZE)
213
231 enum dvb_quality {
232 DVB_QUAL_UNKNOWN = 0,
233 DVB_QUAL_POOR,
234 DVB_QUAL_OK,
235 DVB_QUAL_GOOD,
236};
237
238#ifndef _DOXYGEN
239
240/*
241 * Some tables to translate from value to string
242 *
243 * These tables are raw ways to translate from some DTV values into strings.
244 * Please use the API-provided function dvb_cmd_name() and dvb_dvb_attr_names(),
245 * instead of using the tables directly.
246 */
247
248 extern const unsigned int sys_dvbt_props[];
249 extern const unsigned int sys_dvbt2_props[];
250 extern const unsigned int sys_isdbt_props[];
251 extern const unsigned int sys_atsc_props[];
252 extern const unsigned int sys_atscmh_props[];
253 extern const unsigned int sys_dvbc_annex_ac_props[];
254 extern const unsigned int sys_dvbc_annex_b_props[];
255 extern const unsigned int sys_dvbs_props[];
256 extern const unsigned int sys_dvbs2_props[];
257 extern const unsigned int sys_turbo_props[];
258 extern const unsigned int sys_isdbs_props[];
259 extern const unsigned int *dvb_v5_delivery_system[];
260 extern const char *dvb_sat_pol_name[6];
261 extern const char *dvb_user_name[DTV_USER_NAME_SIZE + 1];
262 extern const char *dvb_stat_name[DTV_STAT_NAME_SIZE + 1];
263 extern const void *dvb_user_attr_names[];
264
265#endif /* DOXYGEN_SHOULD_SKIP_THIS */
266
267#endif
POLARIZATION_R
@ POLARIZATION_R
Definition dvb-v5-std.h:143
POLARIZATION_V
@ POLARIZATION_V
Definition dvb-v5-std.h:141
POLARIZATION_H
@ POLARIZATION_H
Definition dvb-v5-std.h:140
POLARIZATION_OFF
@ POLARIZATION_OFF
Definition dvb-v5-std.h:139
POLARIZATION_L
@ POLARIZATION_L
Definition dvb-v5-std.h:142
DVB_QUAL_GOOD
@ DVB_QUAL_GOOD
Definition dvb-v5-std.h:235
DVB_QUAL_UNKNOWN
@ DVB_QUAL_UNKNOWN
Definition dvb-v5-std.h:232
DVB_QUAL_OK
@ DVB_QUAL_OK
Definition dvb-v5-std.h:234
DVB_QUAL_POOR
@ DVB_QUAL_POOR
Definition dvb-v5-std.h:233
DTV_USER_NAME_SIZE
#define DTV_USER_NAME_SIZE
Number of user commands.
Definition dvb-v5-std.h:125
dvb_quality
dvb_quality
Provides an estimation about the user's experience while watching to a given MPEG stream.
Definition dvb-v5-std.h:231
DTV_STAT_NAME_SIZE
#define DTV_STAT_NAME_SIZE
Number of statistics commands.
Definition dvb-v5-std.h:207
dvb_sat_polarization
dvb_sat_polarization
Polarization types for Satellite systems.
Definition dvb-v5-std.h:138