Commit 31ac20b2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Unify (ACCESS|DEMUX)_GET_PTS_DELAY

parent d71dcc99
......@@ -72,11 +72,6 @@ static void DemuxClose( vlc_object_t * );
#define SAMPLERATE_LONGTEXT N_( \
"Samplerate of the captured audio stream, in Hz (eg: 11025, 22050, 44100, 48000)" )
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Caching value for Alsa captures. This " \
"value should be set in milliseconds." )
#define HELP_TEXT N_( \
"Use alsa:// to open the default audio input. If multiple audio " \
"inputs are available, they will be listed in the vlc debug output. " \
......@@ -100,8 +95,6 @@ vlc_module_begin()
true )
add_integer( CFG_PREFIX "samplerate", 48000, SAMPLERATE_TEXT,
SAMPLERATE_LONGTEXT, true )
add_integer( CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
vlc_module_end()
/*****************************************************************************
......@@ -121,7 +114,6 @@ static char *ListAvailableDevices( demux_t *, bool b_probe );
struct demux_sys_t
{
/* Audio */
int i_cache;
unsigned int i_sample_rate;
bool b_stereo;
size_t i_max_frame_size;
......@@ -249,7 +241,6 @@ static int DemuxOpen( vlc_object_t *p_this )
p_sys->i_sample_rate = var_InheritInteger( p_demux, CFG_PREFIX "samplerate" );
p_sys->b_stereo = var_InheritBool( p_demux, CFG_PREFIX "stereo" );
p_sys->i_cache = var_InheritInteger( p_demux, CFG_PREFIX "caching" );
p_sys->p_es = NULL;
p_sys->p_block = NULL;
p_sys->i_next_demux_date = -1;
......@@ -307,7 +298,8 @@ static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
return VLC_SUCCESS;
case DEMUX_GET_PTS_DELAY:
*va_arg( args, int64_t * ) = (int64_t)p_sys->i_cache * 1000;
*va_arg( args, int64_t * ) =
INT64_C(1000) * var_InheritInteger( p_demux, "live-caching" );
return VLC_SUCCESS;
case DEMUX_GET_TIME:
......
......@@ -49,11 +49,6 @@
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Caching value for BDs. This "\
"value should be set in milliseconds." )
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
......@@ -62,8 +57,6 @@ vlc_module_begin ()
set_description( N_("Blu-Ray Disc Input") )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACCESS )
add_integer( "bd-caching", DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
set_capability( "access_demux", 60 )
add_shortcut( "bd", "file" )
set_callbacks( Open, Close )
......@@ -354,7 +347,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
{
int64_t *pi_delay = (int64_t*)va_arg( args, int64_t * );
*pi_delay = var_GetInteger( p_demux, "bd-caching" ) * INT64_C(1000);
*pi_delay =
INT64_C(1000) * var_InheritInteger( p_demux, "disc-caching" );
return VLC_SUCCESS;
}
......
......@@ -39,9 +39,6 @@
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( "Caching value for BDs. This "\
"value should be set in milliseconds." )
/* Callbacks */
static int blurayOpen ( vlc_object_t * );
......@@ -55,9 +52,6 @@ vlc_module_begin ()
set_subcategory( SUBCAT_INPUT_ACCESS )
set_capability( "access_demux", 200)
add_integer( "bluray-caching", 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
add_shortcut( "bluray", "file" )
set_callbacks( blurayOpen, blurayClose )
......@@ -73,9 +67,6 @@ struct demux_sys_t
unsigned int i_longest_title;
input_title_t **pp_title;
/* caching */
int i_bd_delay;
/* TS stream */
stream_t *p_parser;
};
......@@ -198,7 +189,6 @@ static int blurayOpen( vlc_object_t *object )
return VLC_EGENERIC;
}
p_sys->i_bd_delay = var_InheritInteger(p_demux, "bluray-caching");
p_sys->p_parser = stream_DemuxNew(p_demux, "ts", p_demux->out);
if (!p_sys->p_parser) {
msg_Err(p_demux, "Failed to create TS demuxer");
......@@ -323,7 +313,8 @@ static int blurayControl(demux_t *p_demux, int query, va_list args)
case DEMUX_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = p_sys->i_bd_delay;
*pi_64 =
INT64_C(1000) * var_InheritInteger( p_demux, "disc-caching" );
break;
case DEMUX_SET_PAUSE_STATE:
......
......@@ -58,11 +58,6 @@
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Default caching value for Audio CDs. This " \
"value should be set in milliseconds." )
vlc_module_begin ()
set_shortname( N_("Audio CD") )
set_description( N_("Audio CD input") )
......@@ -72,10 +67,6 @@ vlc_module_begin ()
set_callbacks( Open, Close )
add_usage_hint( N_("[cdda:][device][@[track]]") )
add_integer( "cdda-caching", DEFAULT_PTS_DELAY / 1000, CACHING_TEXT,
CACHING_LONGTEXT, true )
change_safe()
add_integer( "cdda-track", 0 , NULL, NULL, true )
change_volatile ()
add_integer( "cdda-first-sector", -1, NULL, NULL, true )
......@@ -231,9 +222,6 @@ static int Open( vlc_object_t *p_this )
* (int64_t)CDDA_DATA_SIZE;
}
/* PTS delay */
var_Create( p_access, "cdda-caching", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
return VLC_SUCCESS;
error:
......@@ -347,7 +335,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
case ACCESS_GET_PTS_DELAY:
*va_arg( args, int64_t * ) =
var_GetInteger( p_access, "cdda-caching" ) * INT64_C(1000);
INT64_C(1000) * var_InheritInteger( p_access, "disc-caching" );
break;
case ACCESS_SET_PAUSE_STATE:
......
......@@ -51,11 +51,6 @@ static void Close( vlc_object_t * );
"This value should be a FOURCC code in textual " \
"form, e.g. \"ntsc\"." )
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Caching value for DeckLink captures. This " \
"value should be set in milliseconds." )
#define AUDIO_CONNECTION_TEXT N_("Audio connection")
#define AUDIO_CONNECTION_LONGTEXT N_( \
"Audio connection to use for DeckLink captures. " \
......@@ -107,8 +102,6 @@ vlc_module_begin ()
CARD_INDEX_TEXT, CARD_INDEX_LONGTEXT, true )
add_string( "decklink-mode", "pal ",
MODE_TEXT, MODE_LONGTEXT, true )
add_integer( "decklink-caching", DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
add_string( "decklink-audio-connection", 0,
AUDIO_CONNECTION_TEXT, AUDIO_CONNECTION_LONGTEXT, true )
change_string_list( ppsz_audioconns, ppsz_audioconns_text, 0 )
......@@ -648,7 +641,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
pi64 = (int64_t*)va_arg( args, int64_t * );
*pi64 = var_InheritInteger( p_demux, "decklink-caching" ) * 1000;
*pi64 =
INT64_C(1000) * var_InheritInteger( p_demux, "live-caching" );
return VLC_SUCCESS;
case DEMUX_GET_TIME:
......
......@@ -130,10 +130,6 @@ static const char *const ppsz_standards_list_text[] =
"PAL_N_COMBO"
};
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Caching value for DirectShow streams. " \
"This value should be set in milliseconds." )
#define VDEV_TEXT N_("Video device name")
#define VDEV_LONGTEXT N_( \
"Name of the video device that will be used by the " \
......@@ -228,8 +224,6 @@ vlc_module_begin ()
set_description( N_("DirectShow input") )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACCESS )
add_integer( CFG_PREFIX "caching", (mtime_t)(0.2*CLOCK_FREQ) / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
add_string( CFG_PREFIX "vdev", NULL, VDEV_TEXT, VDEV_LONGTEXT, false)
change_string_list( ppsz_vdev, ppsz_vdev_text, FindDevicesCallback )
......@@ -505,8 +499,6 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
var_Create( p_this, CFG_PREFIX "amtuner-mode",
VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_this, CFG_PREFIX "caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_this, CFG_PREFIX "video-input", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_this, CFG_PREFIX "audio-input", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_this, CFG_PREFIX "video-output", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
......@@ -1953,7 +1945,8 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
/* */
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, CFG_PREFIX "caching" ) * 1000;
*pi_64 =
INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
break;
/* */
......@@ -1993,7 +1986,8 @@ static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
pi64 = (int64_t*)va_arg( args, int64_t * );
*pi64 = var_GetInteger( p_demux, CFG_PREFIX "caching" ) * 1000;
*pi_64 =
INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
return VLC_SUCCESS;
case DEMUX_GET_TIME:
......
......@@ -32,10 +32,6 @@
#include "dtv/dtv.h"
#define CACHING_TEXT N_("Caching value (ms)")
#define CACHING_LONGTEXT N_( \
"The cache size (delay) for digital broadcasts (in milliseconds).")
#define ADAPTER_TEXT N_("DVB adapter")
#define ADAPTER_LONGTEXT N_( \
"If there is more than one digital broadcasting adapter, " \
......@@ -242,10 +238,6 @@ vlc_module_begin ()
* really specific to the local system (e.g. device ID...).
* It wouldn't make sense to deliver those through a playlist. */
add_integer ("dvb-caching", DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true)
change_integer_range (0, 60000)
change_safe ()
#ifdef __linux__
add_integer ("dvb-adapter", 0, ADAPTER_TEXT, ADAPTER_LONGTEXT, false)
change_integer_range (0, 255)
......@@ -524,7 +516,7 @@ static int Control (access_t *access, int query, va_list args)
case ACCESS_GET_PTS_DELAY:
{
int64_t *v = va_arg (args, int64_t *);
*v = var_InheritInteger (access, "dvb-caching") * INT64_C(1000);
*v = var_InheritInteger (access, "live-caching") * INT64_C(1000);
return VLC_SUCCESS;
}
......
......@@ -56,18 +56,11 @@ static void Close( vlc_object_t * );
static block_t *Block( access_t * );
static int Control( access_t *, int, va_list );
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Caching value for DV streams. This " \
"value should be set in milliseconds." )
vlc_module_begin ()
set_description( N_("Digital Video (Firewire/ieee1394) input") )
set_shortname( N_("DV") )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACCESS )
add_integer( "dv-caching", 60000 / 1000, CACHING_TEXT, CACHING_LONGTEXT, true )
change_safe()
set_capability( "access", 0 )
add_shortcut( "dv", "dv1394", "raw1394" )
set_callbacks( Open, Close )
......@@ -209,9 +202,6 @@ static int Open( vlc_object_t *p_this )
p_sys->raw1394_poll.fd = raw1394_get_fd( p_sys->p_raw1394 );
p_sys->raw1394_poll.events = POLLIN | POLLPRI;
/* Update default_pts to a suitable value for udp access */
var_Create( p_access, "dv-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
/* Now create our event thread catcher */
p_sys->p_ev = calloc( 1, sizeof( *p_sys->p_ev ) );
if( !p_sys->p_ev )
......@@ -290,8 +280,8 @@ static int Control( access_t *p_access, int i_query, va_list args )
break;
case ACCESS_GET_PTS_DELAY:
*va_arg( args, int64_t * )
= var_GetInteger( p_access, "dv-caching" ) * 1000;
*va_arg( args, int64_t * ) =
INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
break;
/* */
......
......@@ -400,7 +400,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
/* */
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "dvb-caching" ) * 1000;
*pi_64 = DEFAULT_PTS_DELAY;
break;
/* */
......@@ -498,9 +498,6 @@ static void VarInit( access_t *p_access )
var_Destroy( p_access, "dvb-code-rate-lp" );
var_Destroy( p_access, "dvb-guard" );
/* */
var_Create( p_access, "dvb-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
/* */
var_Create( p_access, "dvb-adapter", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_access, "dvb-device", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
......
......@@ -72,10 +72,6 @@
#define ANGLE_LONGTEXT N_( \
"Default DVD angle." )
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Caching value for DVDs. This "\
"value should be set in milliseconds." )
#define MENU_TEXT N_("Start directly in menu")
#define MENU_LONGTEXT N_( \
"Start the DVD directly in the main menu. This "\
......@@ -93,8 +89,6 @@ vlc_module_begin ()
set_subcategory( SUBCAT_INPUT_ACCESS )
add_integer( "dvdnav-angle", 1, ANGLE_TEXT,
ANGLE_LONGTEXT, false )
add_integer( "dvdnav-caching", DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
add_bool( "dvdnav-menu", true,
MENU_TEXT, MENU_LONGTEXT, false )
set_capability( "access_demux", 5 )
......@@ -355,9 +349,6 @@ static int Open( vlc_object_t *p_this )
i_angle = var_CreateGetInteger( p_demux, "dvdnav-angle" );
if( i_angle <= 0 ) i_angle = 1;
/* Update default_pts to a suitable value for dvdnav access */
var_Create( p_demux, "dvdnav-caching", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
/* FIXME hack hack hack hack FIXME */
/* Get p_input and create variable */
p_sys->p_input = demux_GetParentInput( p_demux );
......@@ -563,8 +554,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_SUCCESS;
case DEMUX_GET_PTS_DELAY:
*va_arg( args, int64_t * )
= (int64_t)var_GetInteger( p_demux, "dvdnav-caching" ) *1000;
*va_arg( args, int64_t * ) =
INT64_C(1000) * var_InheritInteger( p_demux, "disc-caching" );
return VLC_SUCCESS;
case DEMUX_GET_META:
......
......@@ -63,11 +63,6 @@
#define ANGLE_LONGTEXT N_( \
"Default DVD angle." )
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Caching value for DVDs. " \
"This value should be set in milliseconds." )
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
......@@ -78,8 +73,6 @@ vlc_module_begin ()
set_subcategory( SUBCAT_INPUT_ACCESS )
add_integer( "dvdread-angle", 1, ANGLE_TEXT,
ANGLE_LONGTEXT, false )
add_integer( "dvdread-caching", DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
add_obsolete_string( "dvdread-css-method" ) /* obsolete since 1.1.0 */
set_capability( "access_demux", 0 )
add_shortcut( "dvd", "dvdread", "dvdsimple" )
......@@ -244,10 +237,6 @@ static int Open( vlc_object_t *p_this )
return VLC_EGENERIC;
}
/* Update default_pts to a suitable value for dvdread access */
var_Create( p_demux, "dvdread-caching",
VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
return VLC_SUCCESS;
}
......@@ -430,7 +419,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
pi64 = (int64_t*)va_arg( args, int64_t * );
*pi64 = var_GetInteger( p_demux, "dvdread-caching" )*1000;
*pi64 =
INT64_C(1000) * var_InheritInteger( p_demux, "disc-caching" );
return VLC_SUCCESS;
/* TODO implement others */
......
......@@ -58,11 +58,6 @@ static void Close( vlc_object_t * );
"EyeTV program number, or use 0 for last channel, " \
"-1 for S-Video input, -2 for Composite input" )
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Caching value for EyeTV captures. This " \
"value should be set in milliseconds." )
vlc_module_begin ()
set_shortname( "EyeTV" )
set_description( N_("EyeTV input") )
......@@ -75,8 +70,6 @@ vlc_module_begin ()
set_capability( "access", 0 )
add_shortcut( "eyetv" )
set_callbacks( Open, Close )
add_integer( "eyetv-caching", DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true);
vlc_module_end ()
/*****************************************************************************
......@@ -85,7 +78,6 @@ vlc_module_end ()
struct access_sys_t
{
int eyetvSock;
int i_pts_delay;
};
static block_t *BlockRead( access_t *);
......@@ -167,8 +159,6 @@ static int Open( vlc_object_t *p_this )
if( !p_sys )
return VLC_ENOMEM;
p_sys->i_pts_delay = var_InheritInteger( p_access, "eyetv-caching" );
msg_Dbg( p_access, "coming up" );
selectChannel( p_this, var_InheritInteger( p_access, "eyetv-channel" ) );
......@@ -323,7 +313,8 @@ static int Control( access_t *p_access, int i_query, va_list args )
/* */
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = (int64_t) p_sys->i_pts_delay * 1000;
*pi_64 =
INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
break;
case ACCESS_SET_PAUSE_STATE:
......
......@@ -86,7 +86,6 @@ struct access_sys_t
int fd;
/* */
unsigned caching;
bool b_pace_control;
};
......@@ -218,9 +217,6 @@ int Open( vlc_object_t *p_this )
p_access->p_sys = p_sys;
p_sys->i_nb_reads = 0;
p_sys->fd = fd;
p_sys->caching = var_InheritInteger (p_access, "file-caching");
if (IsRemote(fd))
p_sys->caching += var_InheritInteger (p_access, "network-caching");
p_sys->b_pace_control = true;
if (S_ISREG (st.st_mode))
......@@ -380,7 +376,11 @@ int FileControl( access_t *p_access, int i_query, va_list args )
/* */
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = p_sys->caching * INT64_C(1000);
if (IsRemote (p_sys->fd))
*pi_64 = var_InheritInteger (p_access, "network-caching");
else
*pi_64 = var_InheritInteger (p_access, "file-caching");
*pi_64 *= 1000;
break;
/* */
......
......@@ -55,10 +55,6 @@ static void InClose( vlc_object_t * );
static int OutOpen ( vlc_object_t * );
static void OutClose( vlc_object_t * );
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Caching value for FTP streams. This " \
"value should be set in milliseconds." )
#define USER_TEXT N_("FTP user name")
#define USER_LONGTEXT N_("User name that will " \
"be used for the connection.")
......@@ -75,9 +71,6 @@ vlc_module_begin ()
set_capability( "access", 0 )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACCESS )
add_integer( "ftp-caching", 2 * DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
change_safe()
add_string( "ftp-user", "anonymous", USER_TEXT, USER_LONGTEXT,
false )
add_string( "ftp-pwd", "anonymous@example.com", PASS_TEXT,
......@@ -382,9 +375,6 @@ static int InOpen( vlc_object_t *p_this )
goto exit_error;
}
/* Update default_pts to a suitable value for ftp access */
var_Create( p_access, "ftp-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
return VLC_SUCCESS;
error:
......@@ -602,7 +592,8 @@ static int Control( access_t *p_access, int i_query, va_list args )
/* */
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "ftp-caching" ) * INT64_C(1000);
*pi_64 = INT64_C(1000)
* var_InheritInteger( p_access, "network-caching" );
break;
/* */
......
......@@ -45,17 +45,11 @@
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Caching value for GnomeVFS streams."\
"This value should be set in milliseconds." )
vlc_module_begin ()
set_description( N_("GnomeVFS input") )
set_shortname( "GnomeVFS" )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACCESS )
add_integer( "gnomevfs-caching", DEFAULT_PTS_DELAY / 1000, CACHING_TEXT, CACHING_LONGTEXT, true )
set_capability( "access", 10 )
add_shortcut( "gnomevfs" )
set_callbacks( Open, Close )
......@@ -251,10 +245,6 @@ static int Open( vlc_object_t *p_this )
return VLC_EGENERIC;
}
/* Update default_pts to a suitable value for file access */
var_Create( p_access, "gnomevfs-caching",
VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
free( psz_uri );
p_sys->psz_name = psz_name;
gnome_vfs_uri_unref( p_uri);
......@@ -396,8 +386,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access,
"gnomevfs-caching" ) * INT64_C(1000);
*pi_64 = DEFAULT_PTS_DELAY; /* FIXME */
break;
/* */
......
......@@ -78,11 +78,6 @@ static void Close( vlc_object_t * );
#define PROXY_PASS_LONGTEXT N_( \
"If your HTTP proxy requires a password, set it here." )
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Caching value for HTTP streams. This " \
"value should be set in milliseconds." )
#define RECONNECT_TEXT N_("Auto re-connect")
#define RECONNECT_LONGTEXT N_( \
"Automatically try to reconnect to the stream in case of a sudden " \
......@@ -114,9 +109,6 @@ vlc_module_begin ()
false )
add_password( "http-proxy-pwd", NULL,
PROXY_PASS_TEXT, PROXY_PASS_LONGTEXT, false )
add_integer( "http-caching", 4 * DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
change_safe()
add_string( "http-referrer", NULL, REFERER_TEXT, REFERER_LONGTEXT, false )
change_safe()
add_string( "http-user-agent", NULL, UA_TEXT, UA_LONGTEXT, false )
......@@ -660,9 +652,6 @@ connect:
if( p_sys->b_reconnect ) msg_Dbg( p_access, "auto re-connect enabled" );
/* PTS delay */
var_Create( p_access, "http-caching", VLC_VAR_INTEGER |VLC_VAR_DOINHERIT );
return VLC_SUCCESS;
error:
......@@ -1047,7 +1036,8 @@ static int Control( access_t *p_access, int i_query, va_list args )
/* */
case ACCESS_GET_PTS_DELAY:
pi_64 = (int64_t*)va_arg( args, int64_t * );
*pi_64 = var_GetInteger( p_access, "http-caching" ) * 1000;
*pi_64 = INT64_C(1000)
* var_InheritInteger( p_access, "network-caching" );
break;
/* */
......
......@@ -46,11 +46,6 @@ static void CloseAccess(vlc_object_t *);
static int OpenDemux (vlc_object_t *);
static void CloseDemux(vlc_object_t *);
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_(\
"Caching value for imem streams. This " \
"value should be set in milliseconds.")
#define ID_TEXT N_("ID")
#define ID_LONGTEXT N_(\
"Set the ID of the elementary stream")
......@@ -125,8 +120,6 @@ vlc_module_begin()
set_category(CAT_INPUT)
set_subcategory(SUBCAT_INPUT_ACCESS)
add_integer("imem-caching", DEFAULT_PTS_DELAY / 1000, CACHING_TEXT, CACHING_LONGTEXT, true)
change_private()
add_string ("imem-get", "0", GET_TEXT, GET_LONGTEXT, true)
change_volatile()
add_string ("imem-release", "0", RELEASE_TEXT, RELEASE_LONGTEXT, true)
......@@ -224,8 +217,6 @@ typedef struct {
es_out_id_t *es;
mtime_t pts_delay;
mtime_t dts;
mtime_t deadline;
......@@ -288,7 +279,6 @@ static int OpenCommon(vlc_object_t *object, imem_sys_t **sys_ptr, const char *ps
sys->source.cookie ? sys->source.cookie : "(null)");
/* */
sys->pts_delay = var_InheritInteger(object, "imem-caching") * INT64_C(1000);
sys->dts = 0;
sys->deadline = VLC_TS_INVALID;
......@@ -357,7 +347,7 @@ static int ControlAccess(access_t *access, int i_query, va_list args)
}
case ACCESS_GET_PTS_DELAY: {
int64_t *delay = va_arg(args, int64_t *);
*delay = sys->pts_delay;
*delay = DEFAULT_PTS_DELAY; /* FIXME? */
return VLC_SUCCESS;
}
case ACCESS_SET_PAUSE_STATE:
......@@ -533,7 +523,7 @@ static int ControlDemux(demux_t *demux, int i_query, va_list args)
case DEMUX_GET_PTS_DELAY: {
int64_t *delay = va_arg(args, int64_t *);
*delay = sys->pts_delay;
*delay = DEFAULT_PTS_DELAY; /* FIXME? */
return VLC_SUCCESS;
}
case DEMUX_GET_POSITION: {
......@@ -628,7 +618,6 @@ static void ParseMRL(vlc_object_t *object, const char *psz_path)
const char *name;
int type;
} options[] = {
{ "caching", VLC_VAR_INTEGER },
{ "id", VLC_VAR_INTEGER },
{ "group", VLC_VAR_INTEGER },
{ "cat", VLC_VAR_INTEGER },
......
......@@ -56,10 +56,6 @@
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Make VLC buffer audio data captured from jack for the specified " \
"length in milliseconds." )
#define PACE_TEXT N_( "Pace" )
#define PACE_LONGTEXT N_( \
"Read the audio stream at VLC pace rather than Jack pace." )
......@@ -74,8 +70,6 @@ vlc_module_begin ()
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACCESS )
add_integer( "jack-input-caching", DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
add_bool( "jack-input-use-vlc-pace", false,
PACE_TEXT, PACE_LONGTEXT, true )
add_bool( "jack-input-auto-connect", false,
......@@ -146,8 +140,6 @@ static int Open( vlc_object_t *p_this )
Parse( p_demux );
/* Create var */
var_Create( p_demux, "jack-input-caching",
VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Create( p_demux, "jack-input-use-vlc-pace",
VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Create( p_demux, "jack-input-auto-connect",
......@@ -364,7 +356,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
pi64 = ( int64_t* )va_arg( args, int64_t * );
*pi64 = var_GetInteger( p_demux, "jack-input-caching" ) * 1000;
*pi64 = INT64_C(1000) * var_InheritInteger( p_demux, "live-caching" );
return VLC_SUCCESS;
case DEMUX_GET_TIME:
......
......@@ -69,10 +69,6 @@
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
"Allows you to modify the default caching value for hdsdi capture " \
"streams. This value should be set in millisecond units." )
#define LINK_TEXT N_("Link #")
#define LINK_LONGTEXT N_( \
"Allows you to set the desired link of the board for the capture (starting at 0)." )
......@@ -95,8 +91,6 @@ vlc_module_begin()
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_ACCESS )
add_integer( "linsys-hdsdi-caching", DEFAULT_PTS_DELAY / 1000,
CACHING_TEXT, CACHING_LONGTEXT, true )
add_integer( "linsys-hdsdi-link", 0,
LINK_TEXT, LINK_LONGTEXT, true )
......@@ -250,9 +244,6 @@ static int Open( vlc_object_t *p_this )
p_sys->p_audios[i].i_channel = -1;
/* Update default_pts to a suitable value for hdsdi access */
var_Create( p_demux, "linsys-hdsdi-caching", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
p_sys->i_link = var_InheritInteger( p_demux, "linsys-hdsdi-link" );
if( InitCapture( p_demux ) != VLC_SUCCESS )
......@@ -304,7 +295,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY: