Commit 051e23d9 authored by Johan Bilien's avatar Johan Bilien
Browse files

* fixed a typo in satellite input

* added options to configure antenna (sat_lnb_lof1, sat_lnb_lof2,
  sat_lnb_slof and sat_diseqc). They only appear if satellite input
  is compiled.
parent 48337372
......@@ -51,11 +51,6 @@
#include "satellite_tools.h"
#define DISEQC 0 /* Wether you should use Diseqc*/
#define LNB_LOF_1 9750000
#define LNB_LOF_2 10600000
#define LNB_SLOF 11700000
#define SATELLITE_READ_ONCE 3
/*****************************************************************************
......@@ -115,7 +110,11 @@ static int SatelliteOpen( input_thread_t * p_input )
int i_srate = 0;
boolean_t b_pol = 0;
int i_fec = 1;
float f_fec;
float f_fec = 1./2;
boolean_t b_diseqc;
int i_lnb_lof1;
int i_lnb_lof2;
int i_lnb_slof;
/* parse the options passed in command line : */
......@@ -224,13 +223,20 @@ static int SatelliteOpen( input_thread_t * p_input )
}
/* Get antenna configuration options */
b_diseqc = config_GetIntVariable( "sat_diseqc" );
i_lnb_lof1 = config_GetIntVariable( "sat_lnb_lof1" );
i_lnb_lof2 = config_GetIntVariable( "sat_lnb_lof2" );
i_lnb_slof = config_GetIntVariable( "sat_lnb_slof" );
/* Initialize the Satellite Card */
intf_WarnMsg( 2, "Initializing Sat Card with Freq: %d, Pol: %d, "\
"FEC: %03f, Srate: %d",
i_freq, b_pol, f_fec, i_srate );
if ( ioctl_SECControl( i_freq * 1000, b_pol, LNB_SLOF, DISEQC ) < 0 )
if ( ioctl_SECControl( i_freq * 1000, b_pol, i_lnb_slof * 1000,
b_diseqc ) < 0 )
{
intf_ErrMsg("input: satellite: An error occured when controling SEC");
close( p_satellite->i_handle );
......@@ -240,7 +246,7 @@ static int SatelliteOpen( input_thread_t * p_input )
intf_WarnMsg( 3, "Initializing Frontend device" );
switch (ioctl_SetQPSKFrontend ( i_freq * 1000, i_srate* 1000, f_fec,
LNB_LOF_1, LNB_LOF_2, LNB_SLOF))
i_lnb_lof1 * 1000, i_lnb_lof2 * 1000, i_lnb_slof * 1000))
{
case -2:
intf_ErrMsg( "input: satellite: Frontend returned"\
......@@ -296,7 +302,7 @@ static int SatelliteOpen( input_thread_t * p_input )
{
intf_ErrMsg( "input: satellite: Not enough memory to allow stream\
structure" );
close( p_satellite );
close( p_satellite->i_handle );
free( p_satellite );
return( -1 );
}
......
......@@ -4,7 +4,7 @@
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: main.c,v 1.177 2002/04/08 14:53:05 jobi Exp $
* $Id: main.c,v 1.178 2002/04/15 14:06:19 jobi Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -235,9 +235,24 @@
#define SAT_POL_TEXT "Satellite transponder polarization"
#define SAT_POL_LONGTEXT NULL
#define SAT_FEC_TEXT "Satellite transponder FEC"
#define SAT_FEC_LONGTEXT NULL
#define SAT_SRATE_TEXT "Satellite transponder symbol rate"
#define SAT_SRATE_LONGTEXT NULL
#define SAT_DISEQC_TEXT "Use diseqc with antenna"
#define SAT_DISEQC_LONGTEXT NULL
#define SAT_LNB_LOF1_TEXT "Antenna lnb_lof1 (kHz)"
#define SAT_LNB_LOF1_LONGTEXT NULL
#define SAT_LNB_LOF2_TEXT "Antenna lnb_lof2 (kHz)"
#define SAT_LNB_LOF2_LONGTEXT NULL
#define SAT_LNB_SLOF_TEXT "Antenna lnb_slof (kHz)"
#define SAT_LNB_SLOF_LONGTEXT NULL
#define IPV6_TEXT "force IPv6"
#define IPV6_LONGTEXT NULL
......@@ -350,10 +365,18 @@ ADD_INTEGER ( "input_subtitle", -1, NULL, INPUT_SUBT_TEXT, INPUT_SUBT_LONGTEXT )
ADD_STRING ( "dvd_device", "/dev/dvd", NULL, DVD_DEV_TEXT, DVD_DEV_LONGTEXT )
ADD_STRING ( "vcd_device", "/dev/cdrom", NULL, VCD_DEV_TEXT, VCD_DEV_LONGTEXT )
#ifdef HAVE_SATELLITE
ADD_INTEGER ( "sat_frequency", 12553, NULL, SAT_FREQ_TEXT, SAT_FREQ_LONGTEXT )
ADD_INTEGER ( "sat_frequency", 11954, NULL, SAT_FREQ_TEXT, SAT_FREQ_LONGTEXT )
ADD_INTEGER ( "sat_polarization", 0, NULL, SAT_POL_TEXT, SAT_POL_LONGTEXT )
ADD_INTEGER ( "sat_fec", 3, NULL, SAT_FEC_TEXT, SAT_FEC_LONGTEXT )
ADD_INTEGER ( "sat_symbol_rate", 27500, NULL, SAT_SRATE_TEXT,
SAT_SRATE_LONGTEXT )
ADD_BOOL ( "sat_diseqc", 0, SAT_DISEQC_TEXT, SAT_DISEQC_LONGTEXT )
ADD_INTEGER ( "sat_lnb_lof1", 10000, NULL, SAT_LNB_LOF1_TEXT,
SAT_LNB_LOF1_LONGTEXT )
ADD_INTEGER ( "sat_lnb_lof2", 10000, NULL, SAT_LNB_LOF2_TEXT,
SAT_LNB_LOF2_LONGTEXT )
ADD_INTEGER ( "sat_lnb_slof", 11700, NULL, SAT_LNB_SLOF_TEXT,
SAT_LNB_SLOF_LONGTEXT )
#endif
ADD_BOOL ( "ipv6", NULL, IPV6_TEXT, IPV6_LONGTEXT )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment