From: Laurent Aimar Date: Fri, 22 Aug 2003 20:29:58 +0000 (+0000) Subject: * ninput: added wrappers to stream_Control. X-Git-Tag: 0.7.0~1081 X-Git-Url: http://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;p=vlc.git;a=commitdiff_plain;h=6b177dca96af4674365aa988f8e7e3780f3fcd28 * ninput: added wrappers to stream_Control. --- diff --git a/include/ninput.h b/include/ninput.h index 0efc30a834..869bbd3b3f 100644 --- a/include/ninput.h +++ b/include/ninput.h @@ -2,7 +2,7 @@ * ninput.h ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ninput.h,v 1.5 2003/08/18 19:17:54 fenrir Exp $ + * $Id: ninput.h,v 1.6 2003/08/22 20:29:58 fenrir Exp $ * * Authors: Laurent Aimar * @@ -47,6 +47,26 @@ enum stream_query_e STREAM_GET_SIZE, /**< arg1= int64_t * res=cannot fail (0 if no sense)*/ }; +static int64_t inline stream_Tell( stream_t *s ) +{ + int64_t i_pos; + stream_Control( s, STREAM_GET_POSITION, &i_pos ); + + return i_pos; +} +static int64_t inline stream_Size( stream_t *s ) +{ + int64_t i_pos; + stream_Control( s, STREAM_GET_SIZE, &i_pos ); + + return i_pos; +} +static int inline stream_Seek( stream_t *s, int64_t i_pos ) +{ + return stream_Control( s, STREAM_SET_POSITION, i_pos ); +} + + /* Stream */ VLC_EXPORT( stream_t *, stream_OpenInput, ( input_thread_t * ) ); VLC_EXPORT( void, stream_Release, ( stream_t * ) );