[vlc-commits] access: dvb: scan: fix unused scanning parameter b_use_nit
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:15:06 2016 +0200| [bd6deb1a3095a72b46b4a8a932cc652a9b429506] | committer: Francois Cartegnie
access: dvb: scan: fix unused scanning parameter b_use_nit
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bd6deb1a3095a72b46b4a8a932cc652a9b429506
---
modules/access/dvb/access.c | 8 +++++++-
modules/access/dvb/scan.c | 5 +++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules/access/dvb/access.c b/modules/access/dvb/access.c
index 3d9fc9d..df1f0ab 100644
--- a/modules/access/dvb/access.c
+++ b/modules/access/dvb/access.c
@@ -62,6 +62,8 @@ static void Close( vlc_object_t *p_this );
#define SCANLIST_TEXT N_("Scan tuning list")
#define SCANLIST_LONGTEXT N_("filename containing initial scan tuning data")
+#define SCAN_NIT_TEXT N_("Use NIT for scanning services")
+
vlc_module_begin ()
set_shortname( N_("DVB") )
set_description( N_("DVB input with v4l2 support") )
@@ -74,6 +76,7 @@ vlc_module_begin ()
true )
add_string( "dvb-scanlist", NULL, SCANLIST_TEXT, SCANLIST_LONGTEXT,
true )
+ add_bool( "dvb-scan-nit", true, SCAN_NIT_TEXT, NULL, true )
set_capability( "access", 0 )
add_shortcut( "dvb", /* Generic name */
@@ -164,10 +167,13 @@ static int Open( vlc_object_t *p_this )
scan_parameter_Init( ¶meter );
+ parameter.b_use_nit = var_GetBool( p_access, "dvb-scan-nit" );
+
msg_Dbg( p_access, "setting filter on PAT/NIT/SDT (DVB only)" );
FilterSet( p_access, 0x00, OTHER_TYPE ); // PAT
- FilterSet( p_access, 0x10, OTHER_TYPE ); // NIT
FilterSet( p_access, 0x11, OTHER_TYPE ); // SDT
+ if( parameter.b_use_nit )
+ FilterSet( p_access, 0x10, OTHER_TYPE ); // NIT
if( FrontendFillScanParameter( p_access, ¶meter ) ||
(p_scan = scan_New( VLC_OBJECT(p_access), ¶meter )) == NULL )
diff --git a/modules/access/dvb/scan.c b/modules/access/dvb/scan.c
index 5fb2974..d13cbec 100644
--- a/modules/access/dvb/scan.c
+++ b/modules/access/dvb/scan.c
@@ -1431,7 +1431,7 @@ bool scan_session_Push( scan_session_t *p_scan, block_t *p_block )
if( p_scan->p_sdthandle )
dvbpsi_packet_push( p_scan->p_sdthandle, p_block->p_buffer );
}
- else /*if( i_pid == p_scan->i_nit_pid )*/
+ else if( p_scan->b_use_nit ) /*if( i_pid == p_scan->i_nit_pid )*/
{
if( !p_scan->p_nithandle )
{
@@ -1456,7 +1456,8 @@ bool scan_session_Push( scan_session_t *p_scan, block_t *p_block )
block_Release( p_block );
- return p_scan->local.p_pat && p_scan->local.p_sdt && p_scan->local.p_nit;
+ return p_scan->local.p_pat && p_scan->local.p_sdt &&
+ (!p_scan->b_use_nit || p_scan->local.p_nit);
}
void scan_session_SetSNR( scan_session_t *p_session, int i_snr )
More information about the vlc-commits
mailing list