modules: the "live-caching" is always translated to a vlc_tick_t

This commit is contained in:
Steve Lhomme 2018-07-06 10:03:49 +02:00
parent 416913eb01
commit 5ef6d13736
23 changed files with 33 additions and 33 deletions

View File

@ -459,7 +459,7 @@ static int Open (vlc_object_t *obj)
sys->rate = param;
sys->start = vlc_tick_now ();
sys->caching = INT64_C(1000) * var_InheritInteger (demux, "live-caching");
sys->caching = VLC_TICK_FROM_MS(var_InheritInteger (demux, "live-caching"));
param = sys->caching;
val = snd_pcm_hw_params_set_buffer_time_near (pcm, hw, &param, NULL);
if (val)

View File

@ -451,7 +451,7 @@ static int Control(demux_t *p_demux, int i_query, va_list args)
case DEMUX_GET_PTS_DELAY:
pi64 = va_arg(args, int64_t *);
*pi64 = INT64_C(1000) * var_InheritInteger(p_demux, "live-caching");
*pi64 = VLC_TICK_FROM_MS(var_InheritInteger(p_demux, "live-caching"));
return VLC_SUCCESS;
case DEMUX_GET_TIME:

View File

@ -742,7 +742,7 @@ static int Control(demux_t *demux, int query, va_list args)
case DEMUX_GET_PTS_DELAY:
pi64 = va_arg(args, int64_t *);
*pi64 = INT64_C(1000) * var_InheritInteger(demux, "live-caching");
*pi64 = VLC_TICK_FROM_MS(var_InheritInteger(demux, "live-caching"));
return VLC_SUCCESS;
case DEMUX_GET_TIME:

View File

@ -1933,7 +1933,7 @@ static int AccessControl( stream_t *p_access, int i_query, va_list args )
case STREAM_GET_PTS_DELAY:
pi_64 = va_arg( args, int64_t * );
*pi_64 =
INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
VLC_TICK_FROM_MS( var_InheritInteger( p_access, "live-caching" ) );
break;
case STREAM_GET_CONTENT_TYPE:
@ -1982,7 +1982,7 @@ static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
pi64 = va_arg( args, int64_t * );
*pi64 =
INT64_C(1000) * var_InheritInteger( p_demux, "live-caching" );
VLC_TICK_FROM_MS( var_InheritInteger( p_demux, "live-caching" ) );
return VLC_SUCCESS;
case DEMUX_GET_TIME:

View File

@ -541,7 +541,7 @@ static int Control (stream_t *access, int query, va_list args)
case STREAM_GET_PTS_DELAY:
{
int64_t *v = va_arg (args, int64_t *);
*v = var_InheritInteger (access, "live-caching") * INT64_C(1000);
*v = VLC_TICK_FROM_MS( var_InheritInteger (access, "live-caching") );
break;
}

View File

@ -283,7 +283,7 @@ static int Control( stream_t *p_access, int i_query, va_list args )
case STREAM_GET_PTS_DELAY:
*va_arg( args, int64_t * ) =
INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
VLC_TICK_FROM_MS( var_InheritInteger( p_access, "live-caching" ) );
break;
/* */

View File

@ -341,7 +341,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
pi64 = va_arg( args, int64_t * );
*pi64 = INT64_C(1000) * var_InheritInteger( p_demux, "live-caching" );
*pi64 = VLC_TICK_FROM_MS( var_InheritInteger( p_demux, "live-caching" ) );
return VLC_SUCCESS;
case DEMUX_GET_TIME:

View File

@ -310,8 +310,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
pi64 = va_arg( args, int64_t * );
*pi64 = INT64_C(1000)
* var_InheritInteger( p_demux, "live-caching" );
*pi64 = VLC_TICK_FROM_MS(
var_InheritInteger( p_demux, "live-caching" ) );
return VLC_SUCCESS;
/* TODO implement others */

View File

@ -379,8 +379,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
pi64 = va_arg( args, int64_t * );
*pi64 = INT64_C(1000)
* var_InheritInteger( p_demux, "live-caching" );
*pi64 = VLC_TICK_FROM_MS(
var_InheritInteger( p_demux, "live-caching" ) );
return VLC_SUCCESS;
/* TODO implement others */

View File

@ -218,8 +218,8 @@ static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
pi64 = va_arg( args, int64_t * );
*pi64 = INT64_C(1000)
* var_InheritInteger( p_demux, "live-caching" );
*pi64 = VLC_TICK_FROM_MS(
var_InheritInteger( p_demux, "live-caching" ) );
return VLC_SUCCESS;
case DEMUX_GET_TIME:

View File

@ -269,7 +269,7 @@ static int Open(vlc_object_t *obj)
sys->stream = NULL;
sys->es = NULL;
sys->discontinuity = false;
sys->caching = INT64_C(1000) * var_InheritInteger(obj, "live-caching");
sys->caching = VLC_TICK_FROM_MS( var_InheritInteger(obj, "live-caching") );
demux->p_sys = sys;
/* Stream parameters */

View File

