Commit 63515e2f authored by Laurent Aimar's avatar Laurent Aimar

* all: added STREAM_GET_MTU and stream_MTU.

parent c87130e6
......@@ -2,7 +2,7 @@
* ninput.h
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ninput.h,v 1.23 2004/01/07 15:31:31 fenrir Exp $
* $Id: ninput.h,v 1.24 2004/01/16 11:12:16 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -117,6 +117,8 @@ enum stream_query_e
STREAM_GET_POSITION, /**< arg1= int64_t * res=cannot fail*/
STREAM_GET_SIZE, /**< arg1= int64_t * res=cannot fail (0 if no sense)*/
STREAM_GET_MTU, /**< arg1= int * res=cannot fail (0 if no sense)*/
};
/* Stream */
......@@ -145,12 +147,17 @@ static int64_t inline stream_Size( stream_t *s )
return i_pos;
}
static int inline stream_MTU( stream_t *s )
{
int i_mtu;
return stream_Control( s, STREAM_GET_POSITION, &i_mtu );
}
static int inline stream_Seek( stream_t *s, int64_t i_pos )
{
return stream_Control( s, STREAM_SET_POSITION, i_pos );
}
/**
* @}
*/
......
......@@ -2,7 +2,7 @@
* stream.c
*****************************************************************************
* Copyright (C) 1999-2004 VideoLAN
* $Id: stream.c,v 1.10 2004/01/06 21:42:43 sigmunau Exp $
* $Id: stream.c,v 1.11 2004/01/16 11:12:16 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -78,6 +78,7 @@ int stream_vaControl( stream_t *s, int i_query, va_list args )
{
vlc_bool_t *p_b;
int64_t *p_i64, i64;
int *p_int;
switch( i_query )
{
......@@ -172,7 +173,11 @@ int stream_vaControl( stream_t *s, int i_query, va_list args )
}
}
}
return VLC_SUCCESS;
case STREAM_GET_MTU:
p_int = (int*) va_arg( args, int * );
*p_int = s->p_input->i_mtu;
return VLC_SUCCESS;
default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment