[vlc-commits] modules: the "live-caching" is always translated to a vlc_tick_t
Steve Lhomme
git at videolan.org
Fri Jul 6 10:48:30 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jul 6 10:03:49 2018 +0200| [5ef6d13736ba2ba2c8bbb2e5be38e2dd7de3fd16] | committer: Steve Lhomme
modules: the "live-caching" is always translated to a vlc_tick_t
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ef6d13736ba2ba2c8bbb2e5be38e2dd7de3fd16
---
modules/access/alsa.c | 2 +-
modules/access/avcapture.m | 2 +-
modules/access/decklink.cpp | 2 +-
modules/access/dshow/dshow.cpp | 4 ++--
modules/access/dtv/access.c | 2 +-
modules/access/dv.c | 2 +-
modules/access/jack.c | 2 +-
modules/access/linsys/linsys_hdsdi.c | 4 ++--
modules/access/linsys/linsys_sdi.c | 4 ++--
modules/access/oss.c | 4 ++--
modules/access/pulse.c | 2 +-
modules/access/qtsound.m | 2 +-
modules/access/rdp.c | 4 ++--
modules/access/satip.c | 2 +-
modules/access/screen/screen.c | 4 ++--
modules/access/screen/wayland.c | 4 ++--
modules/access/screen/xcb.c | 2 +-
modules/access/shm.c | 2 +-
modules/access/timecode.c | 2 +-
modules/access/v4l2/access.c | 4 ++--
modules/access/v4l2/demux.c | 4 ++--
modules/access/v4l2/radio.c | 4 ++--
modules/access/wasapi.c | 2 +-
23 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/modules/access/alsa.c b/modules/access/alsa.c
index dc99cca298..52b331ae46 100644
--- a/modules/access/alsa.c
+++ b/modules/access/alsa.c
@@ -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)
diff --git a/modules/access/avcapture.m b/modules/access/avcapture.m
index ed9dc54e20..034a2a56be 100644
--- a/modules/access/avcapture.m
+++ b/modules/access/avcapture.m
@@ -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:
diff --git a/modules/access/decklink.cpp b/modules/access/decklink.cpp
index 1650351183..4c71b8cbda 100644
--- a/modules/access/decklink.cpp
+++ b/modules/access/decklink.cpp
@@ -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:
diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index c7d3f6b900..41721e7bce 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -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:
diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
index 35c541a96f..c050c35c9e 100644
--- a/modules/access/dtv/access.c
+++ b/modules/access/dtv/access.c
@@ -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;
}
diff --git a/modules/access/dv.c b/modules/access/dv.c
index 0ea1c46464..ddc52e6a20 100644
--- a/modules/access/dv.c
+++ b/modules/access/dv.c
@@ -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;
/* */
diff --git a/modules/access/jack.c b/modules/access/jack.c
index 0e19ef0b36..f3a8482b2c 100644
--- a/modules/access/jack.c
+++ b/modules/access/jack.c
@@ -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:
diff --git a/modules/access/linsys/linsys_hdsdi.c b/modules/access/linsys/linsys_hdsdi.c
index 62e11c50ba..7cf6c4bc6c 100644
--- a/modules/access/linsys/linsys_hdsdi.c
+++ b/modules/access/linsys/linsys_hdsdi.c
@@ -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 */
diff --git a/modules/access/linsys/linsys_sdi.c b/modules/access/linsys/linsys_sdi.c
index 3c629bd767..1af25eae60 100644
--- a/modules/access/linsys/linsys_sdi.c
+++ b/modules/access/linsys/linsys_sdi.c
@@ -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 */
diff --git a/modules/access/oss.c b/modules/access/oss.c
index cd817a5e74..282ff502c4 100644
--- a/modules/access/oss.c
+++ b/modules/access/oss.c
@@ -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:
diff --git a/modules/access/pulse.c b/modules/access/pulse.c
index 35d1f60c11..e6f7bffdb5 100644
--- a/modules/access/pulse.c
+++ b/modules/access/pulse.c
@@ -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 */
diff --git a/modules/access/qtsound.m b/modules/access/qtsound.m
index 08102bc593..47c96d7ffd 100644
--- a/modules/access/qtsound.m
+++ b/modules/access/qtsound.m
@@ -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:
diff --git a/modules/access/rdp.c b/modules/access/rdp.c
index 4dbe2f37a5..96613bc801 100644
--- a/modules/access/rdp.c
+++ b/modules/access/rdp.c
@@ -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:
diff --git a/modules/access/satip.c b/modules/access/satip.c
index 5ab0875c79..a195ffb840 100644
--- a/modules/access/satip.c
+++ b/modules/access/satip.c
@@ -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:
diff --git a/modules/access/screen/screen.c b/modules/access/screen/screen.c
index dda2b99fc2..7e00ac014a 100644
--- a/modules/access/screen/screen.c
+++ b/modules/access/screen/screen.c
@@ -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:
diff --git a/modules/access/screen/wayland.c b/modules/access/screen/wayland.c
index 3fa740fdc1..07da0bde36 100644
--- a/modules/access/screen/wayland.c
+++ b/modules/access/screen/wayland.c
@@ -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:
diff --git a/modules/access/screen/xcb.c b/modules/access/screen/xcb.c
index d2f3babc8e..cf7f986182 100644
--- a/modules/access/screen/xcb.c
+++ b/modules/access/screen/xcb.c
@@ -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;
}
diff --git a/modules/access/shm.c b/modules/access/shm.c
index 0f415aaf6b..1f09fff2a7 100644
--- a/modules/access/shm.c
+++ b/modules/access/shm.c
@@ -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;
}
diff --git a/modules/access/timecode.c b/modules/access/timecode.c
index 47505b5270..43ab3a4210 100644
--- a/modules/access/timecode.c
+++ b/modules/access/timecode.c
@@ -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;
}
diff --git a/modules/access/v4l2/access.c b/modules/access/v4l2/access.c
index 9ce5f5c764..cf45a68e90 100644
--- a/modules/access/v4l2/access.c
+++ b/modules/access/v4l2/access.c
@@ -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:
diff --git a/modules/access/v4l2/demux.c b/modules/access/v4l2/demux.c
index 77adfc53f2..a8453a6a3e 100644
--- a/modules/access/v4l2/demux.c
+++ b/modules/access/v4l2/demux.c
@@ -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:
diff --git a/modules/access/v4l2/radio.c b/modules/access/v4l2/radio.c
index fa33dc1124..ce872a2a81 100644
--- a/modules/access/v4l2/radio.c
+++ b/modules/access/v4l2/radio.c
@@ -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:
diff --git a/modules/access/wasapi.c b/modules/access/wasapi.c
index 1565ccbbb2..2ea997efb9 100644
--- a/modules/access/wasapi.c
+++ b/modules/access/wasapi.c
@@ -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;
More information about the vlc-commits
mailing list