\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
* 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
* 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
* 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
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
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
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
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
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
/**\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
/**\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
* 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
* 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
/**\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
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
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
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
\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
* 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
* 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
{
if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
dup_opts += wxT("dst=std{access=file,mux=");
- dup_opts += encapsulation + wxT(",url=\"");
+ dup_opts += encapsulation + wxT(",dst=\"");
dup_opts += file_combo->GetValue() + wxT("\"}");
}
if( access_checkboxes[HTTP_ACCESS_OUT]->IsChecked() )
{
if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
dup_opts += wxT("dst=std{access=http,mux=");
- dup_opts += encapsulation + wxT(",url=");
+ dup_opts += encapsulation + wxT(",dst=");
dup_opts += net_addrs[HTTP_ACCESS_OUT]->GetLineText(0);
dup_opts += wxString::Format( wxT(":%d"),
net_ports[HTTP_ACCESS_OUT]->GetValue() );
dup_opts += wxT("dst=std{access=mmsh,mux=");
dup_opts += encapsulation;
if( i_encapsulation_type == ASF_ENCAPSULATION ) dup_opts += wxT("h");
- dup_opts += wxT(",url=");
+ dup_opts += wxT(",dst=");
dup_opts += net_addrs[MMSH_ACCESS_OUT]->GetLineText(0);
dup_opts += wxString::Format( wxT(":%d"),
net_ports[MMSH_ACCESS_OUT]->GetValue() );
{
if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
dup_opts += wxT("dst=std{access=rtp,mux=");
- dup_opts += encapsulation + wxT(",url=");
+ dup_opts += encapsulation + wxT(",dst=");
wxString rtp_addr = net_addrs[RTP_ACCESS_OUT]->GetLineText(0);
if ((rtp_addr[0u] != '[') && (rtp_addr.Find(':') != -1))
{
if( !dup_opts.IsEmpty() ) dup_opts += wxT(",");
dup_opts += wxT("dst=std{access=udp,mux=");
- dup_opts += encapsulation + wxT(",url=");
+ dup_opts += encapsulation + wxT(",dst=");
wxString udp_addr = net_addrs[UDP_ACCESS_OUT]->GetLineText(0);
if ((udp_addr[0u] != '[') && (udp_addr.Find(':') != -1))