From 028552b92044d887b5429129cb7c3c689a821807 Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Wed, 3 Mar 2004 11:59:41 +0000 Subject: [PATCH] * input.c: add Duration to input infos. --- src/input/input.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/input/input.c b/src/input/input.c index 94c88c25c4..0b66bc9fda 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -4,7 +4,7 @@ * decoders. ***************************************************************************** * Copyright (C) 1998-2004 VideoLAN - * $Id: input.c,v 1.290 2004/02/16 17:14:15 zorglub Exp $ + * $Id: input.c,v 1.291 2004/03/03 11:59:41 fenrir Exp $ * * Authors: Christophe Massiot * @@ -887,6 +887,7 @@ static int InitThread( input_thread_t * p_input ) /* get length */ if( !demux_Control( p_input, DEMUX_GET_LENGTH, &i_length ) && i_length > 0 ) { + input_info_category_t *p_cat = input_InfoCategory( p_input, _("File") ); p_playlist = (playlist_t*)vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, FIND_PARENT ); @@ -897,6 +898,12 @@ static int InitThread( input_thread_t * p_input ) var_Set( p_playlist, "item-change", val ); vlc_object_release( p_playlist ); } + if( p_cat ) + { + char psz_buffer[MSTRTIME_MAX_SIZE]; + input_AddInfo( p_cat, _("Duration"), + msecstotimestr( psz_buffer, i_length / 1000 ) ); + } } -- GitLab