Mercurial > mplayer.hg
comparison sub/sub.c @ 34492:1495455e6d22
Move static keyword to the beginning of function declarations.
This fixes a number of warnings with -Wextra.
author | diego |
---|---|
date | Thu, 19 Jan 2012 14:36:15 +0000 |
parents | 8d137fb84699 |
children | ff81a1db421e |
comparison
equal
deleted
inserted
replaced
34491:220e2f980b73 | 34492:1495455e6d22 |
---|---|
163 memset(obj->bitmap_buffer, sub_bg_color, len); | 163 memset(obj->bitmap_buffer, sub_bg_color, len); |
164 memset(obj->alpha_buffer, sub_bg_alpha, len); | 164 memset(obj->alpha_buffer, sub_bg_alpha, len); |
165 } | 165 } |
166 | 166 |
167 // renders the buffer | 167 // renders the buffer |
168 inline static void vo_draw_text_from_buffer(mp_osd_obj_t* obj,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ | 168 static inline void vo_draw_text_from_buffer(mp_osd_obj_t* obj, |
169 void (*draw_alpha)(int x0, int y0, | |
170 int w, int h, | |
171 unsigned char *src, | |
172 unsigned char *srca, | |
173 int stride)) | |
174 { | |
169 if (obj->allocated > 0) { | 175 if (obj->allocated > 0) { |
170 draw_alpha(obj->bbox.x1,obj->bbox.y1, | 176 draw_alpha(obj->bbox.x1,obj->bbox.y1, |
171 obj->bbox.x2-obj->bbox.x1, | 177 obj->bbox.x2-obj->bbox.x1, |
172 obj->bbox.y2-obj->bbox.y1, | 178 obj->bbox.y2-obj->bbox.y1, |
173 obj->bitmap_buffer, | 179 obj->bitmap_buffer, |
188 c = *strp++; | 194 c = *strp++; |
189 *str = (const char *)strp; | 195 *str = (const char *)strp; |
190 return c; | 196 return c; |
191 } | 197 } |
192 | 198 |
193 inline static void vo_update_text_osd(mp_osd_obj_t* obj,int dxs,int dys){ | 199 static inline void vo_update_text_osd(mp_osd_obj_t *obj, int dxs, int dys) |
200 { | |
194 const char *cp=vo_osd_text; | 201 const char *cp=vo_osd_text; |
195 int x=20; | 202 int x=20; |
196 int h=0; | 203 int h=0; |
197 int font; | 204 int font; |
198 | 205 |
233 nav_hl.sy = sy; | 240 nav_hl.sy = sy; |
234 nav_hl.ex = ex; | 241 nav_hl.ex = ex; |
235 nav_hl.ey = ey; | 242 nav_hl.ey = ey; |
236 } | 243 } |
237 | 244 |
238 inline static void vo_update_nav (mp_osd_obj_t *obj, int dxs, int dys, int left_border, int top_border, | 245 static inline void vo_update_nav(mp_osd_obj_t *obj, int dxs, int dys, |
239 int right_border, int bottom_border, int orig_w, int orig_h) { | 246 int left_border, int top_border, |
247 int right_border, int bottom_border, | |
248 int orig_w, int orig_h) | |
249 { | |
240 int len; | 250 int len; |
241 int sx = nav_hl.sx, sy = nav_hl.sy; | 251 int sx = nav_hl.sx, sy = nav_hl.sy; |
242 int ex = nav_hl.ex, ey = nav_hl.ey; | 252 int ex = nav_hl.ex, ey = nav_hl.ey; |
243 int scaled_w = dxs - left_border - right_border; | 253 int scaled_w = dxs - left_border - right_border; |
244 int scaled_h = dys - top_border - bottom_border; | 254 int scaled_h = dys - top_border - bottom_border; |
296 b+= dstskip; | 306 b+= dstskip; |
297 a+= dstskip; | 307 a+= dstskip; |
298 bs+= srcskip; | 308 bs+= srcskip; |
299 } | 309 } |
300 } | 310 } |
301 inline static void vo_update_text_teletext(mp_osd_obj_t *obj, int dxs, int dys) | 311 static inline void vo_update_text_teletext(mp_osd_obj_t *obj, int dxs, int dys) |
302 { | 312 { |
303 int h=0,w=0,i,j,font,flashon; | 313 int h=0,w=0,i,j,font,flashon; |
304 int wm,hm; | 314 int wm,hm; |
305 int color; | 315 int color; |
306 int x,y,x0,y0; | 316 int x,y,x0,y0; |
525 // | | | | | | 535 // | | | | | |
526 // [ === === === ... === ] | 536 // [ === === === ... === ] |
527 // | 537 // |
528 // the above schema is rescalled to n=elems bars | 538 // the above schema is rescalled to n=elems bars |
529 | 539 |
530 inline static void vo_update_text_progbar(mp_osd_obj_t* obj,int dxs,int dys){ | 540 static inline void vo_update_text_progbar(mp_osd_obj_t *obj, int dxs, int dys) |
541 { | |
531 | 542 |
532 obj->flags|=OSDFLAG_CHANGED|OSDFLAG_VISIBLE; | 543 obj->flags|=OSDFLAG_CHANGED|OSDFLAG_VISIBLE; |
533 | 544 |
534 if(vo_osd_progbar_type<0 || !vo_font){ | 545 if(vo_osd_progbar_type<0 || !vo_font){ |
535 obj->flags&=~OSDFLAG_VISIBLE; | 546 obj->flags&=~OSDFLAG_VISIBLE; |
665 | 676 |
666 } | 677 } |
667 | 678 |
668 subtitle* vo_sub=NULL; | 679 subtitle* vo_sub=NULL; |
669 | 680 |
670 inline static void vo_update_text_sub(mp_osd_obj_t* obj,int dxs,int dys){ | 681 static inline void vo_update_text_sub(mp_osd_obj_t *obj, int dxs, int dys) |
682 { | |
671 unsigned char *t; | 683 unsigned char *t; |
672 int c,i,j,l,x,y,font,prevc,counter; | 684 int c,i,j,l,x,y,font,prevc,counter; |
673 int k; | 685 int k; |
674 int xsize; | 686 int xsize; |
675 int xmin=dxs,xmax=0; | 687 int xmin=dxs,xmax=0; |
1035 } | 1047 } |
1036 } | 1048 } |
1037 | 1049 |
1038 } | 1050 } |
1039 | 1051 |
1040 inline static void vo_update_spudec_sub(mp_osd_obj_t* obj, int dxs, int dys) | 1052 static inline void vo_update_spudec_sub(mp_osd_obj_t* obj, int dxs, int dys) |
1041 { | 1053 { |
1042 unsigned int bbox[4]; | 1054 unsigned int bbox[4]; |
1043 spudec_calc_bbox(vo_spudec, dxs, dys, bbox); | 1055 spudec_calc_bbox(vo_spudec, dxs, dys, bbox); |
1044 obj->bbox.x1 = bbox[0]; | 1056 obj->bbox.x1 = bbox[0]; |
1045 obj->bbox.x2 = bbox[1]; | 1057 obj->bbox.x2 = bbox[1]; |
1046 obj->bbox.y1 = bbox[2]; | 1058 obj->bbox.y1 = bbox[2]; |
1047 obj->bbox.y2 = bbox[3]; | 1059 obj->bbox.y2 = bbox[3]; |
1048 obj->flags |= OSDFLAG_BBOX; | 1060 obj->flags |= OSDFLAG_BBOX; |
1049 } | 1061 } |
1050 | 1062 |
1051 inline static void vo_draw_spudec_sub(mp_osd_obj_t* obj, void (*draw_alpha)(int x0, int y0, int w, int h, unsigned char* src, unsigned char* srca, int stride)) | 1063 static inline void vo_draw_spudec_sub(mp_osd_obj_t *obj, |
1064 void (*draw_alpha)(int x0, int y0, | |
1065 int w, int h, | |
1066 unsigned char *src, | |
1067 unsigned char *srca, | |
1068 int stride)) | |
1052 { | 1069 { |
1053 spudec_draw_scaled(vo_spudec, obj->dxs, obj->dys, draw_alpha); | 1070 spudec_draw_scaled(vo_spudec, obj->dxs, obj->dys, draw_alpha); |
1054 } | 1071 } |
1055 | 1072 |
1056 void *vo_spudec=NULL; | 1073 void *vo_spudec=NULL; |