From: RĂ©mi Denis-Courmont Date: Sun, 6 Jun 2010 21:25:10 +0000 (+0300) Subject: var_InheritInteger -> var_InheritBool X-Git-Tag: 1.2.0-pre1~6287 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ae2c9e4fb61cd0be61d160d1d0c6aae353706497;p=vlc var_InheritInteger -> var_InheritBool --- diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c index 41baaf808d..3d56275fc2 100644 --- a/modules/access/v4l2.c +++ b/modules/access/v4l2.c @@ -679,7 +679,7 @@ static int DemuxOpen( vlc_object_t *p_this ) ParseMRL( p_sys, p_demux->psz_path, (vlc_object_t *) p_demux ); #ifdef HAVE_LIBV4L2 - if( !var_InheritInteger( p_this, CFG_PREFIX "use-libv4l2" ) ) + if( !var_InheritBool( p_this, CFG_PREFIX "use-libv4l2" ) ) { msg_Dbg( p_this, "Trying direct kernel v4l2" ); use_kernel_v4l2( p_sys ); @@ -1134,7 +1134,7 @@ static int AccessOpen( vlc_object_t * p_this ) ParseMRL( p_sys, p_access->psz_location, (vlc_object_t *) p_access ); #ifdef HAVE_LIBV4L2 - if( !var_InheritInteger( p_this, CFG_PREFIX "use-libv4l2" ) ) + if( !var_InheritBool( p_this, CFG_PREFIX "use-libv4l2" ) ) { msg_Dbg( p_this, "Trying direct kernel v4l2" ); use_kernel_v4l2( p_sys ); diff --git a/modules/access/vcdx/access.c b/modules/access/vcdx/access.c index 5d0aeff6f1..0982ad4a91 100644 --- a/modules/access/vcdx/access.c +++ b/modules/access/vcdx/access.c @@ -546,7 +546,7 @@ VCDParse( access_t * p_access, /*out*/ vcdinfo_itemid_t * p_itemid, char *psz_source; char *psz_next; - if( var_InheritInteger( p_access, MODULE_STRING "-PBC" ) ) { + if( var_InheritBool( p_access, MODULE_STRING "-PBC" ) ) { p_itemid->type = VCDINFO_ITEM_TYPE_LID; p_itemid->num = 1; *play_single_item = false; diff --git a/modules/access_output/http.c b/modules/access_output/http.c index 79c57f4e61..f65c714676 100644 --- a/modules/access_output/http.c +++ b/modules/access_output/http.c @@ -279,7 +279,7 @@ static int Open( vlc_object_t *p_this ) } #if 0 //def HAVE_AVAHI_CLIENT - if( var_InheritInteger(p_this, SOUT_CFG_PREFIX "bonjour") ) + if( var_InheritBool(p_this, SOUT_CFG_PREFIX "bonjour") ) { char *psz_txt, *psz_name; playlist_t *p_playlist = pl_Get( p_access ); diff --git a/modules/audio_filter/channel_mixer/headphone.c b/modules/audio_filter/channel_mixer/headphone.c index 07c8da06ec..fa6ed618db 100644 --- a/modules/audio_filter/channel_mixer/headphone.c +++ b/modules/audio_filter/channel_mixer/headphone.c @@ -197,7 +197,7 @@ static int Init( vlc_object_t *p_this, struct filter_sys_t * p_data int i_source_channel_offset; unsigned int i; - if( var_InheritInteger( p_this, "headphone-compensate" ) ) + if( var_InheritBool( p_this, "headphone-compensate" ) ) { /* minimal distance to any speaker */ if( i_physical_channels & AOUT_CHAN_REARCENTER ) @@ -473,7 +473,7 @@ static int OpenFilter( vlc_object_t *p_this ) } if( p_filter->fmt_in.audio.i_physical_channels == (AOUT_CHAN_LEFT|AOUT_CHAN_RIGHT) && ( p_filter->fmt_in.audio.i_original_channels & AOUT_CHAN_DOLBYSTEREO ) - && !var_InheritInteger( p_filter, "headphone-dolby" ) ) + && !var_InheritBool( p_filter, "headphone-dolby" ) ) { b_fit = false; p_filter->fmt_in.audio.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | diff --git a/modules/audio_filter/channel_mixer/mono.c b/modules/audio_filter/channel_mixer/mono.c index 0cfd26c3c0..19b3969d4b 100644 --- a/modules/audio_filter/channel_mixer/mono.c +++ b/modules/audio_filter/channel_mixer/mono.c @@ -213,7 +213,7 @@ static int Init( vlc_object_t *p_this, struct filter_sys_t * p_data, int i_source_channel_offset; unsigned int i; - if( var_InheritInteger( p_this, "headphone-compensate" ) ) + if( var_InheritBool( p_this, "headphone-compensate" ) ) { /* minimal distance to any speaker */ if( i_physical_channels & AOUT_CHAN_REARCENTER ) diff --git a/modules/audio_filter/converter/a52tofloat32.c b/modules/audio_filter/converter/a52tofloat32.c index 5545ca2e2b..d108cb1102 100644 --- a/modules/audio_filter/converter/a52tofloat32.c +++ b/modules/audio_filter/converter/a52tofloat32.c @@ -107,14 +107,14 @@ vlc_module_end () static int Open( vlc_object_t *p_this, filter_sys_t *p_sys, audio_format_t input, audio_format_t output ) { - p_sys->b_dynrng = var_InheritInteger( p_this, "a52-dynrng" ); + p_sys->b_dynrng = var_InheritBool( p_this, "a52-dynrng" ); p_sys->b_dontwarn = 0; /* No upmixing: it's not necessary and some other filters may want to do * it themselves. */ if ( aout_FormatNbChannels( &output ) > aout_FormatNbChannels( &input ) ) { - if ( ! var_InheritInteger( p_this, "a52-upmix" ) ) + if ( ! var_InheritBool( p_this, "a52-upmix" ) ) { return VLC_EGENERIC; } diff --git a/modules/audio_filter/resampler/bandlimited.c b/modules/audio_filter/resampler/bandlimited.c index 91a2085d2c..a71aa8ff45 100644 --- a/modules/audio_filter/resampler/bandlimited.c +++ b/modules/audio_filter/resampler/bandlimited.c @@ -296,7 +296,7 @@ static int OpenFilter( vlc_object_t *p_this ) } #if !defined( SYS_DARWIN ) - if( !var_InheritInteger( p_this, "hq-resampling" ) ) + if( !var_InheritBool( p_this, "hq-resampling" ) ) { return VLC_EGENERIC; } diff --git a/modules/audio_output/jack.c b/modules/audio_output/jack.c index 8e57baff3c..538e7d9506 100644 --- a/modules/audio_output/jack.c +++ b/modules/audio_output/jack.c @@ -186,7 +186,7 @@ static int Open( vlc_object_t *p_this ) } /* Auto connect ports if we were asked to */ - if( var_InheritInteger( p_aout, AUTO_CONNECT_OPTION ) ) + if( var_InheritBool( p_aout, AUTO_CONNECT_OPTION ) ) { unsigned int i_in_ports; char *psz_regex = var_InheritString( p_aout, CONNECT_REGEX_OPTION ); diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c index d3e4a74e12..14d91ca1c0 100644 --- a/modules/audio_output/oss.c +++ b/modules/audio_output/oss.c @@ -509,7 +509,7 @@ static int Open( vlc_object_t *p_this ) } p_aout->output.p_sys->b_workaround_buggy_driver = - var_InheritInteger( p_aout, "oss-buggy" ); + var_InheritBool( p_aout, "oss-buggy" ); /* Create OSS thread and wait for its readiness. */ if( vlc_thread_create( p_aout, "aout", OSSThread, diff --git a/modules/control/motion.c b/modules/control/motion.c index 0935d28f3d..2af60ef91f 100644 --- a/modules/control/motion.c +++ b/modules/control/motion.c @@ -157,7 +157,7 @@ int Open ( vlc_object_t *p_this ) p_intf->pf_run = RunIntf; p_intf->p_sys->b_use_rotate = - var_InheritInteger( p_intf, "motion-use-rotate" ); + var_InheritBool( p_intf, "motion-use-rotate" ); return VLC_SUCCESS; } diff --git a/modules/control/ntservice.c b/modules/control/ntservice.c index d1f1058f83..c36adefcfc 100644 --- a/modules/control/ntservice.c +++ b/modules/control/ntservice.c @@ -138,13 +138,13 @@ static void Run( intf_thread_t *p_intf ) p_intf->p_sys->psz_service = p_intf->p_sys->psz_service ? p_intf->p_sys->psz_service : strdup(VLCSERVICENAME); - if( var_InheritInteger( p_intf, "ntservice-install" ) ) + if( var_InheritBool( p_intf, "ntservice-install" ) ) { NTServiceInstall( p_intf ); return; } - if( var_InheritInteger( p_intf, "ntservice-uninstall" ) ) + if( var_InheritBool( p_intf, "ntservice-uninstall" ) ) { NTServiceUninstall( p_intf ); return; diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c index b522217a59..ebb8f565c4 100644 --- a/modules/demux/avi/avi.c +++ b/modules/demux/avi/avi.c @@ -283,7 +283,7 @@ static int Open( vlc_object_t * p_this ) /* For unseekable stream, automaticaly use Demux_UnSeekable */ if( !p_sys->b_seekable - || var_InheritInteger( p_demux, "avi-interleaved" ) ) + || var_InheritBool( p_demux, "avi-interleaved" ) ) { p_demux->pf_demux = Demux_UnSeekable; } diff --git a/modules/demux/mkv/Ebml_parser.cpp b/modules/demux/mkv/Ebml_parser.cpp index 21cdd56425..355f9e5e91 100644 --- a/modules/demux/mkv/Ebml_parser.cpp +++ b/modules/demux/mkv/Ebml_parser.cpp @@ -42,7 +42,7 @@ EbmlParser::EbmlParser( EbmlStream *es, EbmlElement *el_start, demux_t *p_demux mi_level = 1; mi_user_level = 1; mb_keep = false; - mb_dummy = var_InheritInteger( p_demux, "mkv-use-dummy" ); + mb_dummy = var_InheritBool( p_demux, "mkv-use-dummy" ); } EbmlParser::~EbmlParser( void ) @@ -124,7 +124,7 @@ void EbmlParser::Reset( demux_t *p_demux ) mi_user_level = mi_level = 1; // a little faster and cleaner m_es->I_O().setFilePointer( static_cast(m_el[0])->GetGlobalPosition(0) ); - mb_dummy = var_InheritInteger( p_demux, "mkv-use-dummy" ); + mb_dummy = var_InheritBool( p_demux, "mkv-use-dummy" ); } EbmlElement *EbmlParser::Get( void ) diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp index b091feda3f..1abec2b4cd 100644 --- a/modules/demux/mkv/matroska_segment_parse.cpp +++ b/modules/demux/mkv/matroska_segment_parse.cpp @@ -1032,7 +1032,7 @@ void matroska_segment_c::ParseChapters( KaxChapters *chapters ) } else if( MKV_IS_ID( l, KaxEditionFlagOrdered ) ) { - p_edition->b_ordered = var_InheritInteger( &sys.demuxer, "mkv-use-ordered-chapters" ) ? (uint8(*static_cast( l )) != 0) : 0; + p_edition->b_ordered = var_InheritBool( &sys.demuxer, "mkv-use-ordered-chapters" ) ? (uint8(*static_cast( l )) != 0) : 0; } else if( MKV_IS_ID( l, KaxEditionFlagDefault ) ) { diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp index 27dfd92950..01906f98d5 100644 --- a/modules/demux/mkv/mkv.cpp +++ b/modules/demux/mkv/mkv.cpp @@ -139,7 +139,7 @@ static int Open( vlc_object_t * p_this ) goto error; } - if (var_InheritInteger( p_demux, "mkv-preload-local-dir" )) + if (var_InheritBool( p_demux, "mkv-preload-local-dir" )) { /* get the files from the same dir from the same family (based on p_demux->psz_path) */ if (p_demux->psz_path[0] != '\0' && !strcmp(p_demux->psz_access, "")) @@ -421,7 +421,7 @@ static void Seek( demux_t *p_demux, mtime_t i_date, double f_percent, chapter_it } /* seek without index or without date */ - if( f_percent >= 0 && (var_InheritInteger( p_demux, "mkv-seek-percent" ) || !p_segment->b_cues || i_date < 0 )) + if( f_percent >= 0 && (var_InheritBool( p_demux, "mkv-seek-percent" ) || !p_segment->b_cues || i_date < 0 )) { if( p_sys->f_duration >= 0 && p_segment->b_cues ) { diff --git a/modules/gui/fbosd.c b/modules/gui/fbosd.c index facbb7ad41..e55941e32f 100644 --- a/modules/gui/fbosd.c +++ b/modules/gui/fbosd.c @@ -538,7 +538,7 @@ static int OpenBlending( intf_thread_t *p_intf ) p_intf->p_sys->fmt_out.i_sar_den; p_intf->p_sys->p_blend->fmt_out.video.i_chroma = p_intf->p_sys->fmt_out.i_chroma; - if( var_InheritInteger( p_intf, "freetype-yuvp" ) ) + if( var_InheritBool( p_intf, "freetype-yuvp" ) ) p_intf->p_sys->p_blend->fmt_in.video.i_chroma = VLC_CODEC_YUVP; else diff --git a/modules/gui/qt4/components/controller_widget.cpp b/modules/gui/qt4/components/controller_widget.cpp index cb77d316c0..328ec14242 100644 --- a/modules/gui/qt4/components/controller_widget.cpp +++ b/modules/gui/qt4/components/controller_widget.cpp @@ -87,7 +87,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf, { volumeSlider = new SoundSlider( this, config_GetInt( p_intf, "volume-step" ), - var_InheritInteger( p_intf, "qt-volume-complete" ), + var_InheritBool( p_intf, "qt-volume-complete" ), var_InheritString( p_intf, "qt-slider-colours" ) ); } else diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 562dfc83a8..7627de0bf7 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -110,7 +110,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) b_autoresize = var_InheritBool( p_intf, "qt-video-autoresize" ); /* Are we in the enhanced always-video mode or not ? */ - i_visualmode = var_InheritInteger( p_intf, "qt-minimal-view" ); + i_visualmode = var_InheritBool( p_intf, "qt-minimal-view" ); /* Do we want anoying popups or not */ b_notificationEnabled = var_InheritBool( p_intf, "qt-notification" ); diff --git a/modules/misc/notify/xosd.c b/modules/misc/notify/xosd.c index 587bc23aac..2cea933181 100644 --- a/modules/misc/notify/xosd.c +++ b/modules/misc/notify/xosd.c @@ -141,7 +141,7 @@ static int Open( vlc_object_t *p_this ) xosd_set_font( p_osd, psz_font ); xosd_set_colour( p_osd, psz_colour ); xosd_set_timeout( p_osd, 3 ); - xosd_set_pos( p_osd, var_InheritInteger( p_intf, "xosd-position" ) ? + xosd_set_pos( p_osd, var_InheritBool( p_intf, "xosd-position" ) ? XOSD_bottom: XOSD_top ); xosd_set_horizontal_offset( p_osd, var_InheritInteger( p_intf, "xosd-text-offset" ) );