]> git.sesse.net Git - vlc/blobdiff - include/vlc_osd.h
sout-standard-url is deprecated
[vlc] / include / vlc_osd.h
index 27f00e1f46b80a5282e0337b6af1c813f2d84a3f..117a84e67d0c094e60b7c21a3ce88ad38840af29 100644 (file)
 \r
 /**\r
  * \file\r
- * The OSD menu core creates the OSD menu structure in memory. It parses a \r
- * configuration file that defines all elements that are part of the menu. The \r
- * core also handles all actions and menu structure updates on behalf of video \r
+ * The OSD menu core creates the OSD menu structure in memory. It parses a\r
+ * configuration file that defines all elements that are part of the menu. The\r
+ * core also handles all actions and menu structure updates on behalf of video\r
  * subpicture filters.\r
  *\r
  * The file modules/video_filters/osdmenu.c implements a subpicture filter that\r
- * specifies the final information on positioning of the current state image. \r
+ * specifies the final information on positioning of the current state image.\r
  * A subpicture filter is called each time a video picture has to be rendered, it\r
  * also gives a start and end date to the subpicture. The subpicture can be streamed\r
  * if used inside a transcoding command. For example:\r
  *\r
  *  vlc dvdsimple:///dev/dvd --extraintf rc\r
- *  --sout='#transcode{osd}:std{access=udp,mux=ts,url=dest_ipaddr}'\r
+ *  --sout='#transcode{osd}:std{access=udp,mux=ts,dst=dest_ipaddr}'\r
  *  --osdmenu-file=share/osdmenu/dvd.cfg\r
  *\r
- * Each OSD menu element, called "action", defines a hotkey action. Each action \r
- * can have several states (unselect, select, pressed). Each state has an image \r
- * that represents the state visually. The commands "menu right", "menu left", \r
+ * Each OSD menu element, called "action", defines a hotkey action. Each action\r
+ * can have several states (unselect, select, pressed). Each state has an image\r
+ * that represents the state visually. The commands "menu right", "menu left",\r
  * "menu up" and "menu down" are used to navigate through the OSD menu structure.\r
  * The commands "menu on" or "menu show" and "menu off" or "menu hide" respectively\r
  * show and hide the OSD menu subpictures.\r
  *\r
  * There is one special element called "range". A range is an arbritary range\r
  * of state images that can be browsed using "menu up" and "menu down" commands\r
- * on the rc interface. \r
- *  \r
- * The OSD menu configuration file uses a very simple syntax and basic parser. \r
+ * on the rc interface.\r
+ *\r
+ * The OSD menu configuration file uses a very simple syntax and basic parser.\r
  * A configuration file has the ".cfg". An example is "share/osdmenu/dvd256.cfg".\r
  */\r
-  \r
+\r
 #ifndef _VLC_OSD_H\r
 #define _VLC_OSD_H 1\r
 \r
