Commit 039f088a authored by François Cartegnie's avatar François Cartegnie 🤞

access: dvb: unbind frontend code from access_t

parent 99fdf119
......@@ -145,16 +145,16 @@ static int Open( vlc_object_t *p_this )
return VLC_EGENERIC; /* let the DTV plugin do the work */
/* Getting frontend info */
if( FrontendOpen( p_access) )
if( FrontendOpen( p_this, &p_sys->dvb, p_access->psz_access ) )
{
free( p_sys );
return VLC_EGENERIC;
}
/* Opening DVR device */
if( DVROpen( p_access ) < 0 )
if( DVROpen( p_this, &p_sys->dvb ) < 0 )
{
FrontendClose( p_access );
FrontendClose( p_this, &p_sys->dvb );
free( p_sys );
return VLC_EGENERIC;
}
......@@ -166,7 +166,7 @@ static int Open( vlc_object_t *p_this )
parameter.b_use_nit = var_InheritBool( p_access, "dvb-scan-nit" );
if( FrontendFillScanParameter( p_access, &parameter ) ||
if( FrontendFillScanParameter( p_this, &p_sys->dvb, &parameter ) ||
(p_scan = scan_New( VLC_OBJECT(p_access), &parameter,
ScanFrontendTuningHandler,
ScanStatsCallback,
......@@ -200,8 +200,8 @@ static void Close( vlc_object_t *p_this )
FilterUnset( p_access, MAX_DEMUX );
DVRClose( p_access );
FrontendClose( p_access );
DVRClose( p_this, &p_sys->dvb );
FrontendClose( p_this, &p_sys->dvb );
scan_Destroy( p_sys->scan );
free( p_sys );
......@@ -226,7 +226,7 @@ static int ScanFrontendTuningHandler( scan_t *p_scan, void *p_privdata,
msg_Dbg( p_access, " bandwidth %d", p_cfg->i_bandwidth );
/* Setting frontend parameters for tuning the hardware */
if( FrontendSet( p_access ) < 0 )
if( FrontendSet( VLC_OBJECT(p_access), &p_access->p_sys->dvb ) < 0 )
{
msg_Err( p_access, "Failed to tune the frontend" );
return VLC_EGENERIC;
......@@ -241,7 +241,7 @@ static int ScanStatsCallback( scan_t *p_scan, void *p_privdata, int *pi_snr )
VLC_UNUSED(p_scan);
frontend_statistic_t stat;
if( !FrontendGetStatistic( p_access, &stat ) )
if( !FrontendGetStatistic( &p_access->p_sys->dvb, &stat ) )
{
*pi_snr = stat.i_snr;
return VLC_SUCCESS;
......@@ -272,13 +272,13 @@ static int ScanReadCallback( scan_t *p_scan, void *p_privdata,
/* Initialize file descriptor sets */
struct pollfd ufds[2];
ufds[0].fd = p_sys->i_handle;
ufds[0].fd = p_sys->dvb.i_handle;
ufds[0].events = POLLIN;
ufds[1].fd = p_sys->i_frontend_handle;
ufds[1].fd = p_sys->dvb.i_frontend_handle;
ufds[1].events = POLLPRI;
frontend_status_t status;
FrontendGetStatus( p_access, &status );
FrontendGetStatus( &p_sys->dvb, &status );
bool b_has_lock = status.b_has_lock;
mtime_t i_scan_start = mdate();
......@@ -316,9 +316,9 @@ static int ScanReadCallback( scan_t *p_scan, void *p_privdata,
if( ufds[1].revents )
{
FrontendPoll( p_access );
FrontendPoll( VLC_OBJECT(p_access), &p_sys->dvb );
FrontendGetStatus( p_access, &status );
FrontendGetStatus( &p_sys->dvb, &status );
if( status.b_has_lock && !b_has_lock )
{
i_scan_start = mdate();
......@@ -330,7 +330,7 @@ static int ScanReadCallback( scan_t *p_scan, void *p_privdata,
{
for( size_t i=0; i<i_packets_max; i++ )
{
ssize_t i_read = read( p_sys->i_handle, p_packet, TS_PACKET_SIZE * i_packets_max );
ssize_t i_read = read( p_sys->dvb.i_handle, p_packet, TS_PACKET_SIZE * i_packets_max );
if( i_read < 0 )
{
msg_Warn( p_access, "read failed: %s", vlc_strerror_c(errno) );
......@@ -403,7 +403,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
pf2 = (double*)va_arg( args, double * );
*pf1 = *pf2 = 0;
if( !FrontendGetStatistic( p_access, &stat ) )
if( !FrontendGetStatistic( &p_access->p_sys->dvb, &stat ) )
{
*pf1 = (double)stat.i_snr / 65535.0;
*pf2 = (double)stat.i_signal_strenth / 65535.0;
......@@ -441,7 +441,7 @@ static void FilterSet( access_t *p_access, int i_pid, int i_type )
return;
}
if( DMXSetFilter( p_access, i_pid,
if( DMXSetFilter( VLC_OBJECT(p_access), i_pid,
&p_sys->p_demux_handles[i].i_handle, i_type ) )
{
msg_Err( p_access, "DMXSetFilter failed" );
......@@ -460,7 +460,7 @@ static void FilterUnset( access_t *p_access, int i_max )
{
if( p_sys->p_demux_handles[i].i_type )
{
DMXUnsetFilter( p_access, p_sys->p_demux_handles[i].i_handle );
DMXUnsetFilter( VLC_OBJECT(p_access), p_sys->p_demux_handles[i].i_handle );
p_sys->p_demux_handles[i].i_type = 0;
}
}
......
......@@ -54,12 +54,18 @@ typedef struct
struct scan_t;
struct scan_parameter_t;
struct access_sys_t
typedef struct
{
int i_handle, i_frontend_handle;
demux_handle_t p_demux_handles[MAX_DEMUX];
frontend_t *p_frontend;
} dvb_sys_t;
struct access_sys_t
{
demux_handle_t p_demux_handles[MAX_DEMUX];
dvb_sys_t dvb;
/* Scan */
struct scan_t *scan;
};
......@@ -76,17 +82,17 @@ struct access_sys_t
* Prototypes
*****************************************************************************/
int FrontendOpen( access_t * );
void FrontendPoll( access_t *p_access );
int FrontendSet( access_t * );
void FrontendClose( access_t * );
int FrontendOpen( vlc_object_t *, dvb_sys_t *, const char * );
void FrontendPoll( vlc_object_t *, dvb_sys_t * );
int FrontendSet( vlc_object_t *, dvb_sys_t * );
void FrontendClose( vlc_object_t *, dvb_sys_t * );
int FrontendGetStatistic( access_t *, frontend_statistic_t * );
void FrontendGetStatus( access_t *, frontend_status_t * );
int FrontendFillScanParameter( access_t *, struct scan_parameter_t * );
int FrontendGetStatistic( dvb_sys_t *, frontend_statistic_t * );
void FrontendGetStatus( dvb_sys_t *, frontend_status_t * );
int FrontendFillScanParameter( vlc_object_t *, dvb_sys_t *, struct scan_parameter_t * );
int DMXSetFilter( access_t *, int i_pid, int * pi_fd, int i_type );
int DMXUnsetFilter( access_t *, int i_fd );
int DMXSetFilter( vlc_object_t *, int i_pid, int * pi_fd, int i_type );
int DMXUnsetFilter( vlc_object_t *, int i_fd );
int DVROpen( access_t * );
void DVRClose( access_t * );
int DVROpen( vlc_object_t *, dvb_sys_t * );
void DVRClose( vlc_object_t *, dvb_sys_t * );
......@@ -63,18 +63,17 @@ struct frontend_t
#define FRONTEND_LOCK_TIMEOUT 10000000 /* 10 s */
/* Local prototypes */
static int FrontendInfo( access_t * );
static int FrontendSetQPSK( access_t * );
static int FrontendSetQAM( access_t * );
static int FrontendSetOFDM( access_t * );
static int FrontendSetATSC( access_t * );
static int FrontendInfo( vlc_object_t *, dvb_sys_t * );
static int FrontendSetQPSK( vlc_object_t *, dvb_sys_t * );
static int FrontendSetQAM( vlc_object_t *, dvb_sys_t * );
static int FrontendSetOFDM( vlc_object_t *, dvb_sys_t * );
static int FrontendSetATSC( vlc_object_t *, dvb_sys_t * );
/*****************************************************************************
* FrontendOpen : Determine frontend device information and capabilities
*****************************************************************************/
int FrontendOpen( access_t *p_access )
int FrontendOpen( vlc_object_t *p_access, dvb_sys_t *p_sys, const char *psz_access )
{
access_sys_t *p_sys = p_access->p_sys;
frontend_t * p_frontend;
unsigned int i_adapter, i_device;
bool b_probe;
......@@ -108,7 +107,7 @@ int FrontendOpen( access_t *p_access )
const char * psz_expected = NULL;
const char * psz_real;
if( FrontendInfo( p_access ) < 0 )
if( FrontendInfo( p_access, p_sys ) < 0 )
{
vlc_close( p_sys->i_frontend_handle );
free( p_frontend );
......@@ -134,28 +133,28 @@ int FrontendOpen( access_t *p_access )
}
/* Sanity checks */
if( (!strncmp( p_access->psz_access, "qpsk", 4 ) ||
!strncmp( p_access->psz_access, "dvb-s", 5 ) ||
!strncmp( p_access->psz_access, "satellite", 9 ) ) &&
if( (!strncmp( psz_access, "qpsk", 4 ) ||
!strncmp( psz_access, "dvb-s", 5 ) ||
!strncmp( psz_access, "satellite", 9 ) ) &&
(p_frontend->info.type != FE_QPSK) )
{
psz_expected = "DVB-S";
}
if( (!strncmp( p_access->psz_access, "cable", 5 ) ||
!strncmp( p_access->psz_access, "dvb-c", 5 ) ) &&
if( (!strncmp( psz_access, "cable", 5 ) ||
!strncmp( psz_access, "dvb-c", 5 ) ) &&
(p_frontend->info.type != FE_QAM) )
{
psz_expected = "DVB-C";
}
if( (!strncmp( p_access->psz_access, "terrestrial", 11 ) ||
!strncmp( p_access->psz_access, "dvb-t", 5 ) ) &&
if( (!strncmp( psz_access, "terrestrial", 11 ) ||
!strncmp( psz_access, "dvb-t", 5 ) ) &&
(p_frontend->info.type != FE_OFDM) )
{
psz_expected = "DVB-T";
}
if( (!strncmp( p_access->psz_access, "usdigital", 9 ) ||
!strncmp( p_access->psz_access, "atsc", 4 ) ) &&
if( (!strncmp( psz_access, "usdigital", 9 ) ||
!strncmp( psz_access, "atsc", 4 ) ) &&
(p_frontend->info.type != FE_ATSC) )
{
psz_expected = "ATSC";
......@@ -174,19 +173,19 @@ int FrontendOpen( access_t *p_access )
{
msg_Dbg( p_access, "using default values for frontend info" );
msg_Dbg( p_access, "method of access is %s", p_access->psz_access );
msg_Dbg( p_access, "method of access is %s", psz_access );
p_frontend->info.type = FE_QPSK;
if( !strncmp( p_access->psz_access, "qpsk", 4 ) ||
!strncmp( p_access->psz_access, "dvb-s", 5 ) )
if( !strncmp( psz_access, "qpsk", 4 ) ||
!strncmp( psz_access, "dvb-s", 5 ) )
p_frontend->info.type = FE_QPSK;
else if( !strncmp( p_access->psz_access, "cable", 5 ) ||
!strncmp( p_access->psz_access, "dvb-c", 5 ) )
else if( !strncmp( psz_access, "cable", 5 ) ||
!strncmp( psz_access, "dvb-c", 5 ) )
p_frontend->info.type = FE_QAM;
else if( !strncmp( p_access->psz_access, "terrestrial", 11 ) ||
!strncmp( p_access->psz_access, "dvb-t", 5 ) )
else if( !strncmp( psz_access, "terrestrial", 11 ) ||
!strncmp( psz_access, "dvb-t", 5 ) )
p_frontend->info.type = FE_OFDM;
else if( !strncmp( p_access->psz_access, "usdigital", 9 ) ||
!strncmp( p_access->psz_access, "atsc", 4 ) )
else if( !strncmp( psz_access, "usdigital", 9 ) ||
!strncmp( psz_access, "atsc", 4 ) )
p_frontend->info.type = FE_ATSC;
}
......@@ -196,10 +195,9 @@ int FrontendOpen( access_t *p_access )
/*****************************************************************************
* FrontendClose : Close the frontend
*****************************************************************************/
void FrontendClose( access_t *p_access )
void FrontendClose( vlc_object_t *p_access, dvb_sys_t *p_sys )
{
access_sys_t *p_sys = p_access->p_sys;
VLC_UNUSED(p_access);
if( p_sys->p_frontend )
{
vlc_close( p_sys->i_frontend_handle );
......@@ -212,15 +210,13 @@ void FrontendClose( access_t *p_access )
/*****************************************************************************
* FrontendSet : Tune !
*****************************************************************************/
int FrontendSet( access_t *p_access )
int FrontendSet( vlc_object_t *p_access, dvb_sys_t *p_sys )
{
access_sys_t *p_sys = p_access->p_sys;
switch( p_sys->p_frontend->info.type )
{
/* DVB-S */
case FE_QPSK:
if( FrontendSetQPSK( p_access ) )
if( FrontendSetQPSK( p_access, p_sys ) )
{
msg_Err( p_access, "DVB-S tuning error" );
return VLC_EGENERIC;
......@@ -229,7 +225,7 @@ int FrontendSet( access_t *p_access )
/* DVB-C */
case FE_QAM:
if( FrontendSetQAM( p_access ) )
if( FrontendSetQAM( p_access, p_sys ) )
{
msg_Err( p_access, "DVB-C tuning error" );
return VLC_EGENERIC;
......@@ -238,7 +234,7 @@ int FrontendSet( access_t *p_access )
/* DVB-T */
case FE_OFDM:
if( FrontendSetOFDM( p_access ) )
if( FrontendSetOFDM( p_access, p_sys ) )
{
msg_Err( p_access, "DVB-T tuning error" );
return VLC_EGENERIC;
......@@ -247,7 +243,7 @@ int FrontendSet( access_t *p_access )
/* ATSC */
case FE_ATSC:
if( FrontendSetATSC( p_access ) )
if( FrontendSetATSC( p_access, p_sys ) )
{
msg_Err( p_access, "ATSC tuning error" );
return VLC_EGENERIC;
......@@ -260,16 +256,14 @@ int FrontendSet( access_t *p_access )
return VLC_EGENERIC;
}
p_sys->p_frontend->i_last_status = 0;
p_sys->i_frontend_timeout = mdate() + FRONTEND_LOCK_TIMEOUT;
return VLC_SUCCESS;
}
/*****************************************************************************
* FrontendPoll : Poll for frontend events
*****************************************************************************/
void FrontendPoll( access_t *p_access )
void FrontendPoll( vlc_object_t *p_access, dvb_sys_t *p_sys )
{
access_sys_t *p_sys = p_access->p_sys;
frontend_t * p_frontend = p_sys->p_frontend;
struct dvb_frontend_event event;
fe_status_t i_status, i_diff;
......@@ -322,7 +316,7 @@ void FrontendPoll( access_t *p_access )
msg_Dbg( p_access, "frontend has acquired lock" );
/* Read some statistics */
if( !FrontendGetStatistic( p_access, &stat ) )
if( !FrontendGetStatistic( p_sys, &stat ) )
{
if( stat.i_ber >= 0 )
msg_Dbg( p_access, "- Bit error rate: %d", stat.i_ber );
......@@ -341,16 +335,15 @@ void FrontendPoll( access_t *p_access )
{
/* The frontend was reinited. */
msg_Warn( p_access, "reiniting frontend");
FrontendSet( p_access );
FrontendSet( p_access, p_sys );
}
}
#undef IF_UP
}
}
int FrontendGetStatistic( access_t *p_access, frontend_statistic_t *p_stat )
int FrontendGetStatistic( dvb_sys_t *p_sys, frontend_statistic_t *p_stat )
{
access_sys_t *p_sys = p_access->p_sys;
frontend_t * p_frontend = p_sys->p_frontend;
if( (p_frontend->i_last_status & FE_HAS_LOCK) == 0 )
......@@ -367,9 +360,8 @@ int FrontendGetStatistic( access_t *p_access, frontend_statistic_t *p_stat )
return VLC_SUCCESS;
}
void FrontendGetStatus( access_t *p_access, frontend_status_t *p_status )
void FrontendGetStatus( dvb_sys_t *p_sys, frontend_status_t *p_status )
{
access_sys_t *p_sys = p_access->p_sys;
frontend_t * p_frontend = p_sys->p_frontend;
p_status->b_has_signal = (p_frontend->i_last_status & FE_HAS_SIGNAL) != 0;
......@@ -377,9 +369,9 @@ void FrontendGetStatus( access_t *p_access, frontend_status_t *p_status )
p_status->b_has_lock = (p_frontend->i_last_status & FE_HAS_LOCK) != 0;
}
static int ScanParametersDvbS( access_t *p_access, scan_parameter_t *p_scan )
static int ScanParametersDvbS( vlc_object_t *p_access, dvb_sys_t *p_sys, scan_parameter_t *p_scan )
{
const frontend_t *p_frontend = p_access->p_sys->p_frontend;
const frontend_t *p_frontend = p_sys->p_frontend;
p_scan->type = SCAN_DVB_S;
......@@ -403,9 +395,9 @@ static int ScanParametersDvbS( access_t *p_access, scan_parameter_t *p_scan )
return VLC_SUCCESS;
}
static int ScanParametersDvbC( access_t *p_access, scan_parameter_t *p_scan )
static int ScanParametersDvbC( vlc_object_t *p_access, dvb_sys_t *p_sys, scan_parameter_t *p_scan )
{
const frontend_t *p_frontend = p_access->p_sys->p_frontend;
const frontend_t *p_frontend = p_sys->p_frontend;
p_scan->type = SCAN_DVB_C;
p_scan->b_exhaustive = false;
......@@ -441,9 +433,9 @@ static int ScanParametersDvbC( access_t *p_access, scan_parameter_t *p_scan )
return VLC_SUCCESS;
}
static int ScanParametersDvbT( access_t *p_access, scan_parameter_t *p_scan )
static int ScanParametersDvbT( vlc_object_t *p_access, dvb_sys_t *p_sys, scan_parameter_t *p_scan )
{
const frontend_t *p_frontend = p_access->p_sys->p_frontend;
const frontend_t *p_frontend = p_sys->p_frontend;
p_scan->type = SCAN_DVB_T;
p_scan->b_exhaustive = false;
......@@ -466,17 +458,16 @@ static int ScanParametersDvbT( access_t *p_access, scan_parameter_t *p_scan )
return VLC_SUCCESS;
}
int FrontendFillScanParameter( access_t *p_access, scan_parameter_t *p_scan )
int FrontendFillScanParameter( vlc_object_t *p_access, dvb_sys_t *p_sys, scan_parameter_t *p_scan )
{
access_sys_t *p_sys = p_access->p_sys;
const frontend_t *p_frontend = p_sys->p_frontend;
if( p_frontend->info.type == FE_OFDM ) /* DVB-T */
return ScanParametersDvbT( p_access, p_scan );
return ScanParametersDvbT( p_access, p_sys, p_scan );
else if( p_frontend->info.type == FE_QAM ) /* DVB-C */
return ScanParametersDvbC( p_access, p_scan );
return ScanParametersDvbC( p_access, p_sys, p_scan );
else if( p_frontend->info.type == FE_QPSK )
return ScanParametersDvbS( p_access, p_scan ); /* DVB-S */
return ScanParametersDvbS( p_access, p_sys, p_scan ); /* DVB-S */
msg_Err( p_access, "frontend scanning not supported" );
return VLC_EGENERIC;
......@@ -485,9 +476,8 @@ int FrontendFillScanParameter( access_t *p_access, scan_parameter_t *p_scan )
/*****************************************************************************
* FrontendInfo : Return information about given frontend
*****************************************************************************/
static int FrontendInfo( access_t *p_access )
static int FrontendInfo( vlc_object_t *p_access, dvb_sys_t *p_sys )
{
access_sys_t *p_sys = p_access->p_sys;
frontend_t *p_frontend = p_sys->p_frontend;
/* Determine type of frontend */
......@@ -517,10 +507,10 @@ static int FrontendInfo( access_t *p_access )
break;
#if 0 /* DVB_API_VERSION == 3 */
case FE_MEMORY:
msg_Dbg(p_access, " type = MEMORY" );
msg_Dbg( p_access, " type = MEMORY" );
break;
case FE_NET:
msg_Dbg(p_access, " type = NETWORK" );
msg_Dbg( p_access, " type = NETWORK" );
break;
#endif
default:
......@@ -619,7 +609,7 @@ static int FrontendInfo( access_t *p_access )
/*****************************************************************************
* Decoding the DVB parameters (common)
*****************************************************************************/
static fe_spectral_inversion_t DecodeInversion( access_t *p_access )
static fe_spectral_inversion_t DecodeInversion( vlc_object_t *p_access )
{
int i_val;
fe_spectral_inversion_t fe_inversion = 0;
......@@ -643,7 +633,7 @@ static fe_spectral_inversion_t DecodeInversion( access_t *p_access )
/*****************************************************************************
* FrontendSetQPSK : controls the FE device
*****************************************************************************/
static fe_sec_voltage_t DecodeVoltage( access_t *p_access )
static fe_sec_voltage_t DecodeVoltage( vlc_object_t *p_access )
{
switch( var_GetInteger( p_access, "dvb-voltage" ) )
{
......@@ -654,7 +644,7 @@ static fe_sec_voltage_t DecodeVoltage( access_t *p_access )
}
}
static fe_sec_tone_mode_t DecodeTone( access_t *p_access )
static fe_sec_tone_mode_t DecodeTone( vlc_object_t *p_access )
{
switch( var_GetInteger( p_access, "dvb-tone" ) )
{
......@@ -670,9 +660,8 @@ struct diseqc_cmd_t
uint32_t wait;
};
static int DoDiseqc( access_t *p_access )
static int DoDiseqc( vlc_object_t *p_access, dvb_sys_t *p_sys )
{
access_sys_t *p_sys = p_access->p_sys;
int i_val;
bool b_val;
int i_frequency, i_lnb_slof;
......@@ -773,9 +762,8 @@ static int DoDiseqc( access_t *p_access )
return 0;
}
static int FrontendSetQPSK( access_t *p_access )
static int FrontendSetQPSK( vlc_object_t *p_access, dvb_sys_t *p_sys )
{
access_sys_t *p_sys = p_access->p_sys;
struct dvb_frontend_parameters fep;
int i_val;
int i_frequency, i_lnb_slof = 0, i_lnb_lof1, i_lnb_lof2 = 0;
......@@ -852,7 +840,7 @@ static int FrontendSetQPSK( access_t *p_access )
fep.u.qpsk.fec_inner = FEC_NONE;
if( DoDiseqc( p_access ) < 0 )
if( DoDiseqc( p_access, p_sys ) < 0 )
{
return VLC_EGENERIC;
}
......@@ -879,9 +867,8 @@ static int FrontendSetQPSK( access_t *p_access )
/*****************************************************************************
* FrontendSetQAM : controls the FE device
*****************************************************************************/
static int FrontendSetQAM( access_t *p_access )
static int FrontendSetQAM( vlc_object_t *p_access, dvb_sys_t *p_sys )
{
access_sys_t *p_sys = p_access->p_sys;
frontend_t *p_frontend = p_sys->p_frontend;
struct dvb_frontend_parameters fep;
unsigned int i_val;
......@@ -927,7 +914,7 @@ static int FrontendSetQAM( access_t *p_access )
/*****************************************************************************
* FrontendSetOFDM : controls the FE device
*****************************************************************************/
static fe_bandwidth_t DecodeBandwidth( access_t *p_access )
static fe_bandwidth_t DecodeBandwidth( vlc_object_t *p_access )
{
fe_bandwidth_t fe_bandwidth = 0;
int i_bandwidth = var_GetInteger( p_access, "dvb-bandwidth" );
......@@ -948,7 +935,7 @@ static fe_bandwidth_t DecodeBandwidth( access_t *p_access )
return fe_bandwidth;
}
static fe_transmit_mode_t DecodeTransmission( access_t *p_access )
static fe_transmit_mode_t DecodeTransmission( vlc_object_t *p_access )
{
fe_transmit_mode_t fe_transmission = 0;
int i_transmission = var_GetInteger( p_access, "dvb-transmission" );
......@@ -968,7 +955,7 @@ static fe_transmit_mode_t DecodeTransmission( access_t *p_access )
return fe_transmission;
}
static fe_hierarchy_t DecodeHierarchy( access_t *p_access )
static fe_hierarchy_t DecodeHierarchy( vlc_object_t *p_access )
{
fe_hierarchy_t fe_hierarchy = 0;
int i_hierarchy = var_GetInteger( p_access, "dvb-hierarchy" );
......@@ -990,9 +977,8 @@ static fe_hierarchy_t DecodeHierarchy( access_t *p_access )
return fe_hierarchy;
}
static int FrontendSetOFDM( access_t * p_access )
static int FrontendSetOFDM( vlc_object_t *p_access, dvb_sys_t *p_sys )
{
access_sys_t *p_sys = p_access->p_sys;
struct dvb_frontend_parameters fep;
/* Prepare the fep structure */
......@@ -1031,9 +1017,8 @@ static int FrontendSetOFDM( access_t * p_access )
/*****************************************************************************
* FrontendSetATSC : controls the FE device
*****************************************************************************/
static int FrontendSetATSC( access_t *p_access )
static int FrontendSetATSC( vlc_object_t *p_access, dvb_sys_t *p_sys )
{
access_sys_t *p_sys = p_access->p_sys;
struct dvb_frontend_parameters fep;
/* Prepare the fep structure */
......@@ -1068,7 +1053,7 @@ static int FrontendSetATSC( access_t *p_access )
/*****************************************************************************
* DMXSetFilter : controls the demux to add a filter
*****************************************************************************/
int DMXSetFilter( access_t * p_access, int i_pid, int * pi_fd, int i_type )
int DMXSetFilter( vlc_object_t *p_access, int i_pid, int * pi_fd, int i_type )
{
struct dmx_pes_filter_params s_filter_params;
unsigned int i_adapter, i_device;
......@@ -1204,7 +1189,7 @@ int DMXSetFilter( access_t * p_access, int i_pid, int * pi_fd, int i_type )
/*****************************************************************************
* DMXUnsetFilter : removes a filter
*****************************************************************************/
int DMXUnsetFilter( access_t * p_access, int i_fd )
int DMXUnsetFilter( vlc_object_t *p_access, int i_fd )
{
if( ioctl( i_fd, DMX_STOP ) < 0 )
{
......@@ -1226,9 +1211,8 @@ int DMXUnsetFilter( access_t * p_access, int i_fd )
/*****************************************************************************
* DVROpen :
*****************************************************************************/
int DVROpen( access_t * p_access )
int DVROpen( vlc_object_t *p_access, dvb_sys_t *p_sys )
{
access_sys_t *p_sys = p_access->p_sys;
unsigned int i_adapter, i_device;
char dvr[128];
......@@ -1262,9 +1246,8 @@ int DVROpen( access_t * p_access )
/*****************************************************************************
* DVRClose :
*****************************************************************************/
void DVRClose( access_t * p_access )
void DVRClose( vlc_object_t *p_access, dvb_sys_t *p_sys )
{
access_sys_t *p_sys = p_access->p_sys;
VLC_UNUSED(p_access);
vlc_close( p_sys->i_handle );
}
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