]> git.sesse.net Git - vlc/blob - modules/access/dvb/qpsk.c
* modules/access/*: strings review + coding style fixes.
[vlc] / modules / access / dvb / qpsk.c
1 /*****************************************************************************
2  * qpsk.c : Satellite input module for vlc
3  *****************************************************************************
4  * Copyright (C) 2003-2004 VideoLAN
5  *
6  * Authors: Sam Hocevar <sam@zoy.org>
7  *          Jean-Paul Saman <jpsaman@wxs.nl>
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  * 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 in directory named /dev/dvb/adapter[n] with n>=0.")
46
47 #define DEVICE_TEXT N_("Device number to use on adapter")
48 #define DEVICE_LONGTEXT ""
49
50 #define FREQ_TEXT N_("Satellite transponder frequency in kHz")
51 #define FREQ_LONGTEXT ""
52
53 #define POL_TEXT N_("Satellite transponder polarization")
54 #define POL_LONGTEXT ""
55
56 #define FEC_TEXT N_("Satellite transponder FEC")
57 #define FEC_LONGTEXT N_("FEC=Forward Error Correction mode.")
58
59 #define SRATE_TEXT N_("Satellite transponder symbol rate in kHz")
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 dvb card for capabilities")
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     set_description( _("DVB input with v4l2 support") );
102
103     add_integer( "adapter", 0, NULL, ADAPTER_TEXT, ADAPTER_LONGTEXT,
104                  VLC_FALSE );
105     add_integer( "device", 0, NULL, DEVICE_TEXT, DEVICE_LONGTEXT, VLC_FALSE );
106     add_integer( "frequency", 11954000, NULL, FREQ_TEXT, FREQ_LONGTEXT,
107                  VLC_FALSE );
108     add_integer( "polarization", 0, NULL, POL_TEXT, POL_LONGTEXT, VLC_FALSE );
109     add_integer( "fec", 3, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_FALSE );
110     add_integer( "symbol-rate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT,
111                  VLC_FALSE );
112     add_bool( "diseqc", 0, NULL, DISEQC_TEXT, DISEQC_LONGTEXT, VLC_TRUE );
113     add_integer( "lnb-lof1",  9750000, NULL, LNB_LOF1_TEXT, LNB_LOF1_LONGTEXT,
114                  VLC_TRUE );
115     add_integer( "lnb-lof2", 12999000, NULL, LNB_LOF2_TEXT, LNB_LOF2_LONGTEXT,
116                  VLC_TRUE );
117     add_integer( "lnb-slof", 11700000, NULL, LNB_SLOF_TEXT, LNB_SLOF_LONGTEXT,
118                  VLC_TRUE );
119     add_bool( "probe", 0, NULL, PROBE_TEXT, PROBE_LONGTEXT, VLC_FALSE );
120     add_integer( "code-rate-hp", 9, NULL, CODE_RATE_HP_TEXT,
121                  CODE_RATE_HP_LONGTEXT, VLC_TRUE );
122     add_integer( "code-rate-lp", 9, NULL, CODE_RATE_LP_TEXT,
123                  CODE_RATE_LP_LONGTEXT, VLC_TRUE );
124     add_integer( "bandwidth", 0, NULL, BANDWIDTH_TEXT, BANDWIDTH_LONGTEXT,
125                  VLC_TRUE );
126     add_integer( "modulation", 0, NULL, MODULATION_TEXT, MODULATION_LONGTEXT,
127                  VLC_TRUE );
128     add_integer( "guard", 0, NULL, GUARD_TEXT, GUARD_LONGTEXT, VLC_TRUE );
129     add_integer( "transmission", 0, NULL, TRANSMISSION_TEXT,
130                  TRANSMISSION_LONGTEXT, VLC_TRUE );
131     add_integer( "hierarchy", 0, NULL, HIERARCHY_TEXT, HIERARCHY_LONGTEXT,
132                  VLC_TRUE );
133
134     set_capability( "access", 0 );
135     add_shortcut( "qpsk" );
136     add_shortcut( "cable" );
137     add_shortcut( "terrestrial" );
138     add_shortcut( "dvb" );
139     add_shortcut( "satellite" );
140     set_callbacks( E_(Open), E_(Close) );
141 vlc_module_end();