Commit d60d933c authored by François Cartegnie's avatar François Cartegnie 🤞

access: dvb: scan: move and simplify parameters debug

parent b58aea11
......@@ -195,39 +195,38 @@ static void scan_parameter_Copy( const scan_parameter_t *p_src, scan_parameter_t
p_dst->sat_info.psz_name = strdup( p_src->sat_info.psz_name );
}
/* */
scan_t *scan_New( vlc_object_t *p_obj, const scan_parameter_t *p_parameter )
static void scan_Debug_Parameters( vlc_object_t *p_obj, const scan_parameter_t *p_parameter )
{
if( p_parameter->type == SCAN_DVB_T )
const char rgc_types[3] = {'T', 'S', 'C' };
if( !p_parameter->type )
return;
msg_Dbg( p_obj, "DVB-%c scanning:", rgc_types[ p_parameter->type - 1 ] );
if( p_parameter->type != SCAN_DVB_S )
{
msg_Dbg( p_obj, "DVB-T scanning:" );
msg_Dbg( p_obj, " - frequency [%d, %d]",
p_parameter->frequency.i_min, p_parameter->frequency.i_max );
msg_Dbg( p_obj, " - bandwidth [%d,%d]",
p_parameter->bandwidth.i_min, p_parameter->bandwidth.i_max );
msg_Dbg( p_obj, " - exhaustive mode %s", p_parameter->b_exhaustive ? "on" : "off" );
}
else if( p_parameter->type == SCAN_DVB_C )
{
msg_Dbg( p_obj, "DVB-C scanning:" );
msg_Dbg( p_obj, " - frequency [%d, %d]",
p_parameter->frequency.i_min, p_parameter->frequency.i_max );
msg_Dbg( p_obj, " - bandwidth [%d,%d]",
p_parameter->bandwidth.i_min, p_parameter->bandwidth.i_max );
msg_Dbg( p_obj, " - exhaustive mode %s", p_parameter->b_exhaustive ? "on" : "off" );
if( p_parameter->type == SCAN_DVB_C )
msg_Dbg( p_obj, " - scannin modulations %s", p_parameter->b_modulation_set ? "off" : "on" );
}
else if( p_parameter->type == SCAN_DVB_S )
{
msg_Dbg( p_obj, "DVB-S scanning:" );
if( p_parameter->type == SCAN_DVB_S )
msg_Dbg( p_obj, " - satellite [%s]", p_parameter->sat_info.psz_name );
}
else
{
return NULL;
}
msg_Dbg( p_obj, " - use NIT %s", p_parameter->b_use_nit ? "on" : "off" );
msg_Dbg( p_obj, " - FTA only %s", p_parameter->b_free_only ? "on" : "off" );
}
/* */
scan_t *scan_New( vlc_object_t *p_obj, const scan_parameter_t *p_parameter )
{
if( p_parameter->type == SCAN_NONE )
return NULL;
scan_t *p_scan = malloc( sizeof( *p_scan ) );
if( unlikely(p_scan == NULL) )
......@@ -241,6 +240,8 @@ scan_t *scan_New( vlc_object_t *p_obj, const scan_parameter_t *p_parameter )
scan_parameter_Copy( p_parameter, &p_scan->parameter );
p_scan->i_time_start = mdate();
scan_Debug_Parameters( p_obj, p_parameter );
return p_scan;
}
......
......@@ -23,7 +23,7 @@
typedef enum
{
SCAN_NONE,
SCAN_NONE = 0,
SCAN_DVB_T,
SCAN_DVB_S,
SCAN_DVB_C,
......
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