[vlc-commits] access: dvb: create scan_session from scan config

Francois Cartegnie git at videolan.org
Mon Apr 11 11:09:49 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Apr 10 14:14:47 2016 +0200| [d47a00dbb19fb841031e14ced1d8176dca23fe25] | committer: Francois Cartegnie

access: dvb: create scan_session from scan config

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d47a00dbb19fb841031e14ced1d8176dca23fe25
---

 modules/access/dvb/access.c |    2 +-
 modules/access/dvb/scan.c   |    7 ++++---
 modules/access/dvb/scan.h   |    3 +--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/access/dvb/access.c b/modules/access/dvb/access.c
index 1f27129..3d9fc9d 100644
--- a/modules/access/dvb/access.c
+++ b/modules/access/dvb/access.c
@@ -230,7 +230,7 @@ static block_t *BlockScan( access_t *p_access )
     }
 
     /* */
-    scan_session_t *session = scan_session_New( VLC_OBJECT(p_access), &cfg );
+    scan_session_t *session = scan_session_New( p_scan, &cfg );
     if( session == NULL )
         return NULL;
 
diff --git a/modules/access/dvb/scan.c b/modules/access/dvb/scan.c
index 3e8afb4..5fb2974 100644
--- a/modules/access/dvb/scan.c
+++ b/modules/access/dvb/scan.c
@@ -126,6 +126,7 @@ struct scan_session_t
         size_t i_nit;
     } others;
 
+    bool b_use_nit;
     uint16_t i_nit_pid;
 
     dvbpsi_t *p_pathandle;
@@ -1141,19 +1142,19 @@ static void PSINewTableCallBack( dvbpsi_t *h, uint8_t i_table_id, uint16_t i_ext
     }
 }
 
-scan_session_t *scan_session_New( vlc_object_t *p_obj,
-                                  const scan_tuner_config_t *p_cfg )
+scan_session_t *scan_session_New( scan_t *p_scan, const scan_tuner_config_t *p_cfg )
 {
     scan_session_t *p_session = malloc( sizeof( *p_session ) );
     if( unlikely(p_session == NULL) )
         return NULL;
-    p_session->p_obj = p_obj;
+    p_session->p_obj = p_scan->p_obj;
     p_session->cfg = *p_cfg;
     p_session->i_snr = -1;
     p_session->local.p_pat = NULL;
     p_session->local.p_sdt = NULL;
     p_session->local.p_nit = NULL;
     p_session->i_nit_pid = -1;
+    p_session->b_use_nit = p_scan->parameter.b_use_nit;
     p_session->others.i_nit = 0;
     p_session->others.i_sdt = 0;
     p_session->others.pp_nit = NULL;
diff --git a/modules/access/dvb/scan.h b/modules/access/dvb/scan.h
index 64a310c..26d0338 100644
--- a/modules/access/dvb/scan.h
+++ b/modules/access/dvb/scan.h
@@ -88,8 +88,7 @@ bool scan_IsCancelled( scan_t *p_scan );
 
 typedef struct scan_session_t scan_session_t;
 
-scan_session_t *scan_session_New( vlc_object_t *,
-                                  const scan_tuner_config_t * );
+scan_session_t *scan_session_New( scan_t *, const scan_tuner_config_t * );
 void scan_session_Destroy( scan_t *, scan_session_t * );
 bool scan_session_Push( scan_session_t *p_scan, block_t *p_block );
 void scan_session_SetSNR( scan_session_t *p_scan, int i_snr );



More information about the vlc-commits mailing list