]> git.sesse.net Git - vlc/blob - modules/access/dvb/dvb.h
Refactoring of dvb.c and access.c. Coding style and messages cleanup.
[vlc] / modules / access / dvb / dvb.h
1 /*****************************************************************************
2  * dvb.h : functions to control a DVB card under Linux with v4l2
3  *****************************************************************************
4  * Copyright (C) 1998-2003 VideoLAN
5  *
6  * Authors: Johan Bilien <jobi@via.ecp.fr>
7  *          Jean-Paul Saman <jpsaman@saman>
8  *          Christopher Ross <chris@tebibyte.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA    02111, USA.
23  *****************************************************************************/
24
25
26 /*****************************************************************************
27  * Devices location
28  *****************************************************************************/
29 #define DMX      "/dev/dvb/adapter%d/demux%d"
30 #define FRONTEND "/dev/dvb/adapter%d/frontend%d"
31 #define DVR      "/dev/dvb/adapter%d/dvr%d"
32
33
34 /*****************************************************************************
35  * DVB input data structure
36  *****************************************************************************/
37 typedef struct
38 {
39     int                 i_frontend;
40     unsigned int        u_adapter;
41     unsigned int        u_device;
42     unsigned int        u_freq;
43     unsigned int        u_srate;
44     unsigned int        u_lnb_lof1;
45     unsigned int        u_lnb_lof2;
46     unsigned int        u_lnb_slof;
47     int                 i_bandwidth;
48     int                 i_modulation;
49     int                 i_guard;
50     int                 i_transmission;
51     int                 i_hierarchy;
52     int                 i_polarisation;
53     int                 i_fec;
54     int                 i_code_rate_HP;
55     int                 i_code_rate_LP;
56     vlc_bool_t          b_diseqc;
57     vlc_bool_t          b_probe;
58
59     input_socket_t *    p_satellite;
60 } input_dvb_t;
61
62
63 /*****************************************************************************
64  * Prototypes
65  *****************************************************************************/
66 int ioctl_SetQPSKFrontend( input_thread_t * p_input, struct dvb_frontend_parameters fep );
67 int ioctl_SetOFDMFrontend( input_thread_t * p_input, struct dvb_frontend_parameters fep );
68 int ioctl_SetQAMFrontend( input_thread_t * p_input, struct dvb_frontend_parameters fep );
69 int ioctl_SetDMXFilter( input_thread_t * p_input, int i_pid, int *pi_fd, int i_type );
70 int ioctl_UnsetDMXFilter( input_thread_t * p_input, int pi_fd );
71 int ioctl_InfoFrontend( input_thread_t * p_input, struct dvb_frontend_info *info );
72
73 /*****************************************************************************
74  * dvb argument helper functions 
75  *****************************************************************************/
76 fe_bandwidth_t      dvb_DecodeBandwidth( input_thread_t * p_input, int bandwidth );
77 fe_code_rate_t      dvb_DecodeFEC( input_thread_t * p_input, int fec );
78 fe_modulation_t     dvb_DecodeModulation( input_thread_t * p_input, int modulation );
79 fe_transmit_mode_t  dvb_DecodeTransmission( input_thread_t * p_input, int transmission );
80 fe_guard_interval_t     dvb_DecodeGuardInterval( input_thread_t * p_input, int guard );
81 fe_hierarchy_t          dvb_DecodeHierarchy( input_thread_t * p_input, int hierarchy );
82 fe_spectral_inversion_t dvb_DecodeInversion( input_thread_t * p_input, int inversion);
83