Create 4 common caching parameters (file, capture, disc and network)

This commit is contained in:
Rémi Denis-Courmont 2011-08-29 19:10:13 +03:00
parent 80a49e5965
commit 096cd15ea2
2 changed files with 29 additions and 14 deletions

View File

@ -30,14 +30,6 @@
#include "fs.h"
#include <vlc_plugin.h>
#define CACHING_TEXT N_("Caching value (ms)")
#define CACHING_LONGTEXT N_( \
"Caching value for files, in milliseconds." )
#define NETWORK_CACHING_TEXT N_("Extra network caching value (ms)")
#define NETWORK_CACHING_LONGTEXT N_( \
"Supplementary caching value for remote files, in milliseconds." )
#define RECURSIVE_TEXT N_("Subdirectory behavior")
#define RECURSIVE_LONGTEXT N_( \
"Select whether subdirectories must be expanded.\n" \
@ -61,12 +53,6 @@ vlc_module_begin ()
set_shortname( N_("File") )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACCESS )
add_integer( "file-caching", DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
change_safe()
add_integer( "network-caching", 3 * DEFAULT_PTS_DELAY / 1000,
NETWORK_CACHING_TEXT, NETWORK_CACHING_LONGTEXT, true )
change_safe()
add_obsolete_string( "file-cat" )
set_capability( "access", 50 )
add_shortcut( "file", "fd", "stream" )

View File

@ -627,6 +627,22 @@ static const char *const ppsz_pos_descriptions[] =
"subsystem, such as the DVD or VCD device, the network interface " \
"settings or the subtitle channel.")
#define CACHING_TEXT N_("File caching (ms)")
#define CACHING_LONGTEXT N_( \
"Caching value for local files, in milliseconds." )
#define CAPTURE_CACHING_TEXT N_("Live capture caching (ms)")
#define CAPTURE_CACHING_LONGTEXT N_( \
"Caching value for cameras and microphones, in milliseconds." )
#define DISC_CACHING_TEXT N_("Disc caching (ms)")
#define DISC_CACHING_LONGTEXT N_( \
"Caching value for optical media, in milliseconds." )
#define NETWORK_CACHING_TEXT N_("Network caching (ms)")
#define NETWORK_CACHING_LONGTEXT N_( \
"Caching value for network resources, in milliseconds." )
#define CR_AVERAGE_TEXT N_("Clock reference average counter")
#define CR_AVERAGE_LONGTEXT N_( \
"When using the PVR input (or a very irregular source), you should " \
@ -1895,6 +1911,19 @@ vlc_module_begin ()
set_section( N_( "Advanced" ), NULL )
add_integer( "file-caching", DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
change_safe()
add_integer( "capture-caching", DEFAULT_PTS_DELAY / 1000,
CAPTURE_CACHING_TEXT, CAPTURE_CACHING_LONGTEXT, true )
change_safe()
add_integer( "disc-caching", DEFAULT_PTS_DELAY / 1000,
DISC_CACHING_TEXT, DISC_CACHING_LONGTEXT, true )
change_safe()
add_integer( "network-caching", CLOCK_FREQ / 1000,
NETWORK_CACHING_TEXT, NETWORK_CACHING_LONGTEXT, true )
change_safe()
add_integer( "cr-average", 40, CR_AVERAGE_TEXT,
CR_AVERAGE_LONGTEXT, true )
add_integer( "clock-synchro", -1, CLOCK_SYNCHRO_TEXT,