@ -548,7 +548,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 = INT64_C(1000) * var_InheritInteger(p_demux, "live-caching");
*pi64 = VLC_TICK_FROM_MS(var_InheritInteger(p_demux, "live-caching"));
return VLC_SUCCESS;
default:

View File

@ -303,8 +303,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
pi64 = va_arg( args, int64_t * );
*pi64 = INT64_C(1000)
* var_InheritInteger( p_demux, "live-caching" );
*pi64 = VLC_TICK_FROM_MS(
var_InheritInteger( p_demux, "live-caching" ) );
return VLC_SUCCESS;
case DEMUX_GET_TIME:

View File

@ -570,7 +570,7 @@ static int satip_control(stream_t *access, int i_query, va_list args) {
case STREAM_GET_PTS_DELAY:
pi_64 = va_arg(args, int64_t *);
*pi_64 = INT64_C(1000) * var_InheritInteger(access, "live-caching");
*pi_64 = VLC_TICK_FROM_MS(var_InheritInteger(access, "live-caching"));
break;
default:

View File

@ -321,8 +321,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_GET_PTS_DELAY:
pi64 = va_arg( args, int64_t * );
*pi64 = INT64_C(1000)
* var_InheritInteger( p_demux, "live-caching" );
*pi64 = VLC_TICK_FROM_MS(
var_InheritInteger( p_demux, "live-caching" ) );
return VLC_SUCCESS;
case DEMUX_GET_TIME:

View File

@ -303,8 +303,8 @@ static int Control(demux_t *demux, int query, va_list args)
// break;
case DEMUX_GET_PTS_DELAY:
*va_arg(args, int64_t *) = INT64_C(1000)
* var_InheritInteger(demux, "live-caching");
*va_arg(args, int64_t *) = VLC_TICK_FROM_MS(
var_InheritInteger(demux, "live-caching") );
break;
case DEMUX_CAN_CONTROL_PACE:

View File

@ -302,7 +302,7 @@ static int Control (demux_t *demux, int query, va_list args)
case DEMUX_GET_PTS_DELAY:
{
int64_t *v = va_arg (args, int64_t *);
*v = INT64_C(1000) * var_InheritInteger (demux, "live-caching");
*v = VLC_TICK_FROM_MS(var_InheritInteger (demux, "live-caching"));
return VLC_SUCCESS;
}

View File

@ -295,7 +295,7 @@ static int Control (demux_t *demux, int query, va_list args)
case DEMUX_GET_PTS_DELAY:
{
int64_t *v = va_arg (args, int64_t *);
*v = INT64_C(1000) * var_InheritInteger (demux, "live-caching");
*v = VLC_TICK_FROM_MS( var_InheritInteger (demux, "live-caching") );
return VLC_SUCCESS;
}

View File

@ -148,7 +148,7 @@ static int Control (demux_t *demux, int query, va_list args)
case DEMUX_GET_PTS_DELAY:
{
int64_t *v = va_arg (args, int64_t *);
*v = INT64_C(1000) * var_InheritInteger (demux, "live-caching");
*v = VLC_TICK_FROM_MS( var_InheritInteger (demux, "live-caching") );
break;
}

View File

@ -263,8 +263,8 @@ static int AccessControl( stream_t *access, int query, va_list args )
break;
case STREAM_GET_PTS_DELAY:
*va_arg(args,int64_t *) = INT64_C(1000)
* var_InheritInteger( access, "live-caching" );
*va_arg(args,int64_t *) = VLC_TICK_FROM_MS(
var_InheritInteger( access, "live-caching" ) );
break;
case STREAM_SET_PAUSE_STATE:

View File

@ -848,8 +848,8 @@ static int DemuxControl( demux_t *demux, int query, va_list args )
return VLC_SUCCESS;
case DEMUX_GET_PTS_DELAY:
*va_arg(args,int64_t *) = INT64_C(1000)
* var_InheritInteger( demux, "live-caching" );
*va_arg(args,int64_t *) = VLC_TICK_FROM_MS(
var_InheritInteger( demux, "live-caching" ) );
return VLC_SUCCESS;
case DEMUX_GET_TIME:

View File

@ -50,8 +50,8 @@ static int RadioControl (demux_t *demux, int query, va_list args)
break;
case DEMUX_GET_PTS_DELAY:
*va_arg (args,int64_t *) = INT64_C(1000)
* var_InheritInteger (demux, "live-caching");
*va_arg (args,int64_t *) = VLC_TICK_FROM_MS(
var_InheritInteger (demux, "live-caching") );
break;
case DEMUX_GET_TIME:

View File

@ -396,7 +396,7 @@ static int Open(vlc_object_t *obj)
sys->client = NULL;
sys->es = NULL;
sys->caching = INT64_C(1000) * var_InheritInteger(obj, "live-caching");
sys->caching = VLC_TICK_FROM_MS( var_InheritInteger(obj, "live-caching") );
sys->start_time = vlc_tick_now();
for (unsigned i = 0; i < 2; i++)
sys->events[i] = NULL;