Mercurial > mplayer.hg
annotate libvo/sub.h @ 5845:265acdb8542d
Correct my half reverse commit. Sorry Atmos.
author | albeu |
---|---|
date | Fri, 26 Apr 2002 19:46:36 +0000 |
parents | 391931fa79a6 |
children | 31e465fda59c |
rev | line source |
---|---|
616 | 1 |
2 #ifndef __MPLAYER_SUB_H | |
3 #define __MPLAYER_SUB_H | |
4 | |
5638
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
5 typedef struct mp_osd_bbox_s { |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
6 int x1,y1,x2,y2; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
7 } mp_osd_bbox_t; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
8 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
9 #define OSDTYPE_OSD 1 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
10 #define OSDTYPE_SUBTITLE 2 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
11 #define OSDTYPE_PROGBAR 3 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
12 #define OSDTYPE_SPU 4 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
13 #define OSDTYPE_VOBSUB 5 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
14 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
15 #define OSDFLAG_VISIBLE 1 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
16 #define OSDFLAG_CHANGED 2 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
17 #define OSDFLAG_BBOX 4 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
18 #define OSDFLAG_OLD_BBOX 8 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
19 #define OSDFLAG_FORCE_UPDATE 16 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
20 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
21 #define MAX_UCS 1600 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
22 #define MAX_UCSLINES 16 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
23 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
24 typedef struct mp_osd_obj_s { |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
25 struct mp_osd_obj_s* next; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
26 unsigned char type; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
27 unsigned char alignment; // 2 bits: x;y percents, 2 bits: x;y relative to parent; 2 bits: alignment left/right/center |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
28 unsigned short flags; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
29 int x,y; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
30 int dxs,dys; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
31 mp_osd_bbox_t bbox; // bounding box |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
32 mp_osd_bbox_t old_bbox; // the renderer will save bbox here |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
33 union { |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
34 struct { |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
35 void* sub; // value of vo_sub at last update |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
36 int utbl[MAX_UCS+1]; // subtitle text |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
37 int xtbl[MAX_UCSLINES]; // x positions |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
38 int lines; // no. of lines |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
39 } subtitle; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
40 struct { |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
41 int elems; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
42 } progbar; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
43 } params; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
44 } mp_osd_obj_t; |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
45 |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
46 |
865 | 47 #if 0 |
48 | |
49 // disable subtitles: | |
50 static inline void vo_draw_text_osd(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ | |
51 } | |
52 | |
53 #else | |
54 | |
616 | 55 #include "../subreader.h" |
218 | 56 |
57 extern unsigned char* vo_osd_text; | |
58 | |
59 extern int vo_osd_progbar_type; | |
60 extern int vo_osd_progbar_value; // 0..255 | |
61 | |
254 | 62 extern subtitle* vo_sub; |
218 | 63 |
3034
24d3dca4e813
DVD sub patch by Kim Minh Kaplan <kmkaplan@selfoffice.com>
arpi
parents:
2498
diff
changeset
|
64 extern void* vo_spudec; |
4080 | 65 extern void* vo_vobsub; |
3034
24d3dca4e813
DVD sub patch by Kim Minh Kaplan <kmkaplan@selfoffice.com>
arpi
parents:
2498
diff
changeset
|
66 |
218 | 67 #define OSD_PLAY 0x01 |
68 #define OSD_PAUSE 0x02 | |
69 #define OSD_STOP 0x03 | |
70 #define OSD_REW 0x04 | |
71 #define OSD_FFW 0x05 | |
72 #define OSD_CLOCK 0x06 | |
73 #define OSD_CONTRAST 0x07 | |
74 #define OSD_SATURATION 0x08 | |
75 #define OSD_VOLUME 0x09 | |
76 #define OSD_BRIGHTNESS 0x0A | |
77 #define OSD_HUE 0x0B | |
78 | |
79 #define OSD_PB_START 0x10 | |
80 #define OSD_PB_0 0x11 | |
81 #define OSD_PB_END 0x12 | |
82 #define OSD_PB_1 0x13 | |
83 | |
1552 | 84 /* now in textform */ |
2498 | 85 extern char * __sub_osd_names[]; |
86 extern char * __sub_osd_names_short[]; | |
1552 | 87 |
5669
391931fa79a6
enabled new OSD code in -vop expand, subtitles rendering support to mencoder
arpi
parents:
5645
diff
changeset
|
88 extern int sub_unicode; |
391931fa79a6
enabled new OSD code in -vop expand, subtitles rendering support to mencoder
arpi
parents:
5645
diff
changeset
|
89 extern int sub_utf8; |
391931fa79a6
enabled new OSD code in -vop expand, subtitles rendering support to mencoder
arpi
parents:
5645
diff
changeset
|
90 |
391931fa79a6
enabled new OSD code in -vop expand, subtitles rendering support to mencoder
arpi
parents:
5645
diff
changeset
|
91 #ifdef USE_ICONV |
391931fa79a6
enabled new OSD code in -vop expand, subtitles rendering support to mencoder
arpi
parents:
5645
diff
changeset
|
92 extern char *sub_cp; |
391931fa79a6
enabled new OSD code in -vop expand, subtitles rendering support to mencoder
arpi
parents:
5645
diff
changeset
|
93 #endif |
391931fa79a6
enabled new OSD code in -vop expand, subtitles rendering support to mencoder
arpi
parents:
5645
diff
changeset
|
94 extern int sub_pos; |
391931fa79a6
enabled new OSD code in -vop expand, subtitles rendering support to mencoder
arpi
parents:
5645
diff
changeset
|
95 |
898 | 96 //extern void vo_draw_text_osd(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); |
865 | 97 //extern void vo_draw_text_progbar(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); |
98 //extern void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); | |
898 | 99 extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); |
5645 | 100 extern void vo_remove_text(int dxs,int dys,void (*remove)(int x0,int y0, int w,int h)); |
218 | 101 |
5638
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
102 void vo_init_osd(); |
86663f1b9b00
new osd code, use osd objs to follow changes and do minimal updates
arpi
parents:
5294
diff
changeset
|
103 int vo_update_osd(int dxs,int dys); |
4807
156482788caf
osd outside movie support for vo_sdl, patch by Fredrik Kuivinen
atmos4
parents:
4080
diff
changeset
|
104 int vo_osd_changed(int new_value); |
156482788caf
osd outside movie support for vo_sdl, patch by Fredrik Kuivinen
atmos4
parents:
4080
diff
changeset
|
105 |
5642
eb0cb6185e6c
osd: ok, now it's possible to do partial draw/clear of the buffer only if changed
arpi
parents:
5638
diff
changeset
|
106 extern int vo_osd_changed_flag; |
eb0cb6185e6c
osd: ok, now it's possible to do partial draw/clear of the buffer only if changed
arpi
parents:
5638
diff
changeset
|
107 |
616 | 108 #endif |
865 | 109 #endif |