1 #ifndef MPLAYER_DEC_SUB_H
2 #define MPLAYER_DEC_SUB_H
14 typedef struct mp_eosd_res
{
15 int w
, h
; // screen dimensions, including black borders
16 int mt
, mb
, ml
, mr
; // borders (top, bottom, left, right)
20 struct ass_library
*ass_library
;
21 struct ass_renderer
*ass_renderer
;
22 struct sh_sub
*sh_sub
;
23 unsigned int bitmap_id
;
24 unsigned int bitmap_pos_id
;
27 struct mp_eosd_res dim
;
29 double vsfilter_scale
;
33 struct ass_renderer
*osd_render
;
34 struct ass_library
*osd_ass_library
;
41 typedef struct sub_bitmaps
{
42 enum sub_bitmap_type type
;
44 struct ass_image
*imgs
;
49 // Note: not clipped, going outside the screen area is allowed
56 unsigned int bitmap_id
;
57 unsigned int bitmap_pos_id
;
60 static inline bool is_text_sub(int type
)
62 return type
== 't' || type
== 'm' || type
== 'a';
65 void sub_decode(struct sh_sub
*sh
, struct osd_state
*osd
, void *data
,
66 int data_len
, double pts
, double duration
);
67 void sub_get_bitmaps(struct osd_state
*osd
, struct sub_bitmaps
*res
);
68 void sub_init(struct sh_sub
*sh
, struct osd_state
*osd
);
69 void sub_reset(struct sh_sub
*sh
, struct osd_state
*osd
);
70 void sub_switchoff(struct sh_sub
*sh
, struct osd_state
*osd
);
71 void sub_uninit(struct sh_sub
*sh
);
73 struct sh_sub
*sd_ass_create_from_track(struct ass_track
*track
,