mirror of
https://github.com/videolan/vlc.git
synced 2024-11-23 18:03:48 +08:00
modules: the "live-caching" is always translated to a vlc_tick_t
This commit is contained in:
parent
416913eb01
commit
5ef6d13736
@ -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, ¶m, NULL);
|
||||
if (val)
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
/* */
|
||||
|
@ -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:
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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:
|
||||
|
@ -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 */
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user