[vlc-devel] [RFC PATCH 1/2] Add dedicated network-caching for live sources

Julian Scheel julian at jusst.de
Wed Apr 8 12:14:21 CEST 2015


It can be helpful to have different amount of network caching configured for
live vs non-live (and thus seekable) sources. While for seekable sources it
might be required to have a slightly larger buffering for seeking to actually
be smooth it can be desirable to have a shorter caching for live sources at
the same time. As network-caching is not changeable within a libvlc session
split it into two settings which can be used by the access and demux modules
accordingly.

Signed-off-by: Julian Scheel <julian at jusst.de>
---
 src/libvlc-module.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 46180f5..b84165a 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -508,6 +508,10 @@ static const char *const ppsz_pos_descriptions[] =
 #define NETWORK_CACHING_LONGTEXT N_( \
     "Caching value for network resources, in milliseconds." )
 
+#define LIVE_NETWORK_CACHING_TEXT N_("Live network caching (ms)")
+#define LIVE_NETWORK_CACHING_LONGTEXT N_( \
+    "Caching value for live (non seekable) 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 " \
@@ -1817,6 +1821,10 @@ vlc_module_begin ()
                  NETWORK_CACHING_TEXT, NETWORK_CACHING_LONGTEXT, true )
         change_integer_range( 0, 60000 )
         change_safe()
+    add_integer( "live-network-caching", CLOCK_FREQ / 1000,
+                 LIVE_NETWORK_CACHING_TEXT, LIVE_NETWORK_CACHING_LONGTEXT, true )
+        change_integer_range( 0, 60000 )
+        change_safe()
     add_obsolete_integer( "ftp-caching" ) /* 2.0.0 */
     add_obsolete_integer( "http-caching" ) /* 2.0.0 */
     add_obsolete_integer( "mms-caching" ) /* 2.0.0 */
-- 
2.3.0





More information about the vlc-devel mailing list