Commit 2673f050 authored by Jean-Paul Saman's avatar Jean-Paul Saman

dvb/access.c removed old commandline syntax

		better debug information
dvb/dvb.c	debug message beautifying
dvb/qpsk.c	textual changes
parent 82608ffe
...@@ -183,7 +183,7 @@ int E_(Open) ( vlc_object_t *p_this ) ...@@ -183,7 +183,7 @@ int E_(Open) ( vlc_object_t *p_this )
strlen( "frequency=" ) ) ) strlen( "frequency=" ) ) )
{ {
u_freq = u_freq =
strtol( psz_parser + strlen( "frequency=" ), (unsigned int)strtol( psz_parser + strlen( "frequency=" ),
&psz_parser, 0 ); &psz_parser, 0 );
} }
else if( !strncmp( psz_parser, "polarization=", else if( !strncmp( psz_parser, "polarization=",
...@@ -340,38 +340,23 @@ int E_(Open) ( vlc_object_t *p_this ) ...@@ -340,38 +340,23 @@ int E_(Open) ( vlc_object_t *p_this )
} }
else else
{ {
msg_Warn(p_input,"DVB Input syntax has changed, please see documentation for further informations"); msg_Err(p_input, "DVB Input old syntax deprecreated, use vlc -p dvb to see an explantion of the new syntax");
u_freq = (unsigned int)i_test; return -1;
if( *psz_next )
{
psz_parser = psz_next + 1;
i_polarisation = strtol( psz_parser, &psz_next, 10 );
if( *psz_next )
{
psz_parser = psz_next + 1;
i_fec = (int)strtol( psz_parser, &psz_next, 10 );
if( *psz_next )
{
psz_parser = psz_next + 1;
u_srate = (unsigned int)strtol( psz_parser, &psz_next, 10 );
}
}
}
} }
/* Validating input values */ /* Validating input values */
if ( ((u_freq) > frontend_info.frequency_max) || if ( ((u_freq) > frontend_info.frequency_max) ||
((u_freq) < frontend_info.frequency_min) ) ((u_freq) < frontend_info.frequency_min) )
{ {
msg_Warn( p_input, "invalid frequency %d (KHz), using default one", u_freq ); if ((u_freq) > frontend_info.frequency_max)
u_freq = config_GetInt( p_input, "frequency" ); msg_Err( p_input, "given frequency %u (kHz) > %u (kHz) max. frequency",
if ( ((u_freq) > frontend_info.frequency_max) || u_freq, frontend_info.frequency_max );
((u_freq) < frontend_info.frequency_min) ) else
{ msg_Err( p_input, "given frequency %u (kHz) < %u (kHz) min.frequency",
msg_Err( p_input, "invalid default frequency" ); u_freq, frontend_info.frequency_min );
msg_Err( p_input, "baling out given frequency outside specification range for this frontend" );
return -1; return -1;
} }
}
/* Workaround for backwards compatibility */ /* Workaround for backwards compatibility */
if (strncmp( p_input->psz_access, "satellite", 9 ) ==0) if (strncmp( p_input->psz_access, "satellite", 9 ) ==0)
...@@ -427,7 +412,7 @@ int E_(Open) ( vlc_object_t *p_this ) ...@@ -427,7 +412,7 @@ int E_(Open) ( vlc_object_t *p_this )
/* DVB-C */ /* DVB-C */
case FE_QAM: case FE_QAM:
fep.frequency = u_freq; /* KHz */ fep.frequency = u_freq; /* in Hz */
fep.inversion = dvb_DecodeInversion(p_input, i_polarisation); fep.inversion = dvb_DecodeInversion(p_input, i_polarisation);
fep.u.qam.symbol_rate = u_srate; fep.u.qam.symbol_rate = u_srate;
fep.u.qam.fec_inner = dvb_DecodeFEC(p_input, i_fec); fep.u.qam.fec_inner = dvb_DecodeFEC(p_input, i_fec);
...@@ -442,7 +427,7 @@ int E_(Open) ( vlc_object_t *p_this ) ...@@ -442,7 +427,7 @@ int E_(Open) ( vlc_object_t *p_this )
/* DVB-T */ /* DVB-T */
case FE_OFDM: case FE_OFDM:
fep.frequency = u_freq; /* KHz */ fep.frequency = u_freq; /* in Hz */
fep.inversion = dvb_DecodeInversion(p_input, i_polarisation); fep.inversion = dvb_DecodeInversion(p_input, i_polarisation);
fep.u.ofdm.bandwidth = dvb_DecodeBandwidth(p_input, i_bandwidth); fep.u.ofdm.bandwidth = dvb_DecodeBandwidth(p_input, i_bandwidth);
fep.u.ofdm.code_rate_HP = dvb_DecodeFEC(p_input, i_code_rate_HP); fep.u.ofdm.code_rate_HP = dvb_DecodeFEC(p_input, i_code_rate_HP);
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <sys/poll.h> #include <sys/poll.h>
/* DVB Card Drivers */ /* DVB Card Drivers */
#include <linux/dvb/version.h>
#include <linux/dvb/dmx.h> #include <linux/dvb/dmx.h>
#include <linux/dvb/frontend.h> #include <linux/dvb/frontend.h>
...@@ -122,65 +123,90 @@ int ioctl_InfoFrontend(input_thread_t * p_input, struct dvb_frontend_info *info, ...@@ -122,65 +123,90 @@ int ioctl_InfoFrontend(input_thread_t * p_input, struct dvb_frontend_info *info,
return -1; return -1;
} }
/* Print out frontend capabilities. */ /* Print out frontend capabilities. */
msg_Dbg(p_input, "Frontend Info:\tname = %s\n\t\tfrequency_min = %d\n\t\tfrequency_max = %d\n\t\tfrequency_stepsize = %d\n\t\tfrequency_tolerance = %d\n\t\tsymbol_rate_min = %d\n\t\tsymbol_rate_max = %d\n\t\tsymbol_rate_tolerance (ppm) = %d\n\t\tnotifier_delay (ms)= %d\n",
info->name, msg_Dbg(p_input, "Frontend Info:" );
info->frequency_min, msg_Dbg(p_input, " name = %s", info->name);
info->frequency_max, switch(info->type)
info->frequency_stepsize, {
info->frequency_tolerance, case FE_QPSK:
info->symbol_rate_min, msg_Dbg(p_input, " type = QPSK (DVB-S)" );
info->symbol_rate_max, break;
info->symbol_rate_tolerance, case FE_QAM:
info->notifier_delay ); msg_Dbg(p_input, " type = QAM (DVB-C)" );
break;
case FE_OFDM:
msg_Dbg(p_input, " type = OFDM (DVB-T)" );
break;
#ifdef 0 /* DVB_API_VERSION == 3 */
case FE_MEMORY:
msg_Dbg(p_input, " type = MEMORY" );
break;
case FE_NET:
msg_Dbg(p_input, " type = NETWORK" );
break;
#endif
default
msg_Err(p_input, " unknown frontend found fe_type_t(%d)", info->type );
return -1;
}
msg_Dbg(p_input, " frequency_min = %u (kHz)", info->frequency_min);
msg_Dbg(p_input, " frequency_max = %u (kHz)", info->frequency_max);
msg_Dbg(p_input, " frequency_stepsize = %u", info->frequency_stepsize);
msg_Dbg(p_input, " frequency_tolerance = %u", info->frequency_tolerance);
msg_Dbg(p_input, " symbol_rate_min = %u (kHz)", info->symbol_rate_min);
msg_Dbg(p_input, " symbol_rate_max = %u (kHz)", info->symbol_rate_max);
msg_Dbg(p_input, " symbol_rate_tolerance (ppm) = %u", info->symbol_rate_tolerance);
msg_Dbg(p_input, " notifier_delay (ms)= %u", info->notifier_delay );
msg_Dbg(p_input, "Frontend Info capability list:"); msg_Dbg(p_input, "Frontend Info capability list:");
if (info->caps&FE_IS_STUPID) if (info->caps&FE_IS_STUPID)
msg_Dbg(p_input, "no capabilities - frontend is stupid!"); msg_Dbg(p_input, " no capabilities - frontend is stupid!");
if (info->caps&FE_CAN_INVERSION_AUTO) if (info->caps&FE_CAN_INVERSION_AUTO)
msg_Dbg(p_input, "inversion auto"); msg_Dbg(p_input, " inversion auto");
if (info->caps&FE_CAN_FEC_1_2) if (info->caps&FE_CAN_FEC_1_2)
msg_Dbg(p_input, "forward error correction 1/2"); msg_Dbg(p_input, " forward error correction 1/2");
if (info->caps&FE_CAN_FEC_2_3) if (info->caps&FE_CAN_FEC_2_3)
msg_Dbg(p_input, "forward error correction 2/3"); msg_Dbg(p_input, " forward error correction 2/3");
if (info->caps&FE_CAN_FEC_3_4) if (info->caps&FE_CAN_FEC_3_4)
msg_Dbg(p_input, "forward error correction 3/4"); msg_Dbg(p_input, " forward error correction 3/4");
if (info->caps&FE_CAN_FEC_4_5) if (info->caps&FE_CAN_FEC_4_5)
msg_Dbg(p_input, "forward error correction 4/5"); msg_Dbg(p_input, " forward error correction 4/5");
if (info->caps&FE_CAN_FEC_5_6) if (info->caps&FE_CAN_FEC_5_6)
msg_Dbg(p_input, "forward error correction 5/6"); msg_Dbg(p_input, " forward error correction 5/6");
if (info->caps&FE_CAN_FEC_6_7) if (info->caps&FE_CAN_FEC_6_7)
msg_Dbg(p_input, "forward error correction 6/7"); msg_Dbg(p_input, " forward error correction 6/7");
if (info->caps&FE_CAN_FEC_7_8) if (info->caps&FE_CAN_FEC_7_8)
msg_Dbg(p_input, "forward error correction 7/8"); msg_Dbg(p_input, " forward error correction 7/8");
if (info->caps&FE_CAN_FEC_8_9) if (info->caps&FE_CAN_FEC_8_9)
msg_Dbg(p_input, "forward error correction 8/9"); msg_Dbg(p_input, " forward error correction 8/9");
if (info->caps&FE_CAN_FEC_AUTO) if (info->caps&FE_CAN_FEC_AUTO)
msg_Dbg(p_input, "forward error correction auto"); msg_Dbg(p_input, " forward error correction auto");
if (info->caps&FE_CAN_QPSK) if (info->caps&FE_CAN_QPSK)
msg_Dbg(p_input, "card can do QPSK"); msg_Dbg(p_input, " card can do QPSK");
if (info->caps&FE_CAN_QAM_16) if (info->caps&FE_CAN_QAM_16)
msg_Dbg(p_input, "card can do QAM 16"); msg_Dbg(p_input, " card can do QAM 16");
if (info->caps&FE_CAN_QAM_32) if (info->caps&FE_CAN_QAM_32)
msg_Dbg(p_input, "card can do QAM 32"); msg_Dbg(p_input, " card can do QAM 32");
if (info->caps&FE_CAN_QAM_64) if (info->caps&FE_CAN_QAM_64)
msg_Dbg(p_input, "card can do QAM 64"); msg_Dbg(p_input, " card can do QAM 64");
if (info->caps&FE_CAN_QAM_128) if (info->caps&FE_CAN_QAM_128)
msg_Dbg(p_input, "card can do QAM 128"); msg_Dbg(p_input, " card can do QAM 128");
if (info->caps&FE_CAN_QAM_256) if (info->caps&FE_CAN_QAM_256)
msg_Dbg(p_input, "card can do QAM 256"); msg_Dbg(p_input, " card can do QAM 256");
if (info->caps&FE_CAN_QAM_AUTO) if (info->caps&FE_CAN_QAM_AUTO)
msg_Dbg(p_input, "card can do QAM auto"); msg_Dbg(p_input, " card can do QAM auto");
if (info->caps&FE_CAN_TRANSMISSION_MODE_AUTO) if (info->caps&FE_CAN_TRANSMISSION_MODE_AUTO)
msg_Dbg(p_input, "transmission mode auto"); msg_Dbg(p_input, " transmission mode auto");
if (info->caps&FE_CAN_BANDWIDTH_AUTO) if (info->caps&FE_CAN_BANDWIDTH_AUTO)
msg_Dbg(p_input, "bandwidth mode auto"); msg_Dbg(p_input, " bandwidth mode auto");
if (info->caps&FE_CAN_GUARD_INTERVAL_AUTO) if (info->caps&FE_CAN_GUARD_INTERVAL_AUTO)
msg_Dbg(p_input, "guard interval mode auto"); msg_Dbg(p_input, " guard interval mode auto");
if (info->caps&FE_CAN_HIERARCHY_AUTO) if (info->caps&FE_CAN_HIERARCHY_AUTO)
msg_Dbg(p_input, "hierarchy mode auto"); msg_Dbg(p_input, " hierarchy mode auto");
if (info->caps&FE_CAN_MUTE_TS) if (info->caps&FE_CAN_MUTE_TS)
msg_Dbg(p_input, "card can mute TS"); msg_Dbg(p_input, " card can mute TS");
if (info->caps&FE_CAN_CLEAN_SETUP) if (info->caps&FE_CAN_CLEAN_SETUP)
msg_Dbg(p_input, "clean setup"); msg_Dbg(p_input, " clean setup");
msg_Dbg(p_input,"End of capability list"); msg_Dbg(p_input,"End of capability list");
close(front); close(front);
......
...@@ -47,7 +47,7 @@ void E_(Close) ( vlc_object_t * ); ...@@ -47,7 +47,7 @@ void E_(Close) ( vlc_object_t * );
#define DEVICE_TEXT N_("Device number to use on adapter") #define DEVICE_TEXT N_("Device number to use on adapter")
#define DEVICE_LONGTEXT "" #define DEVICE_LONGTEXT ""
#define FREQ_TEXT N_("Satellite transponder frequency in kHz") #define FREQ_TEXT N_("Satellite transponder frequency in kHz for DVB-S and in Hz for DVB-C/T")
#define FREQ_LONGTEXT "" #define FREQ_LONGTEXT ""
#define POL_TEXT N_("Satellite transponder polarization") #define POL_TEXT N_("Satellite transponder polarization")
......
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