]> git.sesse.net Git - vlc/blob - src/input/demux.c
* all: some helpers functions for pf_demux_control.
[vlc] / src / input / demux.c
1 /*****************************************************************************
2  * demux.c
3  *****************************************************************************
4  * Copyright (C) 1999-2003 VideoLAN
5  * $Id: demux.c,v 1.1 2003/08/02 16:43:59 fenrir Exp $
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 #include <stdlib.h>
25 #include <vlc/vlc.h>
26 #include <vlc/input.h>
27
28 #include "ninput.h"
29
30 int  demux_vaControl( input_thread_t *p_input, int i_query, va_list args )
31 {
32     if( p_input->pf_demux_control )
33     {
34         return p_input->pf_demux_control( p_input, i_query, args );
35     }
36     return VLC_EGENERIC;
37 }
38
39 int  demux_Control  ( input_thread_t *p_input, int i_query, ...  )
40 {
41     va_list args;
42     int     i_result;
43
44     va_start( args, i_query );
45     i_result = demux_vaControl( p_input, i_query, args );
46     va_end( args );
47
48     return i_result;
49 }
50