* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#if !defined( __LIBVLC__ )
+ #error You are not libvlc or one of its plugins. You cannot include this file
+#endif
+
#ifndef _VLC_OSD_H
#define _VLC_OSD_H 1
* --sout='#transcode{osd}:std{access=udp,mux=ts,dst=dest_ipaddr}'
* --osdmenu-file=share/osdmenu/dvd.cfg
*
+ * An example for local usage of the OSD menu is:
+ *
+ * vlc dvdsimple:///dev/dvd --extraintf rc
+ * --sub-filter osdmenu
+ * --osdmenu-file=share/osdmenu/dvd.cfg
+ *
* Each OSD menu element, called "action", defines a hotkey action. Each action
* can have several states (unselect, select, pressed). Each state has an image
* that represents the state visually. The commands "menu right", "menu left",
*
* CONFIG_FILE = FILENAME '.cfg'
* WS = [ ' ' | '\t' ]+
- * OSDMEN_PATH = PATHNAME
+ * OSDMENU_PATH = PATHNAME
* DIR = 'dir' WS OSDMENU_PATH '\n'
+ * STYLE = 'style' [ 'default' | 'concat' ] '\n'
* STATE = [ 'unselect' | 'select' | 'pressed' ]
* HOTKEY_ACTION = 'key-' [ 'a' .. 'z', 'A' .. 'Z', '-' ]+
*
int i_background_alpha;/**< The transparency of the background.
0x00 is fully opaque,
0xFF fully transparent */
+ int i_karaoke_background_color;/**< Background color for karaoke 0xRRGGBB */
+ int i_karaoke_background_alpha;/**< The transparency of the karaoke bg.
+ 0x00 is fully opaque,
+ 0xFF fully transparent */
int i_outline_width; /**< The width of the outline in pixels */
int i_shadow_width; /**< The width of the shadow in pixels */
int i_spacing; /**< The spaceing between glyphs in pixels */
- int i_text_align; /**< An alignment hint for the text */
};
/* Style flags for \ref text_style_t */
#define STYLE_STRIKEOUT 64
static const text_style_t default_text_style = { NULL, 22, 0xffffff, 0xff, STYLE_OUTLINE,
- 0x000000, 0xff, 0x000000, 0xff, 0xffffff, 0x80, 1, 0, -1, 0 };
+ 0x000000, 0xff, 0x000000, 0xff, 0xffffff, 0x80, 0xffffff, 0xff, 1, 0, -1 };
int i_ranges; /*< number of states */
};
+/**
+ * OSD Menu Style
+ *
+ * The images that make up an OSD menu can be created in such away that
+ * they contain all buttons in the same picture, with the selected one
+ * highlighted or being a concatenation of all the seperate images. The
+ * first case is the default.
+ *
+ * To change the default style the keyword 'style' should be set to 'concat'.
+ */
+
+#define OSD_MENU_STYLE_SIMPLE 0x0
+#define OSD_MENU_STYLE_CONCAT 0x1
+
/**
* OSD Menu State object
*
int i_y; /*< y-position of OSD Menu on the video screen */
int i_width; /*< width of OSD Menu on the video screen */
int i_height; /*< height of OSD Menu on the video screen */
+ int i_style; /*< style of spu region generation */
char *psz_path; /*< directory where OSD menu images are stored */
osd_button_t *p_button; /*< doubly linked list of buttons */
*/
VLC_EXPORT( int, osd_ShowTextRelative, ( spu_t *, int, char *, text_style_t *, int, int, int, mtime_t ) );
VLC_EXPORT( int, osd_ShowTextAbsolute, ( spu_t *, int, char *, text_style_t *, int, int, int, mtime_t, mtime_t ) );
-VLC_EXPORT( void,osd_Message, ( spu_t *, int, char *, ... ) );
+VLC_EXPORT( void,osd_Message, ( spu_t *, int, char *, ... ) ATTRIBUTE_FORMAT( 3, 4 ) );
/**
* Default feedback images
* if this is 0 the string will be shown untill the next string
* is about to be shown
*/
-VLC_EXPORT( int, vout_ShowTextAbsolute, ( vout_thread_t *, int, char *, text_style_t *, int, int, int, mtime_t, mtime_t ) );
+VLC_EXPORT( int, vout_ShowTextAbsolute, ( vout_thread_t *, int, const char *, text_style_t *, int, int, int, mtime_t, mtime_t ) );
/**
* Write an informative message at the default location,
* \param i_channel Subpicture channel
* \param psz_format printf style formatting
**/
-VLC_EXPORT( void, __vout_OSDMessage, ( vlc_object_t *, int, char *, ... ) );
+VLC_EXPORT( void, __vout_OSDMessage, ( vlc_object_t *, int, const char *, ... ) ATTRIBUTE_FORMAT( 3, 4 ) );
/**
* Same as __vlc_OSDMessage() but with automatic casting