p_list = (vlc_list_t *)va_arg( args, vlc_list_t * );
msg_Dbg( p_demux, "DEMUX_SET_GROUP %d %p", i_int, p_list );
- if( p_sys->b_access_control && i_int > 0 && i_int != p_sys->i_current_program )
+ if( i_int == 0 && p_sys->i_current_program > 0 )
+ i_int = p_sys->i_current_program;
+
+ if( p_sys->i_current_program > 0 )
+ {
+ if( p_sys->i_current_program != i_int )
+ SetPrgFilter( p_demux, p_sys->i_current_program, false );
+ }
+ else if( p_sys->i_current_program < 0 )
{
- SetPrgFilter( p_demux, p_sys->i_current_program, false );
+ for( int i = 0; i < p_sys->programs_list.i_count; i++ )
+ SetPrgFilter( p_demux, p_sys->programs_list.p_values[i].i_int, false );
+ }
- /* select new program */
+ if( i_int > 0 )
+ {
p_sys->i_current_program = i_int;
SetPrgFilter( p_demux, p_sys->i_current_program, true );
}
- else if( i_int <= 0 )
+ else if( i_int < 0 )
{
p_sys->i_current_program = -1;
p_sys->programs_list.i_count = 0;
{
p_dst->i_count = p_list->i_count;
for( int i = 0; i < p_list->i_count; i++ )
+ {
p_dst->p_values[i] = p_list->p_values[i];
+ SetPrgFilter( p_demux, p_dst->p_values[i].i_int, true );
+ }
}
}
}
{
demux_sys_t *p_sys = p_demux->p_sys;
- if( !p_sys->b_access_control )
- return false;
if( ( p_sys->i_current_program == -1 && p_sys->programs_list.i_count == 0 ) ||
p_sys->i_current_program == 0 )
return true;
p_srv->b_eit_present, p_srv->i_running_status,
p_srv->b_free_ca );
- if( p_sys->i_current_program != -1 && p_sys->i_current_program != p_srv->i_service_id )
- continue;
-
p_meta = vlc_meta_New();
for( p_dr = p_srv->p_first_descriptor; p_dr; p_dr = p_dr->p_next )
{
vlc_epg_t *p_epg;
msg_Dbg( p_demux, "EITCallBack called" );
- if( !p_eit->b_current_next || ( p_sys->i_current_program != -1 && p_sys->i_current_program != p_eit->i_service_id ) )
+ if( !p_eit->b_current_next )
{
dvbpsi_DeleteEIT( p_eit );
return;
/* Set demux filter */
SetPIDFilter( p_demux, prg->i_pid_pcr, true );
}
- else if ( p_sys->b_access_control )
+ else
{
msg_Warn( p_demux, "skipping program (not selected)" );
dvbpsi_DeletePMT(p_pmt);
p_program->i_pid;
/* Now select PID at access level */
- if( p_sys->b_access_control )
+ if( ProgramIsSelected( p_demux, p_program->i_number ) )
{
- if( ProgramIsSelected( p_demux, p_program->i_number ) )
- {
- if( p_sys->i_current_program == 0 )
- p_sys->i_current_program = p_program->i_number;
+ if( p_sys->i_current_program == 0 )
+ p_sys->i_current_program = p_program->i_number;
- if( SetPIDFilter( p_demux, p_program->i_pid, true ) )
- p_sys->b_access_control = false;
- }
+ if( SetPIDFilter( p_demux, p_program->i_pid, true ) )
+ p_sys->b_access_control = false;
}
}
}