+ CONFIG_GENERIC_NO_BOOL( "server-port", Integer, NULL, UDPPort );
+ CONFIG_GENERIC( "http-proxy", String , NULL, proxy );
+ CONFIG_GENERIC_NO_BOOL( "ffmpeg-pp-q", Integer, NULL, PostProcLevel );
+ CONFIG_GENERIC( "avi-index", IntegerList, NULL, AviRepair );
+ CONFIG_GENERIC( "rtsp-tcp", Bool, NULL, RTSP_TCPBox );
+#ifdef WIN32
+ CONFIG_GENERIC( "prefer-system-codecs", Bool, NULL, systemCodecBox );
+#else
+ ui.systemCodecBox->hide();
+#endif
+ /* 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" );
+ if (module_Exists (p_intf, "dvdread"))
+ TestCaC( "dvdread-caching" );
+ if (module_Exists (p_intf, "dvdnav"))
+ TestCaC( "dvdnav-caching" );
+ TestCaC( "tcp-caching" );
+ TestCaC( "fake-caching" ); TestCaC( "cdda-caching" );
+ TestCaC( "screen-caching" ); TestCaC( "vcd-caching" );
+ #ifdef WIN32
+ TestCaC( "dshow-caching" );
+ #else
+ if (module_Exists (p_intf, "v4l"))
+ TestCaC( "v4l-caching" );
+ if (module_Exists (p_intf, "access_jack"))
+ TestCaC( "jack-input-caching" );
+ if (module_Exists (p_intf, "v4l2"))
+ TestCaC( "v4l2-caching" );
+ if (module_Exists (p_intf, "pvr"))
+ TestCaC( "pvr-caching" );
+ #endif
+ TestCaCi( "rtsp-caching", 4 ); TestCaCi( "ftp-caching", 2 );
+ TestCaCi( "http-caching", 4 );
+ if (module_Exists (p_intf, "access_realrtsp"))
+ TestCaCi( "realrtsp-caching", 10 );
+ TestCaCi( "mms-caching", 19 );
+ if( b_cache_equal ) ui.cachingCombo->setCurrentIndex(
+ ui.cachingCombo->findData( QVariant( i_cache ) ) );