demux.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * demux.h: Input demux functions
00003  *****************************************************************************
00004  * Copyright (C) 1998-2008 VLC authors and VideoLAN
00005  * Copyright (C) 2008 Laurent Aimar
00006  * $Id: 3372f17229d5ff15ab1729464a0db7ac202eb1ab $
00007  *
00008  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
00009  *
00010  * This program is free software; you can redistribute it and/or modify it
00011  * under the terms of the GNU Lesser General Public License as published by
00012  * the Free Software Foundation; either version 2.1 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018  * GNU Lesser General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU Lesser General Public License
00021  * along with this program; if not, write to the Free Software Foundation,
00022  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef LIBVLC_INPUT_DEMUX_H
00026 #define LIBVLC_INPUT_DEMUX_H 1
00027 
00028 #include <vlc_common.h>
00029 #include <vlc_demux.h>
00030 
00031 #include "stream.h"
00032 
00033 /* stream_t *s could be null and then it mean a access+demux in one */
00034 demux_t *demux_New( vlc_object_t *p_obj, input_thread_t *p_parent_input, const char *psz_access, const char *psz_demux, const char *psz_path, stream_t *s, es_out_t *out, bool );
00035 #define demux_New( a, b, c, d, e, f, g, h ) demux_New(VLC_OBJECT(a),b,c,d,e,f,g,h)
00036 
00037 void demux_Delete( demux_t * );
00038 
00039 static inline int demux_Demux( demux_t *p_demux )
00040 {
00041     if( !p_demux->pf_demux )
00042         return 1;
00043 
00044     return p_demux->pf_demux( p_demux );
00045 }
00046 static inline int demux_vaControl( demux_t *p_demux, int i_query, va_list args )
00047 {
00048     return p_demux->pf_control( p_demux, i_query, args );
00049 }
00050 static inline int demux_Control( demux_t *p_demux, int i_query, ... )
00051 {
00052     va_list args;
00053     int     i_result;
00054 
00055     va_start( args, i_query );
00056     i_result = demux_vaControl( p_demux, i_query, args );
00057     va_end( args );
00058     return i_result;
00059 }
00060 
00061 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines