<class>GtkTable</class>
<name>table5</name>
<border_width>5</border_width>
- <rows>4</rows>
+ <rows>5</rows>
<columns>2</columns>
<homogeneous>False</homogeneous>
<row_spacing>5</row_spacing>
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
- <value>12553</value>
- <lower>1</lower>
- <upper>65536</upper>
+ <value>11954</value>
+ <lower>10000</lower>
+ <upper>12999</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
<label>Horizontal</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
+ <group>pol</group>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<label>Vertical</label>
<active>True</active>
<draw_indicator>True</draw_indicator>
+ <group>pol</group>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<snap>False</snap>
<wrap>False</wrap>
<value>27500</value>
- <lower>0</lower>
- <upper>100</upper>
+ <lower>1000</lower>
+ <upper>30000</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
<yfill>False</yfill>
</child>
</widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label35</name>
+ <label>FEC</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkCombo</class>
+ <name>sat_fec</name>
+ <value_in_list>False</value_in_list>
+ <ok_if_empty>True</ok_if_empty>
+ <case_sensitive>False</case_sensitive>
+ <use_arrows>True</use_arrows>
+ <use_arrows_always>False</use_arrows_always>
+ <items>1/2
+2/3
+3/4
+4/5
+5/6
+6/7
+7/8
+</items>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GtkCombo:entry</child_name>
+ <name>combo-entry4</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>3/4</text>
+ </widget>
+ </widget>
</widget>
</widget>
</widget>
GtkObject *sat_freq_adj;
GtkWidget *sat_freq;
GtkWidget *label31;
- GSList *table5_group = NULL;
+ GSList *pol_group = NULL;
GtkWidget *sat_pol_hor;
GtkWidget *sat_pol_vert;
GtkWidget *label33;
GtkObject *sat_srate_adj;
GtkWidget *sat_srate;
+ GtkWidget *label35;
+ GtkWidget *sat_fec;
+ GList *sat_fec_items = NULL;
+ GtkWidget *combo_entry4;
GtkWidget *hbuttonbox2;
GtkWidget *sat_ok;
GtkWidget *sat_cancel;
gtk_widget_show (frame13);
gtk_box_pack_start (GTK_BOX (hbox10), frame13, TRUE, TRUE, 0);
- table5 = gtk_table_new (4, 2, FALSE);
+ table5 = gtk_table_new (5, 2, FALSE);
gtk_widget_ref (table5);
gtk_object_set_data_full (GTK_OBJECT (intf_sat), "table5", table5,
(GtkDestroyNotify) gtk_widget_unref);
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label30), 0, 0.5);
- sat_freq_adj = gtk_adjustment_new (12553, 1, 65536, 1, 10, 10);
+ sat_freq_adj = gtk_adjustment_new (11954, 10000, 12999, 1, 10, 10);
sat_freq = gtk_spin_button_new (GTK_ADJUSTMENT (sat_freq_adj), 1, 0);
gtk_widget_ref (sat_freq);
gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_freq", sat_freq,
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label31), 0, 0.5);
- sat_pol_hor = gtk_radio_button_new_with_label (table5_group, _("Horizontal"));
- table5_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sat_pol_hor));
+ sat_pol_hor = gtk_radio_button_new_with_label (pol_group, _("Horizontal"));
+ pol_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sat_pol_hor));
gtk_widget_ref (sat_pol_hor);
gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_pol_hor", sat_pol_hor,
(GtkDestroyNotify) gtk_widget_unref);
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- sat_pol_vert = gtk_radio_button_new_with_label (table5_group, _("Vertical"));
- table5_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sat_pol_vert));
+ sat_pol_vert = gtk_radio_button_new_with_label (pol_group, _("Vertical"));
+ pol_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sat_pol_vert));
gtk_widget_ref (sat_pol_vert);
gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_pol_vert", sat_pol_vert,
(GtkDestroyNotify) gtk_widget_unref);
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label33), 0, 0.5);
- sat_srate_adj = gtk_adjustment_new (27500, 0, 100, 1, 10, 10);
+ sat_srate_adj = gtk_adjustment_new (27500, 1000, 30000, 1, 10, 10);
sat_srate = gtk_spin_button_new (GTK_ADJUSTMENT (sat_srate_adj), 1, 0);
gtk_widget_ref (sat_srate);
gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_srate", sat_srate,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
+ label35 = gtk_label_new (_("FEC"));
+ gtk_widget_ref (label35);
+ gtk_object_set_data_full (GTK_OBJECT (intf_sat), "label35", label35,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label35);
+ gtk_table_attach (GTK_TABLE (table5), label35, 0, 1, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label35), 0, 0.5);
+
+ sat_fec = gtk_combo_new ();
+ gtk_widget_ref (sat_fec);
+ gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_fec", sat_fec,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (sat_fec);
+ gtk_table_attach (GTK_TABLE (table5), sat_fec, 1, 2, 4, 5,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("1/2"));
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("2/3"));
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("3/4"));
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("4/5"));
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("5/6"));
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("6/7"));
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("7/8"));
+ gtk_combo_set_popdown_strings (GTK_COMBO (sat_fec), sat_fec_items);
+ g_list_free (sat_fec_items);
+
+ combo_entry4 = GTK_COMBO (sat_fec)->entry;
+ gtk_widget_ref (combo_entry4);
+ gtk_object_set_data_full (GTK_OBJECT (intf_sat), "combo_entry4", combo_entry4,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (combo_entry4);
+ gtk_entry_set_text (GTK_ENTRY (combo_entry4), _("3/4"));
+
hbuttonbox2 = GNOME_DIALOG (intf_sat)->action_area;
gtk_object_set_data (GTK_OBJECT (intf_sat), "hbuttonbox2", hbuttonbox2);
gtk_widget_show (hbuttonbox2);
<class>GtkTable</class>
<name>table3</name>
<border_width>5</border_width>
- <rows>4</rows>
+ <rows>5</rows>
<columns>2</columns>
<homogeneous>False</homogeneous>
<row_spacing>5</row_spacing>
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
- <value>12553</value>
- <lower>1</lower>
- <upper>65536</upper>
+ <value>11954</value>
+ <lower>10000</lower>
+ <upper>12999</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
<snap>False</snap>
<wrap>False</wrap>
<value>27500</value>
- <lower>1</lower>
- <upper>65536</upper>
+ <lower>1000</lower>
+ <upper>30000</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
<label>Vertical</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
+ <group>pol</group>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<label>Horizontal</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
+ <group>pol</group>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<yfill>False</yfill>
</child>
</widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label27</name>
+ <label>FEC</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkCombo</class>
+ <name>sat_fec</name>
+ <value_in_list>False</value_in_list>
+ <ok_if_empty>True</ok_if_empty>
+ <case_sensitive>False</case_sensitive>
+ <use_arrows>True</use_arrows>
+ <use_arrows_always>False</use_arrows_always>
+ <items>1/2
+2/3
+3/4
+4/5
+5/6
+7/8
+</items>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GtkCombo:entry</child_name>
+ <name>combo-entry1</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>3/4</text>
+ </widget>
+ </widget>
</widget>
</widget>
</widget>
GtkWidget *label24;
GtkWidget *label25;
GtkWidget *label26;
- GSList *table3_group = NULL;
+ GSList *pol_group = NULL;
GtkWidget *sat_pol_vert;
GtkWidget *sat_pol_hor;
+ GtkWidget *label27;
+ GtkWidget *sat_fec;
+ GList *sat_fec_items = NULL;
+ GtkWidget *combo_entry1;
GtkWidget *hbox15;
GtkWidget *hbox16;
GtkWidget *sat_ok;
gtk_widget_show (frame8);
gtk_box_pack_start (GTK_BOX (hbox17), frame8, TRUE, TRUE, 0);
- table3 = gtk_table_new (4, 2, FALSE);
+ table3 = gtk_table_new (5, 2, FALSE);
gtk_widget_ref (table3);
gtk_object_set_data_full (GTK_OBJECT (intf_sat), "table3", table3,
(GtkDestroyNotify) gtk_widget_unref);
gtk_table_set_row_spacings (GTK_TABLE (table3), 5);
gtk_table_set_col_spacings (GTK_TABLE (table3), 5);
- sat_freq_adj = gtk_adjustment_new (12553, 1, 65536, 1, 10, 10);
+ sat_freq_adj = gtk_adjustment_new (11954, 10000, 12999, 1, 10, 10);
sat_freq = gtk_spin_button_new (GTK_ADJUSTMENT (sat_freq_adj), 1, 0);
gtk_widget_ref (sat_freq);
gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_freq", sat_freq,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- sat_srate_adj = gtk_adjustment_new (27500, 1, 65536, 1, 10, 10);
+ sat_srate_adj = gtk_adjustment_new (27500, 1000, 30000, 1, 10, 10);
sat_srate = gtk_spin_button_new (GTK_ADJUSTMENT (sat_srate_adj), 1, 0);
gtk_widget_ref (sat_srate);
gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_srate", sat_srate,
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (label26), 0, 0.5);
- sat_pol_vert = gtk_radio_button_new_with_label (table3_group, _("Vertical"));
- table3_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sat_pol_vert));
+ sat_pol_vert = gtk_radio_button_new_with_label (pol_group, _("Vertical"));
+ pol_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sat_pol_vert));
gtk_widget_ref (sat_pol_vert);
gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_pol_vert", sat_pol_vert,
(GtkDestroyNotify) gtk_widget_unref);
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- sat_pol_hor = gtk_radio_button_new_with_label (table3_group, _("Horizontal"));
- table3_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sat_pol_hor));
+ sat_pol_hor = gtk_radio_button_new_with_label (pol_group, _("Horizontal"));
+ pol_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sat_pol_hor));
gtk_widget_ref (sat_pol_hor);
gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_pol_hor", sat_pol_hor,
(GtkDestroyNotify) gtk_widget_unref);
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
+ label27 = gtk_label_new (_("FEC"));
+ gtk_widget_ref (label27);
+ gtk_object_set_data_full (GTK_OBJECT (intf_sat), "label27", label27,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (label27);
+ gtk_table_attach (GTK_TABLE (table3), label27, 0, 1, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5);
+
+ sat_fec = gtk_combo_new ();
+ gtk_widget_ref (sat_fec);
+ gtk_object_set_data_full (GTK_OBJECT (intf_sat), "sat_fec", sat_fec,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (sat_fec);
+ gtk_table_attach (GTK_TABLE (table3), sat_fec, 1, 2, 4, 5,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("1/2"));
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("2/3"));
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("3/4"));
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("4/5"));
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("5/6"));
+ sat_fec_items = g_list_append (sat_fec_items, (gpointer) _("7/8"));
+ gtk_combo_set_popdown_strings (GTK_COMBO (sat_fec), sat_fec_items);
+ g_list_free (sat_fec_items);
+
+ combo_entry1 = GTK_COMBO (sat_fec)->entry;
+ gtk_widget_ref (combo_entry1);
+ gtk_object_set_data_full (GTK_OBJECT (intf_sat), "combo_entry1", combo_entry1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (combo_entry1);
+ gtk_entry_set_text (GTK_ENTRY (combo_entry1), _("3/4"));
+
hbox15 = GTK_DIALOG (intf_sat)->action_area;
gtk_object_set_data (GTK_OBJECT (intf_sat), "hbox15", hbox15);
gtk_widget_show (hbox15);
* gtk_open.c : functions to handle file/disc/network open widgets.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_open.c,v 1.20 2002/03/25 02:06:24 jobi Exp $
+ * $Id: gtk_open.c,v 1.21 2002/04/15 04:28:26 jobi Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
char * psz_source;
int i_end = p_main->p_playlist->i_size;
int i_freq, i_srate;
+ int i_fec;
boolean_t b_pol;
gtk_widget_hide( p_intf->p_sys->p_sat );
/* Check which polarization was activated */
- if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
- "sat_pol_vert" ) )->active )
+ if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET( button ),
+ "sat_pol_vert" ) )->active )
{
b_pol = 0;
}
{
b_pol = 1;
}
-
+
+ switch( strtol( gtk_entry_get_text( GTK_ENTRY( GTK_COMBO(
+ lookup_widget( GTK_WIDGET( button ), "sat_fec" )
+ )->entry ) ), NULL, 10 ) )
+ {
+ case 1:
+ i_fec = 1;
+ break;
+ case 2:
+ i_fec = 2;
+ break;
+ case 3:
+ i_fec = 3;
+ break;
+ case 4:
+ i_fec = 4;
+ break;
+ case 5:
+ i_fec = 5;
+ break;
+ case 6:
+ i_fec = 6;
+ break;
+ case 7:
+ i_fec = 7;
+ break;
+ default:
+ i_fec = 8; /* this should not happen */
+ }
+
/* Select frequency and symbol rate */
i_freq = gtk_spin_button_get_value_as_int(
GTK_SPIN_BUTTON( lookup_widget(
}
/* Build source name and add it to playlist */
- sprintf( psz_source, "%s:%d,%d,%d",
- "satellite", i_freq, b_pol, i_srate );
+ sprintf( psz_source, "%s:%d,%d,%d,%d",
+ "satellite", i_freq, b_pol, i_fec, i_srate );
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_source );
free( psz_source );
#include "satellite_tools.h"
#define DISEQC 0 /* Wether you should use Diseqc*/
-#define FEC 2 /* FEC */
#define LNB_LOF_1 9750000
#define LNB_LOF_2 10600000
#define LNB_SLOF 11700000
*****************************************************************************/
static int SatelliteOpen( input_thread_t * p_input )
{
- input_socket_t * p_satellite;
- char * psz_parser;
- char * psz_next;
- int i_fd = 0;
- int i_freq = 0;
- int i_srate = 0;
- boolean_t b_pol = 0;
+ input_socket_t * p_satellite;
+ char * psz_parser;
+ char * psz_next;
+ int i_fd = 0;
+ int i_freq = 0;
+ int i_srate = 0;
+ boolean_t b_pol = 0;
+ int i_fec = 1;
+ float f_fec;
/* parse the options passed in command line : */
i_freq = (int)strtol( psz_parser, &psz_next, 10 );
- if ( *psz_next )
+ if( *psz_next )
{
psz_parser = psz_next + 1;
b_pol = (boolean_t)strtol( psz_parser, &psz_next, 10 );
- if ( *psz_next )
+ if( *psz_next )
{
psz_parser = psz_next + 1;
- i_srate = (boolean_t)strtol( psz_parser, &psz_next, 10 );
+ i_fec = (int)strtol( psz_parser, &psz_next, 10 );
+ if( *psz_next )
+ {
+ psz_parser = psz_next + 1;
+ i_srate = (int)strtol( psz_parser, &psz_next, 10 );
+ }
}
}
- i_freq = i_freq ? i_freq : config_GetIntVariable( "sat_frequency" );
- i_srate = i_srate ? i_srate : config_GetIntVariable( "sat_symbol_rate" );
- if ( !b_pol && b_pol != 1 )
+ if( i_freq > 12999 || i_freq < 10000 )
+ {
+ intf_WarnMsg( 1, "input: satellite: invalid frequency, using"\
+ "default one" );
+ i_srate = config_GetIntVariable( "sat_frequency" );
+ }
+
+ if( i_srate > 30000 || i_srate < 1000 )
+ {
+ intf_WarnMsg( 1, "input: satellite: invalid symbol rate, using"\
+ "default one" );
+ i_srate = config_GetIntVariable( "sat_symbol_rate" );
+ }
+
+ if( !b_pol && b_pol != 1 )
+ {
+ intf_WarnMsg( 1, "input: satellite: invalid polarization, using"\
+ "default one" );
b_pol = config_GetIntVariable( "sat_polarization" );
+ }
+
+ if( i_fec > 7 || i_fec < 1 )
+ {
+ intf_WarnMsg( 1, "input: satellite: invalid FEC, using default one" );
+ i_fec = config_GetIntVariable( "sat_fec" );
+ }
+
+ switch( i_fec )
+ {
+ case 1:
+ f_fec = 1./2;
+ break;
+ case 2:
+ f_fec = 2./3;
+ break;
+ case 3:
+ f_fec = 3./4;
+ break;
+ case 4:
+ f_fec = 4./5;
+ break;
+ case 5:
+ f_fec = 5./6;
+ break;
+ case 6:
+ f_fec = 6./7;
+ break;
+ case 7:
+ f_fec = 7./8;
+ break;
+ default:
+ /* cannot happen */
+ }
/* Initialise structure */
/*O_NONBLOCK | O_LARGEFILE*/0 )) == (-1) )
{
intf_ErrMsg( "input error: cannot open file (%s)", strerror(errno) );
+ free( p_satellite );
return -1;
}
/* Initialize the Satellite Card */
- intf_WarnMsg( 2, "Initializing Sat Card with Freq: %d, Pol: %d, Srate: %d",
- i_freq, b_pol, i_srate );
+ 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 )
{
intf_ErrMsg("input: satellite: An error occured when controling SEC");
+ close( p_satellite->i_handle );
+ free( p_satellite );
return -1;
}
intf_WarnMsg( 3, "Initializing Frontend device" );
- switch (ioctl_SetQPSKFrontend ( i_freq * 1000, i_srate* 1000, FEC,
+ switch (ioctl_SetQPSKFrontend ( i_freq * 1000, i_srate* 1000, f_fec,
LNB_LOF_1, LNB_LOF_2, LNB_SLOF))
{
case -2:
- intf_ErrMsg( "input: satellite: Frontend returned\
- an unexpected event" );
+ intf_ErrMsg( "input: satellite: Frontend returned"\
+ "an unexpected event" );
close( p_satellite->i_handle );
free( p_satellite );
return -1;
{
intf_ErrMsg( "input: satellite: An error occured when setting\
filter on PAT" );
+ close( p_satellite->i_handle );
+ free( p_satellite );
return -1;
}
{
intf_ErrMsg( "input: satellite: Not enough memory to allow stream\
structure" );
+ close( p_satellite );
+ free( p_satellite );
return( -1 );
}
p_input->psz_demux = "satellite";
return 0;
-
- }
+}
/*****************************************************************************
* SatelliteClose : Closes the device