]> git.sesse.net Git - vlc/blob - modules/access/dvb/qpsk.c
- Enabled tuning for DVB-C and DVB-T cards.
[vlc] / modules / access / dvb / qpsk.c
1 /*****************************************************************************
2  * qpsk.c : Satellite input module for vlc
3  *****************************************************************************
4  * Copyright (C) 2003 VideoLAN
5  *
6  * Authors: Samuel Hocevar <sam@zoy.org>
7  *          Jean-Paul Saman <saman@natlab.research.philips.com>
8  *          Christopher Ross <ross@natlab.research.philips.com>
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  * Preamble
27  *****************************************************************************/
28 #include <stdlib.h>                                      /* malloc(), free() */
29 #include <string.h>                                              /* strdup() */
30
31 #include <vlc/vlc.h>
32
33 /*****************************************************************************
34  * External prototypes
35  *****************************************************************************/
36 int  E_(Open)    ( vlc_object_t * );
37 void E_(Close)   ( vlc_object_t * );
38
39 /*****************************************************************************
40  * Module descriptor
41  *****************************************************************************/
42
43 /* Satellite options */
44 #define ADAPTER_TEXT N_("adapter card to tune")
45 #define ADAPTER_LONGTEXT N_("adapter cards have a device file named /dev/dvb/adapter[n] with n>=0")
46
47 #define DEVICE_TEXT N_("device nummer to use on adapter")
48 #define DEVICE_LONGTEXT ""
49
50 #define FREQ_TEXT N_("satellite default transponder frequency")
51 #define FREQ_LONGTEXT ""
52
53 #define POL_TEXT N_("satellite default transponder polarization")
54 #define POL_LONGTEXT ""
55
56 #define FEC_TEXT N_("satellite default transponder FEC")
57 #define FEC_LONGTEXT N_("FEC=Forward Error Correction mode")
58
59 #define SRATE_TEXT N_("satellite default transponder symbol rate")
60 #define SRATE_LONGTEXT ""
61
62 #define DISEQC_TEXT N_("use diseqc with antenna")
63 #define DISEQC_LONGTEXT ""
64
65 #define LNB_LOF1_TEXT N_("antenna lnb_lof1 (kHz)")
66 #define LNB_LOF1_LONGTEXT ""
67
68 #define LNB_LOF2_TEXT N_("antenna lnb_lof2 (kHz)")
69 #define LNB_LOF2_LONGTEXT ""
70
71 #define LNB_SLOF_TEXT N_("antenna lnb_slof (kHz)")
72 #define LNB_SLOF_LONGTEXT ""
73
74 #define PROBE_TEXT      N_("probe the dvb card for capabilities (default disabled)")
75 #define PROBE_LONGTEXT N_("some dvb cards do not like to be probed for their capabilities")
76
77 /* Cable */
78 #define MODULATION_TEXT N_("modulation type")
79 #define MODULATION_LONGTEXT N_("modulation type for frontend device ")
80
81 /* Terrestrial */
82 #define CODE_RATE_HP_TEXT N_("terrestrial high priority stream code rate (FEC)")
83 #define CODE_RATE_HP_LONGTEXT ""
84
85 #define CODE_RATE_LP_TEXT N_("terrestrial low priority stream code rate (FEC)")
86 #define CODE_RATE_LP_LONGTEXT ""
87
88 #define BANDWIDTH_TEXT N_("terrestrial bandwidth")
89 #define BANDWIDTH_LONGTEXT N_("terrestrial bandwidth [0=auto,6,7,8 in MHz]")
90
91 #define GUARD_TEXT N_("terrestrial guard interval")
92 #define GUARD_LONGTEXT ""
93
94 #define TRANSMISSION_TEXT N_("terrestrial transmission mode")
95 #define TRANSMISSION_LONGTEXT ""
96
97 #define HIERARCHY_TEXT N_("terrestrial hierarchy mode")
98 #define HIERARCHY_LONGTEXT ""
99
100 vlc_module_begin();
101     add_category_hint( N_("Input"), NULL, VLC_FALSE );
102                           add_integer( "adapter", 1, NULL, ADAPTER_TEXT, ADAPTER_LONGTEXT, VLC_FALSE );
103                                 add_integer( "device", 0, NULL, DEVICE_TEXT, DEVICE_LONGTEXT, VLC_FALSE );
104         add_integer( "frequency", 11954, NULL, FREQ_TEXT, FREQ_LONGTEXT, VLC_FALSE );
105         add_integer( "polarization", 0, NULL, POL_TEXT, POL_LONGTEXT, VLC_FALSE );
106         add_integer( "fec", 3, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_FALSE );
107         add_integer( "symbol-rate", 27500, NULL, SRATE_TEXT, SRATE_LONGTEXT, VLC_FALSE );
108         add_bool( "diseqc", 0, NULL, DISEQC_TEXT, DISEQC_LONGTEXT, VLC_FALSE );
109         add_integer( "lnb-lof1", 10000, NULL,
110                      LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT, VLC_FALSE );
111         add_integer( "lnb-lof2", 10000, NULL,
112                      LNB_LOF2_TEXT, LNB_LOF2_LONGTEXT, VLC_FALSE );
113         add_integer( "lnb-slof", 11700, NULL,
114                      LNB_SLOF_TEXT, LNB_SLOF_LONGTEXT, VLC_FALSE );
115                           add_bool( "probe", 0, NULL, PROBE_TEXT, PROBE_LONGTEXT, VLC_FALSE );
116               add_integer( "code-rate-hp", 9, NULL, CODE_RATE_HP_TEXT, CODE_RATE_HP_LONGTEXT, VLC_FALSE );
117               add_integer( "code-rate-lp", 9, NULL, CODE_RATE_LP_TEXT, CODE_RATE_LP_LONGTEXT, VLC_FALSE );
118                           add_integer( "bandwidth", 0, NULL, BANDWIDTH_TEXT, BANDWIDTH_LONGTEXT, VLC_FALSE );
119                           add_integer( "modulation", 0, NULL, MODULATION_TEXT, MODULATION_LONGTEXT, VLC_FALSE );
120                           add_integer( "quard", 0, NULL, GUARD_TEXT, GUARD_LONGTEXT, VLC_TRUE );
121                           add_integer( "transmission", 0, NULL, TRANSMISSION_TEXT, TRANSMISSION_LONGTEXT, VLC_TRUE );
122                           add_integer( "hierarchy", 0, NULL, HIERARCHY_TEXT, HIERARCHY_LONGTEXT, VLC_TRUE );
123     set_description( _("DVB input module with v4l2 support") );
124     set_capability( "access", 0 );
125                 add_shortcut( "qpsk" );
126     add_shortcut( "cable" );
127     add_shortcut( "terrestrial" );
128     add_shortcut( "dvb" );
129     add_shortcut( "satellite" );
130     set_callbacks( E_(Open), E_(Close) );
131 vlc_module_end();
132