[vlc-devel] commit: Remove msecstotimestr ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Feb 20 18:44:10 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 20 19:33:29 2010 +0200| [9d269c5baa523f8460b3f4c622feb85229e284d1] | committer: Rémi Denis-Courmont
Remove msecstotimestr
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9d269c5baa523f8460b3f4c622feb85229e284d1
---
include/vlc_mtime.h | 8 --------
modules/access/vcdx/access.c | 4 ++--
modules/gui/ncurses.c | 4 ++--
3 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/include/vlc_mtime.h b/include/vlc_mtime.h
index 60063ea..b3df907 100644
--- a/include/vlc_mtime.h
+++ b/include/vlc_mtime.h
@@ -51,14 +51,6 @@
*****************************************************************************/
#define MSTRTIME_MAX_SIZE 22
-/* Well, Duh? But it does clue us in that we are converting from
- millisecond quantity to a second quantity or vice versa.
-*/
-#define MILLISECONDS_PER_SEC 1000
-
-#define msecstotimestr(psz_buffer, msecs) \
- secstotimestr( psz_buffer, (msecs / (int) MILLISECONDS_PER_SEC) )
-
/*****************************************************************************
* Prototypes
*****************************************************************************/
diff --git a/modules/access/vcdx/access.c b/modules/access/vcdx/access.c
index f6bb46c..91c7761 100644
--- a/modules/access/vcdx/access.c
+++ b/modules/access/vcdx/access.c
@@ -193,7 +193,7 @@ VCDReadBlock( access_t * p_access )
Until then...
*/
#if 1
- msleep( MILLISECONDS_PER_SEC * *p_buf );
+ msleep( INT64_C(1000) * *p_buf );
VCDSetOrigin(p_access, p_vcdplayer->origin_lsn,
p_vcdplayer->i_track, &(p_vcdplayer->play_item));
// p_vcd->in_still = false;
@@ -1050,7 +1050,7 @@ static int VCDControl( access_t *p_access, int i_query, va_list args )
/* */
case ACCESS_GET_PTS_DELAY:
- *(int64_t*)va_arg(args,int64_t *) = MILLISECONDS_PER_SEC *
+ *(int64_t*)va_arg(args,int64_t *) = INT64_C(1000) *
var_GetInteger( p_access, MODULE_STRING "-caching" );
dbg_print( INPUT_DBG_EVENT, "GET PTS DELAY" );
return VLC_SUCCESS;
diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index bd4e097..2eaf95f 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -1520,10 +1520,10 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
/* Position */
var_Get( p_input, "time", &val );
- msecstotimestr( buf1, val.i_time / 1000 );
+ secstotimestr( buf1, val.i_time / CLOCK_FREQ );
var_Get( p_input, "length", &val );
- msecstotimestr( buf2, val.i_time / 1000 );
+ secstotimestr( buf2, val.i_time / CLOCK_FREQ );
mvnprintw( y++, 0, COLS, _(" Position : %s/%s (%.2f%%)"), buf1, buf2, p_sys->f_slider );
More information about the vlc-devel
mailing list