- mtime_t begin_date; /* beginning of display date */
- mtime_t end_date; /* end of display date */
-
- /* Subtitle data - data can always be freely modified. p_data itself
- * (the pointer) should NEVER be modified. */
- void * p_data; /* subtitle data */
-} subtitle_t;
-
-/* Subtitle types */
-#define EMPTY_SUBTITLE 0 /* subtitle slot is empty and available */
-#define RLE_SUBTITLE 100 /* RLE encoded subtitle */
-
-/* Subtitle status */
-#define FREE_SUBTITLE 0 /* subtitle is free and not allocated */
-#define RESERVED_SUBTITLE 1 /* subtitle is allocated and reserved */
-#define READY_SUBTITLE 2 /* subtitle is ready for display */
-#define DESTROYED_SUBTITLE 3 /* subtitle is allocated but no more used */
+ mtime_t begin_date; /* beginning of display date */
+ mtime_t end_date; /* end of display date */
+
+ /* Display properties - these properties are only indicative and may be
+ * changed by the video output thread, or simply ignored depending of the
+ * subpicture type. */
+ int i_x; /* offset from alignment position */
+ int i_y; /* offset from alignment position */
+ int i_width; /* picture width */
+ int i_height; /* picture height */
+ int i_horizontal_align; /* horizontal alignment */
+ int i_vertical_align; /* vertical alignment */
+
+ /* Additionnal properties depending of the subpicture type */
+ union
+ {
+ /* Text subpictures properties - text is stored in data area, in ASCIIZ
+ * format */
+ struct
+ {
+ p_vout_font_t p_font; /* font, NULL for default */
+ int i_style; /* text style */
+ u32 i_char_color; /* character color */
+ u32 i_border_color; /* border color */
+ u32 i_bg_color; /* background color */
+ } text;
+ /* DVD subpicture units properties */
+ struct
+ {
+ int i_offset[2]; /* byte offsets to data */
+ } spu;
+ } type;
+
+ /* Subpicture data, format depends of type - data can always be freely
+ * modified. p_data itself (the pointer) should NEVER be modified. */
+ void * p_data; /* subpicture data */
+} subpicture_t;
+
+/* Subpicture type */
+#define EMPTY_SUBPICTURE 0 /* subtitle slot is empty and available */
+#define DVD_SUBPICTURE 100 /* DVD subpicture unit */
+#define TEXT_SUBPICTURE 200 /* single line text */
+
+/* Subpicture status */
+#define FREE_SUBPICTURE 0 /* subpicture is free and not allocated */
+#define RESERVED_SUBPICTURE 1 /* subpicture is allocated and reserved */
+#define READY_SUBPICTURE 2 /* subpicture is ready for display */
+#define DESTROYED_SUBPICTURE 3/* subpicture is allocated but no more used */
+
+/* Alignment types */
+#define RIGHT_ALIGN 10 /* x is absolute for right */
+#define LEFT_ALIGN 11 /* x is absolute for left */
+#define RIGHT_RALIGN 12 /* x is relative for right from right */
+#define LEFT_RALIGN 13 /* x is relative for left from left */
+
+#define CENTER_ALIGN 20 /* x, y are absolute for center */
+#define CENTER_RALIGN 21 /* x, y are relative for center from center */
+
+#define BOTTOM_ALIGN 30 /* y is absolute for bottom */
+#define TOP_ALIGN 31 /* y is absolute for top */
+#define BOTTOM_RALIGN 32 /* y is relative for bottom from bottom */
+#define TOP_RALIGN 33 /* y is relative for top from top */
+#define SUBTITLE_RALIGN 34 /* y is relative for center from subtitle */
+