@@ -73,7 +73,7 @@ extern "C" {
  * BNF formal representation below:\r
  *\r
  * The keywords FILENAME and PATHNAME represent the filename and pathname specification\r
- * that is valid for the Operating System VLC is compiled for. \r
+ * that is valid for the Operating System VLC is compiled for.\r
  *\r
  * The hotkey actions that are supported by VLC are documented in the file src/libvlc. The\r
  * file include/vlc_keys.h defines some hotkey internals.\r
@@ -84,7 +84,7 @@ extern "C" {
  * DIR = 'dir' WS OSDMENU_PATH '\n'\r
  * STATE = [ 'unselect' | 'select' | 'pressed' ]\r
  * HOTKEY_ACTION = 'key-' [ 'a' .. 'z', 'A' .. 'Z', '-' ]+\r
- * \r
+ *\r
  * ACTION_TYPE        = 'type' 'volume' '\n'\r
  * ACTION_BLOCK_START = 'action' WS HOTKEY_ACTION WS '('POS','POS')' '\n'\r
  * ACTION_BLOCK_END   = 'end' '\n'\r
@@ -97,7 +97,7 @@ extern "C" {
  * ACTION_BLOCK = ACTION_BLOCK_START [WS ACTION_TYPE*] [ [WS ACTION_STATE]+3 | [WS ACTION_BLOCK_RANGE]+1 ] ACTION_BLOCK_END\r
  * CONFIG_FILE_CONTENTS = DIR [ACTION_BLOCK]+\r
  *\r
- */ \r
+ */\r
 \r
 /**\r
  * OSD menu position and picture type defines\r
@@ -129,7 +129,7 @@ struct text_style_t
     vlc_bool_t b_underline;\r
 };\r
 static const text_style_t default_text_style = { 22, 0xffffff, VLC_FALSE, VLC_FALSE, VLC_FALSE };\r
\r
+\r
 /**\r
  * OSD menu button states\r
  *\r
@@ -155,15 +155,15 @@ struct osd_state_t
     osd_state_t *p_next;    /*< pointer to next state */\r
     osd_state_t *p_prev;    /*< pointer to previous state */\r
     picture_t   *p_pic;     /*< picture of state */\r
-    \r
+\r
     char        *psz_state; /*< state name */\r
-    int          i_state;   /*< state index */ \r
+    int          i_state;   /*< state index */\r
 };\r
 \r
-/** \r
+/**\r
  * OSD Button object\r
  *\r
- * An OSD Button has different states. Each state has an image for display. \r
+ * An OSD Button has different states. Each state has an image for display.\r
  */\r
 struct osd_button_t\r
 {\r
@@ -171,30 +171,30 @@ struct osd_button_t
     osd_button_t *p_prev;   /*< pointer to previous button */\r
     osd_button_t *p_up;     /*< pointer to up button */\r
     osd_button_t *p_down;   /*< pointer to down button */\r
-    \r
+\r
     osd_state_t *p_current_state; /*< pointer to current state image */\r
     osd_state_t *p_states; /*< doubly linked list of states */\r
     picture_t   *p_feedback; /*< feedback picture */\r
-        \r
+\r
     char    *psz_name;     /*< name of button */\r
-    \r
+\r
     /* These member should probably be a struct hotkey */\r
     char    *psz_action;      /*< hotkey action name on button*/\r
     char    *psz_action_down; /*< hotkey action name on range buttons for command "menu down" */\r
     /* end of hotkey specifics */\r
-    \r
+\r
     int     i_x;            /*< x-position of button visible state image */\r
-    int     i_y;            /*< y-position of button visible state image */ \r
-    \r
-    /* range style button */    \r
+    int     i_y;            /*< y-position of button visible state image */\r
+\r
+    /* range style button */\r
     vlc_bool_t   b_range;    /*< button should be interpreted as range */\r
     int          i_ranges;   /*< number of states */\r
 };\r
 \r
-/** \r
+/**\r
  * OSD Menu State object\r
  *\r
- * Represents the current state as displayed. \r
+ * Represents the current state as displayed.\r
  */\r
 /* Represent the menu state */\r
 struct osd_menu_state_t\r
@@ -202,14 +202,14 @@ struct osd_menu_state_t
     int     i_x;        /*< x position of spu region */\r
     int     i_y;        /*< y position of spu region */\r
     int     i_width;    /*< width of spu region */\r
-    int     i_height;   /*< height of spu region */    \r
-    \r
+    int     i_height;   /*< height of spu region */\r
+\r
     picture_t    *p_pic;  /*< pointer to picture to display */\r
     osd_button_t *p_visible; /*< shortcut to visible button */\r
-    \r
+\r
     vlc_bool_t b_menu_visible; /*< menu currently visible? */\r
     vlc_bool_t b_update;       /*< update OSD Menu when VLC_TRUE */\r
-    \r
+\r
     /* quick hack to volume state. */\r
     osd_button_t *p_volume; /*< pointer to volume range object. */\r
 };\r
@@ -224,16 +224,16 @@ struct osd_menu_state_t
 struct osd_menu_t\r
 {\r
     VLC_COMMON_MEMBERS\r
-    \r
-    int     i_x;        /*< x-position of OSD Menu on the video screen */ \r
-    int     i_y;        /*< y-position of OSD Menu on the video screen */ \r
-    int     i_width;    /*< width of OSD Menu on the video screen */ \r
-    int     i_height;   /*< height of OSD Menu on the video screen */ \r
-    \r
+\r
+    int     i_x;        /*< x-position of OSD Menu on the video screen */\r
+    int     i_y;        /*< y-position of OSD Menu on the video screen */\r
+    int     i_width;    /*< width of OSD Menu on the video screen */\r
+    int     i_height;   /*< height of OSD Menu on the video screen */\r
+\r
     char             *psz_path;  /*< directory where OSD menu images are stored */\r
     osd_button_t     *p_button;  /*< doubly linked list of buttons */\r
     osd_menu_state_t *p_state;   /*< current state of OSD menu */\r
-        \r
+\r
     /* quick link in the linked list. */\r
     osd_button_t  *p_last_button; /*< pointer to last button in the list */\r
 };\r
@@ -257,11 +257,11 @@ VLC_EXPORT( void, __osd_MenuDelete, ( vlc_object_t *, osd_menu_t * ) );
 /**\r
  * Change state on an osd_button_t.\r
  *\r
- * This function selects the specified state and returns a pointer to it. The \r
- * following states are currently supported: \r
+ * This function selects the specified state and returns a pointer to it. The\r
+ * following states are currently supported:\r
  * \see OSD_BUTTON_UNSELECT\r
- * \see OSD_BUTTON_SELECT   \r
- * \see OSD_BUTTON_PRESSED  \r
+ * \see OSD_BUTTON_SELECT\r
+ * \see OSD_BUTTON_PRESSED\r
  */\r
 VLC_EXPORT( osd_state_t *, __osd_StateChange, ( osd_state_t *, const int ) );\r
 \r
@@ -272,11 +272,11 @@ VLC_EXPORT( osd_state_t *, __osd_StateChange, ( osd_state_t *, const int ) );
 /**\r
  * Show the OSD menu.\r
  *\r
- * Show the OSD menu on the video output or mux it into the stream. \r
- * Every change to the OSD menu will now be visible in the output. An output \r
+ * Show the OSD menu on the video output or mux it into the stream.\r
+ * Every change to the OSD menu will now be visible in the output. An output\r
  * can be a video output window or a stream (\see stream output)\r
  */\r
-VLC_EXPORT( void, __osd_MenuShow, ( vlc_object_t * ) ); \r
+VLC_EXPORT( void, __osd_MenuShow, ( vlc_object_t * ) );\r
 \r
 /**\r
  * Hide the OSD menu.\r
@@ -289,7 +289,7 @@ VLC_EXPORT( void, __osd_MenuHide, ( vlc_object_t * ) );
  * Activate the action of this OSD menu item.\r
  *\r
  * The rc interface command "menu select" triggers the sending of an hotkey action\r
- * to the hotkey interface. The hotkey that belongs to the current highlighted \r
+ * to the hotkey interface. The hotkey that belongs to the current highlighted\r
  * OSD menu item will be used.\r
  */\r
 VLC_EXPORT( void, __osd_MenuActivate,   ( vlc_object_t * ) );\r
@@ -305,7 +305,7 @@ VLC_EXPORT( void, __osd_MenuActivate,   ( vlc_object_t * ) );
  * Note: The actual position on screen of the menu item is determined by the the\r
  * OSD menu configuration file.\r
  */\r
-VLC_EXPORT( void, __osd_MenuNext, ( vlc_object_t * ) ); \r
+VLC_EXPORT( void, __osd_MenuNext, ( vlc_object_t * ) );\r
 \r
 /**\r
  * Previous OSD menu item\r
@@ -319,7 +319,7 @@ VLC_EXPORT( void, __osd_MenuPrev, ( vlc_object_t * ) );
 /**\r
  * OSD menu item above\r
  *\r
- * Select the OSD menu item above the current item to be highlighted. \r
+ * Select the OSD menu item above the current item to be highlighted.\r
  * Note: The actual position on screen of the menu item is determined by the the\r
  * OSD menu configuration file.\r
  */\r
@@ -366,7 +366,7 @@ static inline const osd_menu_state_t *osd_GetMenuState( osd_menu_t *p_osd )
 static inline vlc_bool_t osd_GetKeyPressed( osd_menu_t *p_osd )\r
 {\r
     return( p_osd->p_state->b_update );\r
-}       \r
+}\r
 \r
 /**\r
  * Set the key pressed to a value.\r
@@ -376,9 +376,9 @@ static inline vlc_bool_t osd_GetKeyPressed( osd_menu_t *p_osd )
 static inline void osd_SetKeyPressed( vlc_object_t *p_this, int i_value )\r
 {\r
     vlc_value_t val;\r
-    \r
-    val.i_int = i_value;    \r
-    var_Set( p_this, "key-pressed", val );            \r
+\r
+    val.i_int = i_value;\r
+    var_Set( p_this, "key-pressed", val );\r
 }\r
 \r
 /**\r
@@ -389,8 +389,8 @@ static inline void osd_SetKeyPressed( vlc_object_t *p_this, int i_value )
 static inline void osd_SetMenuVisible( osd_menu_t *p_osd, vlc_bool_t b_value )\r
 {\r
     vlc_value_t val;\r
-    \r
-    val.b_bool = p_osd->p_state->b_menu_visible = b_value; \r
+\r
+    val.b_bool = p_osd->p_state->b_menu_visible = b_value;\r
     var_Set( p_osd, "osd-menu-visible", val );\r
 }\r
 \r
@@ -405,7 +405,7 @@ static inline void osd_SetMenuUpdate( osd_menu_t *p_osd, vlc_bool_t b_value )
 \r
     val.b_bool = p_osd->p_state->b_update = b_value;\r
     var_Set( p_osd, "osd-menu-update", val );\r
-} \r
+}\r
 \r
 /**\r
  * Textual feedback\r
@@ -413,7 +413,7 @@ static inline void osd_SetMenuUpdate( osd_menu_t *p_osd, vlc_bool_t b_value )
  * Functions that provide the textual feedback on the OSD. They are shown on hotkey commands. The feedback\r
  * is also part of the osd_button_t object. The types are declared in the include file\r
  * include/vlc_osd.h\r
- * @see vlc_osd.h \r
+ * @see vlc_osd.h\r
  */\r
 VLC_EXPORT( int, osd_ShowTextRelative, ( spu_t *, int, char *, text_style_t *, int, int, int, mtime_t ) );\r
 VLC_EXPORT( int, osd_ShowTextAbsolute, ( spu_t *, int, char *, text_style_t *, int, int, int, mtime_t, mtime_t ) );\r
@@ -425,7 +425,7 @@ VLC_EXPORT( void,osd_Message, ( spu_t *, int, char *, ... ) );
  * Functions that provide the default OSD feedback images on hotkey commands. These feedback\r
  * images are also part of the osd_button_t object. The types are declared in the include file\r
  * include/vlc_osd.h\r
- * @see vlc_osd.h \r
+ * @see vlc_osd.h\r
  */\r
 VLC_EXPORT( int, osd_Slider, ( vlc_object_t *, spu_t *, int, int, int, int, short ) );\r
 VLC_EXPORT( int, osd_Icon, ( vlc_object_t *, spu_t *, int, int, int, short ) );\r