]> git.sesse.net Git - vlc/commitdiff
Create 4 common caching parameters (file, capture, disc and network)
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 29 Aug 2011 16:10:13 +0000 (19:10 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 29 Aug 2011 16:20:15 +0000 (19:20 +0300)
modules/access/fs.c
src/libvlc-module.c

index 8f01ea77a2accffa2218793c171bebd7ac845819..ff8a7e5f06c7e7e58807ac7d3d7fa5d84d6ef14d 100644 (file)
 #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" )
index 455c25fff13db150ba9592872b84eda5f6869a7f..dfae78a074f1e8553d5cd38637f5dc7dd19e9e57 100644 (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,