Commit bb15cea2 authored by Laurent Aimar's avatar Laurent Aimar

* all: some helpers functions for pf_demux_control.

parent ed8d7b24
......@@ -292,6 +292,7 @@ SOURCES_libvlc_common = \
src/playlist/playlist.c \
src/input/input.c \
src/input/stream.c \
src/input/demux.c \
src/input/input_ext-plugins.c \
src/input/input_ext-dec.c \
src/input/input_ext-intf.c \
......
......@@ -2,7 +2,7 @@
* ninput.h
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ninput.h,v 1.1 2003/08/01 00:00:12 fenrir Exp $
* $Id: ninput.h,v 1.2 2003/08/02 16:43:59 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -25,7 +25,8 @@
#define _NINPUT_H 1
/*
* stream
* Stream
*
*/
enum streamQuery_e
{
......@@ -40,6 +41,22 @@ enum streamQuery_e
STREAM_GET_SIZE, /* arg1= int64_t * res=cannot fail (0 if no sense)*/
};
/*
* Demux
*
*/
#define DEMUX_POSITION_MAX 10000
enum demuxQuery_e
{
DEMUX_GET_POSITION, /* arg1= int64_t * res= */
DEMUX_SET_POSITION, /* arg1= int64_t res=can fail */
DEMUX_GET_TIME, /* arg1= int64_t * res= */
DEMUX_SET_TIME, /* arg1= int64_t res=can fail */
DEMUX_GET_LENGTH /* arg1= int64_t * res=can fail */
};
VLC_EXPORT( stream_t *, stream_OpenInput, ( input_thread_t * ) );
VLC_EXPORT( void, stream_Release, ( stream_t * ) );
......@@ -50,5 +67,8 @@ VLC_EXPORT( int, stream_Peek, ( stream_t *, uint8_t **, in
VLC_EXPORT( pes_packet_t *, stream_PesPacket, ( stream_t *, int ) );
VLC_EXPORT( int, demux_vaControl, ( input_thread_t *, int, va_list ) );
VLC_EXPORT( int, demux_Control, ( input_thread_t *, int, ... ) );
#endif
/*****************************************************************************
* demux.c
*****************************************************************************
* Copyright (C) 1999-2003 VideoLAN
* $Id: demux.c,v 1.1 2003/08/02 16:43:59 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <stdlib.h>
#include <vlc/vlc.h>
#include <vlc/input.h>
#include "ninput.h"
int demux_vaControl( input_thread_t *p_input, int i_query, va_list args )
{
if( p_input->pf_demux_control )
{
return p_input->pf_demux_control( p_input, i_query, args );
}
return VLC_EGENERIC;
}
int demux_Control ( input_thread_t *p_input, int i_query, ... )
{
va_list args;
int i_result;
va_start( args, i_query );
i_result = demux_vaControl( p_input, i_query, args );
va_end( args );
return i_result;
}
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