[vlc-commits] access: dvb: scan: update snr and transponder
Francois Cartegnie
git at videolan.org
Tue May 3 18:45:43 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue May 3 16:44:22 2016 +0200| [a62256c588bf17269d178db79dfa4b44fac16b34] | committer: Francois Cartegnie
access: dvb: scan: update snr and transponder
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a62256c588bf17269d178db79dfa4b44fac16b34
---
modules/access/dvb/scan.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/modules/access/dvb/scan.c b/modules/access/dvb/scan.c
index eb6bdca..f212d7c 100644
--- a/modules/access/dvb/scan.c
+++ b/modules/access/dvb/scan.c
@@ -943,9 +943,9 @@ static bool GetOtherTsSDT( scan_session_t *p_session, uint16_t i_ts_id,
}
static void ParsePAT( vlc_object_t *p_obj, scan_t *p_scan,
- const dvbpsi_pat_t *p_pat, const scan_tuner_config_t *p_cfg )
+ const dvbpsi_pat_t *p_pat, const scan_tuner_config_t *p_cfg,
+ int i_snr )
{
- VLC_UNUSED(p_obj);
/* PAT must not create new service without proper config ( local ) */
if( !p_cfg )
return;
@@ -954,6 +954,15 @@ static void ParsePAT( vlc_object_t *p_obj, scan_t *p_scan,
if( unlikely(p_mplex == NULL) )
return;
+ if( p_mplex->i_snr > 0 && i_snr > p_mplex->i_snr )
+ {
+ msg_Info( p_obj, "multiplex ts_id %" PRIu16 " freq %u snr %d replaced by freq %u snr %d",
+ p_mplex->i_ts_id, p_mplex->cfg.i_frequency, p_mplex->i_snr,
+ p_cfg->i_frequency, i_snr );
+ p_mplex->cfg = *p_cfg;
+ }
+ p_mplex->i_snr = i_snr;
+
const dvbpsi_pat_program_t *p_program;
for( p_program = p_pat->p_first_program; p_program != NULL; p_program = p_program->p_next )
{
@@ -1495,7 +1504,7 @@ static void scan_session_Destroy( scan_t *p_scan, scan_session_t *p_session )
/* Parse PAT (Declares only local services/programs) */
if( p_pat )
- ParsePAT( p_scan->p_obj, p_scan, p_pat, &p_session->cfg );
+ ParsePAT( p_scan->p_obj, p_scan, p_pat, &p_session->cfg, p_session->i_snr );
/* Parse NIT (Declares local services/programs) */
if( p_nit )
More information about the vlc-commits
mailing list