00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _VLC_VIDEO_H
00026 #define _VLC_VIDEO_H 1
00027
00028 #include "vlc_es.h"
00029
00033 typedef struct plane_t
00034 {
00035 uint8_t *p_pixels;
00037
00038 int i_lines;
00039 int i_pitch;
00042 int i_pixel_pitch;
00043
00044
00045 int i_visible_lines;
00046 int i_visible_pitch;
00048 } plane_t;
00049
00058 struct picture_t
00059 {
00063 video_frame_format_t format;
00064
00068 uint8_t *p_data;
00069 void *p_data_orig;
00070 plane_t p[ VOUT_MAX_PLANES ];
00071 int i_planes;
00076 int i_status;
00077 int i_type;
00078 vlc_bool_t b_slow;
00079 int i_matrix_coefficients;
00086 int i_refcount;
00087 mtime_t date;
00088 vlc_bool_t b_force;
00095 vlc_bool_t b_progressive;
00096 unsigned int i_nb_fields;
00097 vlc_bool_t b_top_field_first;
00101 picture_heap_t* p_heap;
00102
00103
00104 int (* pf_lock) ( vout_thread_t *, picture_t * );
00105 int (* pf_unlock) ( vout_thread_t *, picture_t * );
00106
00109 picture_sys_t * p_sys;
00110
00112 void (*pf_release)( picture_t * );
00113
00115 struct picture_t *p_next;
00116 };
00117
00122 struct picture_heap_t
00123 {
00124 int i_pictures;
00126
00127
00128
00129
00130 unsigned int i_width;
00131 unsigned int i_height;
00132 vlc_fourcc_t i_chroma;
00133 unsigned int i_aspect;
00136
00137 picture_t* pp_picture[VOUT_MAX_PICTURES];
00138 int i_last_used_pic;
00139 vlc_bool_t b_allow_modify_pics;
00140
00141
00142 int i_rmask, i_rrshift, i_lrshift;
00143 int i_gmask, i_rgshift, i_lgshift;
00144 int i_bmask, i_rbshift, i_lbshift;
00145
00147 void (* pf_setpalette) ( vout_thread_t *, uint16_t *, uint16_t *, uint16_t * );
00148 };
00149
00150
00151
00152
00153
00154
00155 #define EMPTY_PICTURE 0
00156 #define MEMORY_PICTURE 100
00157 #define DIRECT_PICTURE 200
00158
00159
00160 #define FREE_PICTURE 0
00161 #define RESERVED_PICTURE 1
00162 #define RESERVED_DATED_PICTURE 2
00163 #define RESERVED_DISP_PICTURE 3
00164 #define READY_PICTURE 4
00165 #define DISPLAYED_PICTURE 5
00166 #define DESTROYED_PICTURE 6
00167
00168
00169
00170
00171
00172
00173 #define Y_PLANE 0
00174 #define U_PLANE 1
00175 #define V_PLANE 2
00176 #define A_PLANE 3
00177
00178
00179 #define Y_PIXELS p[Y_PLANE].p_pixels
00180 #define Y_PITCH p[Y_PLANE].i_pitch
00181 #define U_PIXELS p[U_PLANE].p_pixels
00182 #define U_PITCH p[U_PLANE].i_pitch
00183 #define V_PIXELS p[V_PLANE].p_pixels
00184 #define V_PITCH p[V_PLANE].i_pitch
00185 #define A_PIXELS p[A_PLANE].p_pixels
00186 #define A_PITCH p[A_PLANE].i_pitch
00187
00203 struct subpicture_region_t
00204 {
00205 video_format_t fmt;
00206 picture_t picture;
00208 int i_x;
00209 int i_y;
00211 char *psz_text;
00212 int i_text_color;
00213 int i_text_alpha;
00214 int i_text_size;
00215 int i_text_align;
00217 subpicture_region_t *p_next;
00218 subpicture_region_t *p_cache;
00219 };
00220
00229 struct subpicture_t
00230 {
00233 int i_channel;
00239 int i_type;
00240 int i_status;
00241 subpicture_t * p_next;
00246 mtime_t i_start;
00247 mtime_t i_stop;
00248 vlc_bool_t b_ephemer;
00250 vlc_bool_t b_fade;
00253 subpicture_region_t *p_region;
00260 int i_x;
00261 int i_y;
00262 int i_width;
00263 int i_height;
00264 int i_alpha;
00265 int i_original_picture_width;
00266 int i_original_picture_height;
00267 vlc_bool_t b_absolute;
00268 int i_flags;
00272 void ( *pf_render ) ( vout_thread_t *, picture_t *, const subpicture_t * );
00274 void ( *pf_destroy ) ( subpicture_t * );
00275
00277 subpicture_region_t * ( *pf_create_region ) ( vlc_object_t *,
00278 video_format_t * );
00279 subpicture_region_t * ( *pf_make_region ) ( vlc_object_t *,
00280 video_format_t *, picture_t * );
00281 void ( *pf_destroy_region ) ( vlc_object_t *, subpicture_region_t * );
00282
00285 subpicture_sys_t *p_sys;
00286 };
00287
00288
00289 #define EMPTY_SUBPICTURE 0
00290 #define MEMORY_SUBPICTURE 100
00291
00292
00293 #define DEFAULT_CHAN 1
00294
00295
00296 #define FREE_SUBPICTURE 0
00297 #define RESERVED_SUBPICTURE 1
00298 #define READY_SUBPICTURE 2
00299
00300
00301 #define SUBPICTURE_ALIGN_LEFT 0x1
00302 #define SUBPICTURE_ALIGN_RIGHT 0x2
00303 #define SUBPICTURE_ALIGN_TOP 0x4
00304 #define SUBPICTURE_ALIGN_BOTTOM 0x8
00305
00306
00307
00308
00317 #define vout_CopyPicture(a,b,c) __vout_CopyPicture(VLC_OBJECT(a),b,c)
00318 VLC_EXPORT( void, __vout_CopyPicture, ( vlc_object_t *p_this, picture_t *p_dst, picture_t *p_src ) );
00319
00331 #define vout_InitPicture(a,b,c,d,e,f) \
00332 __vout_InitPicture(VLC_OBJECT(a),b,c,d,e,f)
00333 VLC_EXPORT( int, __vout_InitPicture, ( vlc_object_t *p_this, picture_t *p_pic, uint32_t i_chroma, int i_width, int i_height, int i_aspect ) );
00334
00346 #define vout_AllocatePicture(a,b,c,d,e,f) \
00347 __vout_AllocatePicture(VLC_OBJECT(a),b,c,d,e,f)
00348 VLC_EXPORT( int, __vout_AllocatePicture,( vlc_object_t *p_this, picture_t *p_pic, uint32_t i_chroma, int i_width, int i_height, int i_aspect ) );
00349
00363 VLC_EXPORT( int, vout_ShowTextRelative, ( vout_thread_t *, int, char *, text_style_t *, int, int, int, mtime_t ) );
00364
00381 VLC_EXPORT( int, vout_ShowTextAbsolute, ( vout_thread_t *, int, char *, text_style_t *, int, int, int, mtime_t, mtime_t ) );
00382
00392 VLC_EXPORT( void, __vout_OSDMessage, ( vlc_object_t *, int, char *, ... ) );
00393
00397 #if defined(HAVE_VARIADIC_MACROS)
00398 # define vout_OSDMessage( obj, chan, fmt, args...) __vout_OSDMessage( VLC_OBJECT(obj), chan, fmt, ## args )
00399 #else
00400 # define vout_OSDMessage __vout_OSDMessage
00401 #endif
00402
00413 VLC_EXPORT( void, vout_OSDSlider, ( vlc_object_t *, int, int , short ) );
00414
00424 VLC_EXPORT( void, vout_OSDIcon, ( vlc_object_t *, int, short ) );
00425
00428 #endif