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

vlc_spu.h

00001 /*****************************************************************************
00002  * vlc_spu.h : subpicture unit
00003  *****************************************************************************
00004  * Copyright (C) 1999, 2000 the VideoLAN team
00005  * $Id: vlc_spu.h 11664 2005-07-09 06:17:09Z courmisch $
00006  *
00007  * Authors: Gildas Bazin <[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 
00035 struct spu_t
00036 {
00037     VLC_COMMON_MEMBERS
00038 
00039     vlc_mutex_t  subpicture_lock;                  
00040     subpicture_t p_subpicture[VOUT_MAX_SUBPICTURES];        
00041     int i_channel;             
00043     filter_t *p_blend;                            
00044     filter_t *p_text;                              
00045     filter_t *p_scale;                                   
00047     vlc_bool_t b_force_crop;               
00048     int i_crop_x, i_crop_y, i_crop_width, i_crop_height;       
00050     int i_margin;                        
00051     vlc_bool_t b_force_palette;             
00052     uint8_t palette[4][4];                               
00054     int ( *pf_control ) ( spu_t *, int, va_list );
00055 
00056     /* Supciture filters */
00057     filter_t *pp_filter[10];
00058     int      i_filter;
00059 };
00060 
00061 static inline int spu_vaControl( spu_t *p_spu, int i_query, va_list args )
00062 {
00063     if( p_spu->pf_control )
00064         return p_spu->pf_control( p_spu, i_query, args );
00065     else
00066         return VLC_EGENERIC;
00067 }
00068 
00069 static inline int spu_Control( spu_t *p_spu, int i_query, ... )
00070 {
00071     va_list args;
00072     int i_result;
00073 
00074     va_start( args, i_query );
00075     i_result = spu_vaControl( p_spu, i_query, args );
00076     va_end( args );
00077     return i_result;
00078 }
00079 
00080 enum spu_query_e
00081 {
00082     SPU_CHANNEL_REGISTER,         /* arg1= int *   res=    */
00083     SPU_CHANNEL_CLEAR             /* arg1= int     res=    */
00084 };
00085 
00090 #define spu_Create(a) __spu_Create(VLC_OBJECT(a))
00091 VLC_EXPORT( spu_t *, __spu_Create, ( vlc_object_t * ) );
00092 VLC_EXPORT( int, spu_Init, ( spu_t * ) );
00093 VLC_EXPORT( void, spu_Destroy, ( spu_t * ) );
00094 void spu_Attach( spu_t *, vlc_object_t *, vlc_bool_t );
00095 
00096 VLC_EXPORT( subpicture_t *, spu_CreateSubpicture, ( spu_t * ) );
00097 VLC_EXPORT( void, spu_DestroySubpicture, ( spu_t *, subpicture_t * ) );
00098 VLC_EXPORT( void, spu_DisplaySubpicture, ( spu_t *, subpicture_t * ) );
00099 
00100 #define spu_CreateRegion(a,b) __spu_CreateRegion(VLC_OBJECT(a),b)
00101 VLC_EXPORT( subpicture_region_t *,__spu_CreateRegion, ( vlc_object_t *, video_format_t * ) );
00102 #define spu_MakeRegion(a,b,c) __spu_MakeRegion(VLC_OBJECT(a),b,c)
00103 VLC_EXPORT( subpicture_region_t *,__spu_MakeRegion, ( vlc_object_t *, video_format_t *, picture_t * ) );
00104 #define spu_DestroyRegion(a,b) __spu_DestroyRegion(VLC_OBJECT(a),b)
00105 VLC_EXPORT( void, __spu_DestroyRegion, ( vlc_object_t *, subpicture_region_t * ) );
00106 
00107 VLC_EXPORT( subpicture_t *, spu_SortSubpictures, ( spu_t *, mtime_t ) );
00108 VLC_EXPORT( void, spu_RenderSubpictures, ( spu_t *,  video_format_t *, picture_t *, picture_t *, subpicture_t *, int, int ) );
00109 

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