+ /* Access Filters */
+ qs_filter = qfu( config_GetPsz( p_intf, "access-filter" ) );
+ ui.timeshiftBox->setChecked( qs_filter.contains( "timeshift" ) );
+ ui.dumpBox->setChecked( qs_filter.contains( "dump" ) );
+ ui.recordBox->setChecked( qs_filter.contains( "record" ) );
+ ui.bandwidthBox->setChecked( qs_filter.contains( "bandwidth" ) );
+
+ optionWidgets.append( ui.recordBox );
+ optionWidgets.append( ui.dumpBox );
+ optionWidgets.append( ui.bandwidthBox );
+ optionWidgets.append( ui.timeshiftBox );
+ optionWidgets.append( ui.DVDDevice );
+ optionWidgets.append( ui.cachingCombo );
+
+ /* Caching */
+ /* Add the things to the ComboBox */
+ #define addToCachingBox( str, cachingNumber ) \
+ ui.cachingCombo->addItem( str, QVariant( cachingNumber ) );
+ addToCachingBox( "Custom", CachingCustom );
+ addToCachingBox( "Lowest latency", CachingLowest );
+ addToCachingBox( "Low latency", CachingLow );
+ addToCachingBox( "Normal", CachingNormal );
+ addToCachingBox( "High latency", CachingHigh );
+ addToCachingBox( "Higher latency", CachingHigher );
+
+#define TestCaC( name ) \
+ b_cache_equal = b_cache_equal && ( i_cache == config_GetInt( p_intf, name ) );
+
+#define TestCaCi( name, int ) \
+ b_cache_equal = b_cache_equal && \
+ ( ( i_cache * int ) == config_GetInt( p_intf, name ) );
+ /* Select the accurate value of the ComboBox */
+ bool b_cache_equal = true;
+ int i_cache = config_GetInt( p_intf, "file-caching");
+
+ TestCaC( "udp-caching" ) TestCaC( "dvdread-caching" )
+ TestCaC( "dvdnav-caching" ) TestCaC( "tcp-caching" )
+ TestCaC( "fake-caching" ) TestCaC( "cdda-caching" )
+ TestCaC( "screen-caching" ) TestCaC( "vcd-caching" )
+ #ifdef WIN32
+ TestCaC( "dshow-caching" )
+ #else
+ TestCaC( "v4l-caching" ) TestCaC( "jack-input-caching" )
+ TestCaC( "v4l2-caching" ) TestCaC( "pvr-caching" )
+ #endif
+ TestCaCi( "rtsp-caching", 4 ) TestCaCi( "ftp-caching", 2 )
+ TestCaCi( "http-caching", 4 ) TestCaCi( "realrtsp-caching", 10 )
+ TestCaCi( "mms-caching", 19 )
+ if( b_cache_equal ) ui.cachingCombo->setCurrentIndex(
+ ui.cachingCombo->findData( QVariant( i_cache ) ) );