00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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
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,
00083 SPU_CHANNEL_CLEAR
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