[vlc-commits] Create 4 common caching parameters (file, capture, disc and network)

Rémi Denis-Courmont git at videolan.org
Mon Aug 29 18:20:35 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 29 19:10:13 2011 +0300| [096cd15ea2ce9f4f40a9b4bfe8ddc584536986c7] | committer: Rémi Denis-Courmont

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=096cd15ea2ce9f4f40a9b4bfe8ddc584536986c7
---

 modules/access/fs.c |   14 --------------
 src/libvlc-module.c |   29 +++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/modules/access/fs.c b/modules/access/fs.c
index 8f01ea7..ff8a7e5 100644
--- a/modules/access/fs.c
+++ b/modules/access/fs.c
@@ -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" )
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 455c25f..dfae78a 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -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,



More information about the vlc-commits mailing list