4 #include <lib/base/ebase.h>
6 typedef unsigned char __u8
;
8 struct subtitle_clut_entry
17 struct subtitle_clut_entry entries
[16];
18 int CLUT_version_number
;
20 struct subtitle_clut
*next
;
23 struct subtitle_page_region
26 int region_horizontal_address
;
27 int region_vertical_address
;
28 struct subtitle_page_region
*next
;
31 struct subtitle_region_object
35 int object_provider_flag
;
37 int object_horizontal_position
;
38 int object_vertical_position
;
40 // not supported right now...
41 int foreground_pixel_value
;
42 int background_pixel_value
;
44 struct subtitle_region_object
*next
;
47 struct subtitle_region
50 int region_version_number
;
51 int region_height
, region_width
;
56 struct subtitle_region_object
*region_objects
;
58 struct subtitle_region
*next
;
65 int page_version_number
;
67 struct subtitle_page_region
*page_regions
;
69 struct subtitle_region
*regions
;
71 struct subtitle_clut
*cluts
;
73 struct subtitle_page
*next
;
78 struct subtitle_page
*pages
;
80 int current_clut_id
, current_clut_page_id
;
83 int screen_width
, screen_height
;
85 eTimer
*timeout_timer
;
87 int bbox_left
, bbox_top
, bbox_right
, bbox_bottom
;
89 void (*set_palette
)(struct subtitle_clut
*pal
);
100 void bitstream_init(struct bitstream
*bit
, void *buffer
, int size
);
101 int bitstream_get(struct bitstream
*bit
);
102 void subtitle_process_line(struct subtitle_ctx
*sub
, struct subtitle_page
*page
, int object_id
, int line
, __u8
*data
, int len
);
103 int subtitle_process_pixel_data(struct subtitle_ctx
*sub
, struct subtitle_page
*page
, int object_id
, int *linenr
, int *linep
, __u8
*data
);
104 int subtitle_process_segment(struct subtitle_ctx
*sub
, __u8
*segment
);
105 void subtitle_process_pes(struct subtitle_ctx
*sub
, void *buffer
, int len
);
106 void subtitle_clear_screen(struct subtitle_ctx
*sub
);
107 void subtitle_reset(struct subtitle_ctx
*sub
);
108 void subtitle_redraw_all(struct subtitle_ctx
*sub
);
109 void subtitle_redraw(struct subtitle_ctx
*sub
, int pageid
);
110 void subtitle_screen_enable(struct subtitle_ctx
*sub
, int enable
);