Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

vlc_es_out.h

00001 /*****************************************************************************
00002  * vlc_es_out.h
00003  *****************************************************************************
00004  * Copyright (C) 1999-2004 the VideoLAN team
00005  * $Id: vlc_es_out.h 12202 2005-08-15 14:57:02Z zorglub $
00006  *
00007  * Authors: Laurent Aimar <[email protected]>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef _VLC_ES_OUT_H
00025 #define _VLC_ES_OUT_H 1
00026 
00032 enum es_out_mode_e
00033 {
00034     ES_OUT_MODE_NONE,   /* don't select anything */
00035     ES_OUT_MODE_ALL,    /* eg for stream output */
00036     ES_OUT_MODE_AUTO,   /* best audio/video or for input follow audio-track, sub-track */
00037     ES_OUT_MODE_PARTIAL /* select programs given after --programs */
00038 };
00039 
00040 enum es_out_query_e
00041 {
00042     /* activate apply of mode */
00043     ES_OUT_SET_ACTIVE,  /* arg1= vlc_bool_t                     */
00044     /* see if mode is currently aplied or not */
00045     ES_OUT_GET_ACTIVE,  /* arg1= vlc_bool_t*                    */
00046 
00047     /* set/get mode */
00048     ES_OUT_SET_MODE,    /* arg1= int                            */
00049     ES_OUT_GET_MODE,    /* arg2= int*                           */
00050 
00051     /* set es selected for the es category(audio/video/spu) */
00052     ES_OUT_SET_ES,      /* arg1= es_out_id_t*                   */
00053 
00054     /* force selection/unselection of the ES (bypass current mode)*/
00055     ES_OUT_SET_ES_STATE,/* arg1= es_out_id_t* arg2=vlc_bool_t   */
00056     ES_OUT_GET_ES_STATE,/* arg1= es_out_id_t* arg2=vlc_bool_t*  */
00057 
00058     /* */
00059     ES_OUT_SET_GROUP,   /* arg1= int                            */
00060     ES_OUT_GET_GROUP,   /* arg1= int*                           */
00061 
00062     /* PCR handling, dts/pts will be automatically computed using thoses PCR
00063      * XXX: SET_PCR(_GROUP) is in charge of the pace control. They will wait to slow
00064      * down the demuxer to read at the right speed.
00065      * XXX: if you want PREROLL just call RESET_PCR and ES_OUT_SET_NEXT_DISPLAY_TIME and send
00066      * data to the decoder *without* calling SET_PCR until preroll is finished.
00067      */
00068     ES_OUT_SET_PCR,             /* arg1=int64_t i_pcr(microsecond!) (using default group 0)*/
00069     ES_OUT_SET_GROUP_PCR,       /* arg1= int i_group, arg2=int64_t i_pcr(microsecond!)*/
00070     ES_OUT_RESET_PCR,           /* no arg */
00071 
00072     /* Timestamp handling, convert an input timestamp to a global clock one.
00073      * (shouldn't have to be used by input plugins directly) */
00074     ES_OUT_GET_TS,             /* arg1=int64_t i_ts(microsecond!) (using default group 0), arg2=int64_t* converted i_ts */
00075 
00076     /* Try not to use this one as it is a bit hacky */
00077     ES_OUT_SET_FMT,     /* arg1= es_out_id_t* arg2=es_format_t* */
00078 
00079     /* Allow preroll of data (data with dts/pts < i_pts for one ES will be decoded but not displayed */
00080     ES_OUT_SET_NEXT_DISPLAY_TIME,   /* arg1=es_out_id_t* arg2=int64_t i_pts(microsecond) */
00081     /* Set meta data for group (dynamic) */
00082     ES_OUT_SET_GROUP_META,  /* arg1=int i_group arg2=vlc_meta_t */
00083     /* */
00084     ES_OUT_DEL_GROUP        /* arg1=int i_group */
00085 };
00086 
00087 struct es_out_t
00088 {
00089     es_out_id_t *(*pf_add)    ( es_out_t *, es_format_t * );
00090     int          (*pf_send)   ( es_out_t *, es_out_id_t *, block_t * );
00091     void         (*pf_del)    ( es_out_t *, es_out_id_t * );
00092     int          (*pf_control)( es_out_t *, int i_query, va_list );
00093 
00094     es_out_sys_t    *p_sys;
00095 };
00096 
00097 static inline es_out_id_t * es_out_Add( es_out_t *out, es_format_t *fmt )
00098 {
00099     return out->pf_add( out, fmt );
00100 }
00101 static inline void es_out_Del( es_out_t *out, es_out_id_t *id )
00102 {
00103     out->pf_del( out, id );
00104 }
00105 static inline int es_out_Send( es_out_t *out, es_out_id_t *id,
00106                                block_t *p_block )
00107 {
00108     return out->pf_send( out, id, p_block );
00109 }
00110 
00111 static inline int es_out_vaControl( es_out_t *out, int i_query, va_list args )
00112 {
00113     return out->pf_control( out, i_query, args );
00114 }
00115 static inline int es_out_Control( es_out_t *out, int i_query, ... )
00116 {
00117     va_list args;
00118     int     i_result;
00119 
00120     va_start( args, i_query );
00121     i_result = es_out_vaControl( out, i_query, args );
00122     va_end( args );
00123     return i_result;
00124 }
00125 
00130 #endif

Generated on Tue Dec 20 10:14:19 2005 for vlc-0.8.4a by  doxygen 1.4.2