Commit 4b2db5bc authored by Clément Stenac's avatar Clément Stenac

* modules/control/joystick.c

	* Allow the user to remap the actions.
	* Improved the strings (please check)
	* Prevent 0 seconds seeks

* share/http/*.html
	* partial HTML validation fixes
	* Improved the look

* src/stream_output/announce.c
	* minor fixes (thanks sam)
parent fa06cb36
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* joystick.c: control vlc with a joystick * joystick.c: control vlc with a joystick
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: joystick.c,v 1.1 2003/07/20 08:30:41 zorglub Exp $ * $Id: joystick.c,v 1.2 2003/07/31 08:18:30 zorglub Exp $
* *
* Authors: Clément Stenac <zorglub@via.ecp.fr> * Authors: Clément Stenac <zorglub@via.ecp.fr>
* *
...@@ -48,12 +48,17 @@ ...@@ -48,12 +48,17 @@
/* Default values for parameters */ /* Default values for parameters */
#define DEFAULT_MAX_SEEK 10 /* seconds */ #define DEFAULT_MAX_SEEK 10 /* seconds */
#define DEFAULT_REPEAT 100000 #define DEFAULT_REPEAT 100
#define DEFAULT_WAIT 500000 #define DEFAULT_WAIT 500
#define DEFAULT_DEVICE "/dev/input/js0" #define DEFAULT_DEVICE "/dev/input/js0"
#define DEFAULT_THRESHOLD 12000 /* 0 -> 32767 */ #define DEFAULT_THRESHOLD 12000 /* 0 -> 32767 */
/* Actions #define DEFAULT_MAPPING \
"{axis-0-up=forward,axis-0-down=back," \
"axis-1-up=next,axis-1-down=prev," \
"butt-1-down=play,butt-2-down=fullscreen}"
/* Default Actions (used if there are missing actions in the default
* Available actions are: Next,Prev, Forward,Back,Play,Fullscreen,dummy */ * Available actions are: Next,Prev, Forward,Back,Play,Fullscreen,dummy */
#define AXE_0_UP_ACTION Forward #define AXE_0_UP_ACTION Forward
#define AXE_0_DOWN_ACTION Back #define AXE_0_DOWN_ACTION Back
...@@ -107,21 +112,22 @@ struct intf_sys_t ...@@ -107,21 +112,22 @@ struct intf_sys_t
* Local prototypes. * Local prototypes.
*****************************************************************************/ *****************************************************************************/
int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
void Close ( vlc_object_t * ); static void Close ( vlc_object_t * );
static int Init ( intf_thread_t *p_intf ); static int Init ( intf_thread_t *p_intf );
int handle_event ( intf_thread_t *p_intf, struct js_event event);
static int handle_event ( intf_thread_t *p_intf, struct js_event event );
/* Actions */ /* Actions */
int Next (intf_thread_t *p_intf); static int Next (intf_thread_t *p_intf);
int Prev (intf_thread_t *p_intf); static int Prev (intf_thread_t *p_intf);
int Back (intf_thread_t *p_intf); static int Back (intf_thread_t *p_intf);
int Forward (intf_thread_t *p_intf); static int Forward (intf_thread_t *p_intf);
int Play (intf_thread_t *p_intf); static int Play (intf_thread_t *p_intf);
int Fullscreen (intf_thread_t *p_intf); static int Fullscreen (intf_thread_t *p_intf);
int dummy (intf_thread_t *p_intf); static int dummy (intf_thread_t *p_intf);
/* Exported functions */ /* Exported functions */
static void Run ( intf_thread_t *p_intf ); static void Run ( intf_thread_t *p_intf );
...@@ -131,31 +137,34 @@ static void Run ( intf_thread_t *p_intf ); ...@@ -131,31 +137,34 @@ static void Run ( intf_thread_t *p_intf );
*****************************************************************************/ *****************************************************************************/
#define THRESHOLD_TEXT N_( "Motion threshold" ) #define THRESHOLD_TEXT N_( "Motion threshold" )
#define THRESHOLD_LONGTEXT N_( \ #define THRESHOLD_LONGTEXT N_( \
"the amount of joystick movement required for a movement to be" \ "The amount of joystick movement required for a movement to be " \
"recorded" ) "recorded (0->32767)" )
#define DEVICE_TEXT N_( "Joystick device" ) #define DEVICE_TEXT N_( "Joystick device" )
#define DEVICE_LONGTEXT N_( \ #define DEVICE_LONGTEXT N_( \
"the device for the joystick (usually /dev/jsX or /dev/input/jsX" \ "The joystick device (usually /dev/js0 or /dev/input/js0)")
"with X the number of the joystick" )
#define REPEAT_TEXT N_( "Repeat time" ) #define REPEAT_TEXT N_( "Repeat time" )
#define REPEAT_LONGTEXT N_( \ #define REPEAT_LONGTEXT N_( \
"the time waited before the action is repeated if it is still trigered" \ "The time waited before the action is repeated if it is still trigered, " \
"in miscroseconds" ) "in milliseconds" )
#define WAIT_TEXT N_( "Wait before repeat time") #define WAIT_TEXT N_( "Wait time")
#define WAIT_LONGTEXT N_(\ #define WAIT_LONGTEXT N_(\
" the time waited before the repeat starts, in microseconds") "The time waited before the repeat starts, in milliseconds ")
#define SEEK_TEXT N_( "Max seek interval") #define SEEK_TEXT N_( "Max seek interval")
#define SEEK_LONGTEXT N_(\ #define SEEK_LONGTEXT N_(\
" the number of seconds that will be seeked if the axis "\ "The maximum number of seconds that will be seeked at a time." )
"is pushed at its maximum" )
#define MAP_TEXT N_( "Action mapping")
#define MAP_LONGTEXT N_(\
"Allows you to remap the actions. For details," \
" please have a look at http://wiki.videolan.org/index.php/Joystick" )
vlc_module_begin(); vlc_module_begin();
add_category_hint( N_( "Joystick" ), NULL, VLC_FALSE ); add_category_hint( N_( "Joystick" ), NULL, VLC_FALSE );
add_integer( "motion-threshold", 15000, NULL, add_integer( "motion-threshold", DEFAULT_THRESHOLD , NULL,
THRESHOLD_TEXT, THRESHOLD_LONGTEXT, VLC_TRUE ); THRESHOLD_TEXT, THRESHOLD_LONGTEXT, VLC_TRUE );
add_string( "joystick-device", DEFAULT_DEVICE , NULL, add_string( "joystick-device", DEFAULT_DEVICE , NULL,
DEVICE_TEXT, DEVICE_LONGTEXT, VLC_TRUE ); DEVICE_TEXT, DEVICE_LONGTEXT, VLC_TRUE );
...@@ -165,15 +174,17 @@ vlc_module_begin(); ...@@ -165,15 +174,17 @@ vlc_module_begin();
WAIT_TEXT, WAIT_LONGTEXT, VLC_TRUE ); WAIT_TEXT, WAIT_LONGTEXT, VLC_TRUE );
add_integer ("joystick-max-seek",DEFAULT_MAX_SEEK,NULL, add_integer ("joystick-max-seek",DEFAULT_MAX_SEEK,NULL,
SEEK_TEXT, SEEK_LONGTEXT, VLC_TRUE ); SEEK_TEXT, SEEK_LONGTEXT, VLC_TRUE );
add_string("joystick-mapping",DEFAULT_MAPPING,NULL,
MAP_TEXT,MAP_LONGTEXT, VLC_TRUE );
set_description( _("joystick control interface") ); set_description( _("joystick control interface") );
set_capability( "interface", 0 ); set_capability( "interface", 0 );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
vlc_module_end(); vlc_module_end();
/***************************************************************************** /*****************************************************************************
* OpenIntf: initialize interface * Open: initialize interface
*****************************************************************************/ *****************************************************************************/
int Open ( vlc_object_t *p_this ) static int Open ( vlc_object_t *p_this )
{ {
intf_thread_t *p_intf = (intf_thread_t *)p_this; intf_thread_t *p_intf = (intf_thread_t *)p_this;
...@@ -191,9 +202,9 @@ int Open ( vlc_object_t *p_this ) ...@@ -191,9 +202,9 @@ int Open ( vlc_object_t *p_this )
} }
/***************************************************************************** /*****************************************************************************
* CloseIntf: destroy the interface * Close: destroy the interface
*****************************************************************************/ *****************************************************************************/
void Close ( vlc_object_t *p_this ) static void Close ( vlc_object_t *p_this )
{ {
intf_thread_t *p_intf = (intf_thread_t *)p_this; intf_thread_t *p_intf = (intf_thread_t *)p_this;
...@@ -289,6 +300,8 @@ static void Run( intf_thread_t *p_intf ) ...@@ -289,6 +300,8 @@ static void Run( intf_thread_t *p_intf )
static int Init( intf_thread_t * p_intf ) static int Init( intf_thread_t * p_intf )
{ {
char *psz_device; char *psz_device;
char *psz_parse;
char *psz_eof; /* end of field */
if( !p_intf->b_die ) if( !p_intf->b_die )
{ {
...@@ -308,10 +321,10 @@ static int Init( intf_thread_t * p_intf ) ...@@ -308,10 +321,10 @@ static int Init( intf_thread_t * p_intf )
return -1; return -1;
} }
p_intf->p_sys->i_repeat = p_intf->p_sys->i_repeat = 1000*
config_GetInt( p_intf, "joystick-repeat"); config_GetInt( p_intf, "joystick-repeat");
p_intf->p_sys->i_wait = p_intf->p_sys->i_wait = 1000*
config_GetInt( p_intf, "joystick-wait"); config_GetInt( p_intf, "joystick-wait");
p_intf->p_sys->i_threshold = p_intf->p_sys->i_threshold =
...@@ -324,21 +337,80 @@ static int Init( intf_thread_t * p_intf ) ...@@ -324,21 +337,80 @@ static int Init( intf_thread_t * p_intf )
p_intf->p_sys->i_maxseek = p_intf->p_sys->i_maxseek =
config_GetInt( p_intf, "joystick-max-seek" ); config_GetInt( p_intf, "joystick-max-seek" );
p_intf->p_sys->axes[0].pf_actup = AXE_0_UP_ACTION;
p_intf->p_sys->axes[0].pf_actdown = AXE_0_DOWN_ACTION; psz_parse = config_GetPsz( p_intf, "joystick-mapping" ) ;
p_intf->p_sys->axes[0].b_trigered = VLC_FALSE;
p_intf->p_sys->axes[0].l_time = 0; if ( ! psz_parse)
{
p_intf->p_sys->axes[1].pf_actup = AXE_1_UP_ACTION; msg_Warn (p_intf,"Invalid mapping. Aborting" );
p_intf->p_sys->axes[1].pf_actdown = AXE_1_DOWN_ACTION; return -1;
p_intf->p_sys->axes[1].b_trigered = VLC_FALSE; }
p_intf->p_sys->axes[1].l_time = 0; if( !strlen( psz_parse ) )
{
msg_Warn( p_intf, "Invalid mapping. Aborting" );
return -1;
}
p_intf->p_sys->axes[0].pf_actup = AXE_0_UP_ACTION;
p_intf->p_sys->axes[0].pf_actdown = AXE_0_DOWN_ACTION;
p_intf->p_sys->axes[1].pf_actup = AXE_1_UP_ACTION;
p_intf->p_sys->axes[1].pf_actdown = AXE_1_DOWN_ACTION;
p_intf->p_sys->buttons[0].pf_actdown = BUTTON_1_PRESS_ACTION; p_intf->p_sys->buttons[0].pf_actdown = BUTTON_1_PRESS_ACTION;
p_intf->p_sys->buttons[0].pf_actup = BUTTON_1_RELEASE_ACTION; p_intf->p_sys->buttons[0].pf_actup = BUTTON_1_RELEASE_ACTION;
p_intf->p_sys->buttons[1].pf_actdown = BUTTON_2_PRESS_ACTION; p_intf->p_sys->buttons[1].pf_actdown = BUTTON_2_PRESS_ACTION;
p_intf->p_sys->buttons[1].pf_actup = BUTTON_2_RELEASE_ACTION; p_intf->p_sys->buttons[1].pf_actup = BUTTON_2_RELEASE_ACTION;
/* Macro to parse the command line */
#define PARSE(name,function) \
if(!strncmp( psz_parse , name , strlen( name ) ) ) \
{ \
psz_parse += strlen( name ); \
psz_eof = strchr( psz_parse , ',' ); \
if( !psz_eof) \
psz_eof = strchr( psz_parse, '}' ); \
if( !psz_eof) \
psz_eof = psz_parse + strlen(psz_parse); \
if( psz_eof ) \
{ \
*psz_eof = '\0' ; \
} \
msg_Dbg(p_intf,"%s -> %s", name,psz_parse) ; \
if(!strcasecmp( psz_parse , "play" ) ) function = Play; \
if(!strcasecmp( psz_parse , "next" ) ) function = Next; \
if(!strcasecmp( psz_parse , "prev" ) ) function = Prev; \
if(!strcasecmp( psz_parse , "fullscreen" ) ) function = Fullscreen; \
if(!strcasecmp( psz_parse , "forward" ) ) function = Forward; \
if(!strcasecmp( psz_parse , "back" ) ) function = Back; \
psz_parse = psz_eof; \
psz_parse ++; \
continue; \
} \
while(1)
{
PARSE("axis-0-up=" ,p_intf->p_sys->axes[0].pf_actup );
PARSE("axis-0-down=" ,p_intf->p_sys->axes[0].pf_actdown );
PARSE("axis-1-up=" ,p_intf->p_sys->axes[1].pf_actup );
PARSE("axis-1-down=" ,p_intf->p_sys->axes[1].pf_actdown );
PARSE("butt-1-up=" ,p_intf->p_sys->buttons[0].pf_actup );
PARSE("butt-1-down=" ,p_intf->p_sys->buttons[0].pf_actdown );
PARSE("butt-2-up=" ,p_intf->p_sys->buttons[1].pf_actup );
PARSE("butt-2-down=" ,p_intf->p_sys->buttons[1].pf_actdown );
if( *psz_parse )
psz_parse++;
else
break;
}
p_intf->p_sys->axes[0].b_trigered = VLC_FALSE;
p_intf->p_sys->axes[0].l_time = 0;
p_intf->p_sys->axes[1].b_trigered = VLC_FALSE;
p_intf->p_sys->axes[1].l_time = 0;
vlc_mutex_unlock( &p_intf->change_lock ); vlc_mutex_unlock( &p_intf->change_lock );
return 0; return 0;
...@@ -352,7 +424,7 @@ static int Init( intf_thread_t * p_intf ) ...@@ -352,7 +424,7 @@ static int Init( intf_thread_t * p_intf )
/***************************************************************************** /*****************************************************************************
* handle_event : parse a joystick event and takes the appropriate action * * handle_event : parse a joystick event and takes the appropriate action *
*****************************************************************************/ *****************************************************************************/
int handle_event ( intf_thread_t *p_intf, struct js_event event) static int handle_event ( intf_thread_t *p_intf, struct js_event event)
{ {
unsigned int i_axe; unsigned int i_axe;
...@@ -363,7 +435,7 @@ int handle_event ( intf_thread_t *p_intf, struct js_event event) ...@@ -363,7 +435,7 @@ int handle_event ( intf_thread_t *p_intf, struct js_event event)
* triggering something */ * triggering something */
if( event.number == 2 && if( event.number == 2 &&
/* Try to avoid Parkinson joysticks */ /* Try to avoid Parkinson joysticks */
abs(event.value - p_intf->p_sys->axes[2].i_value) > 10 ) abs(event.value - p_intf->p_sys->axes[2].i_value) > 200 )
{ {
p_intf->p_sys->axes[2].i_value = event.value; p_intf->p_sys->axes[2].i_value = event.value;
msg_Dbg( p_intf , "Updating volume" ); msg_Dbg( p_intf , "Updating volume" );
...@@ -396,9 +468,9 @@ int handle_event ( intf_thread_t *p_intf, struct js_event event) ...@@ -396,9 +468,9 @@ int handle_event ( intf_thread_t *p_intf, struct js_event event)
} }
/* Special for seeking */ /* Special for seeking */
p_intf->p_sys->f_seconds = p_intf->p_sys->f_seconds = 1+
(abs(event.value)-p_intf->p_sys->i_threshold)* (abs(event.value)-p_intf->p_sys->i_threshold)*
p_intf->p_sys->i_maxseek/ (p_intf->p_sys->i_maxseek - 1 )/
(32767-p_intf->p_sys->i_threshold); (32767-p_intf->p_sys->i_threshold);
...@@ -441,10 +513,11 @@ int handle_event ( intf_thread_t *p_intf, struct js_event event) ...@@ -441,10 +513,11 @@ int handle_event ( intf_thread_t *p_intf, struct js_event event)
} }
/**************************************************************************** /****************************************************************************
* The possible actions * The actions
****************************************************************************/ ****************************************************************************/
int Next( intf_thread_t *p_intf) /* Go to next item in the playlist */
static int Next( intf_thread_t *p_intf)
{ {
playlist_t *p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, playlist_t *p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE ); FIND_ANYWHERE );
...@@ -457,7 +530,8 @@ int Next( intf_thread_t *p_intf) ...@@ -457,7 +530,8 @@ int Next( intf_thread_t *p_intf)
return 0; return 0;
} }
int Prev( intf_thread_t *p_intf) /* Go to previous item in the playlist */
static int Prev( intf_thread_t *p_intf)
{ {
playlist_t *p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, playlist_t *p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE ); FIND_ANYWHERE );
...@@ -470,29 +544,45 @@ int Prev( intf_thread_t *p_intf) ...@@ -470,29 +544,45 @@ int Prev( intf_thread_t *p_intf)
return 0; return 0;
} }
int Forward(intf_thread_t *p_intf) /* Seek forward */
static int Forward(intf_thread_t *p_intf)
{ {
msg_Dbg(p_intf,"Seeking %f seconds",p_intf->p_sys->f_seconds); if(p_intf->p_sys->p_input)
input_Seek( p_intf->p_sys->p_input, p_intf->p_sys->f_seconds, {
msg_Dbg(p_intf,"Seeking %f seconds",p_intf->p_sys->f_seconds);
input_Seek( p_intf->p_sys->p_input, p_intf->p_sys->f_seconds,
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR); INPUT_SEEK_SECONDS | INPUT_SEEK_CUR);
return 0; return 0;
}
return -1;
} }
int Back(intf_thread_t *p_intf) /* Seek backwards */
static int Back(intf_thread_t *p_intf)
{ {
msg_Dbg(p_intf,"Seeking %f seconds",p_intf->p_sys->f_seconds); if(p_intf->p_sys->p_input)
input_Seek( p_intf->p_sys->p_input, -(p_intf->p_sys->f_seconds), {
msg_Dbg(p_intf,"Seeking -%f seconds",p_intf->p_sys->f_seconds);
input_Seek( p_intf->p_sys->p_input, -(p_intf->p_sys->f_seconds),
INPUT_SEEK_SECONDS | INPUT_SEEK_CUR ); INPUT_SEEK_SECONDS | INPUT_SEEK_CUR );
return 0; return 0;
}
return -1;
} }
int Play(intf_thread_t *p_intf) /* Toggle Play/Pause */
static int Play(intf_thread_t *p_intf)
{ {
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE ); if(p_intf->p_sys->p_input)
return 0; {
input_SetStatus( p_intf->p_sys->p_input, INPUT_STATUS_PAUSE );
return 0;
}
return -1;
} }
int Fullscreen(intf_thread_t *p_intf) /* Toggle fullscreen mode */
static int Fullscreen(intf_thread_t *p_intf)
{ {
vout_thread_t * p_vout=vlc_object_find(p_intf, vout_thread_t * p_vout=vlc_object_find(p_intf,
VLC_OBJECT_VOUT, FIND_ANYWHERE ); VLC_OBJECT_VOUT, FIND_ANYWHERE );
...@@ -505,7 +595,7 @@ int Fullscreen(intf_thread_t *p_intf) ...@@ -505,7 +595,7 @@ int Fullscreen(intf_thread_t *p_intf)
} }
/* dummy event. Use it if you don't wan't anything to happen */ /* dummy event. Use it if you don't wan't anything to happen */
int dummy(intf_thread_t *p_intf) static int dummy(intf_thread_t *p_intf)
{ {
return 0; return 0;
} }
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</tr> </tr>
<p>This page is disabled (Change _directory_ into directory to enable it but you should think about security)</p> <p>This page is disabled (Change _directory_ into directory to enable it but you should think about security)</p>
<vlc id="rpn" param1="'dir' url_extract" /> <vlc id="rpn" param1="'dir' url_extract" />
<vlc id="foreach" param1="file" param2="_directory_" /> <vlc id="foreach" param1="file" param2="directory" />
<tr> <tr>
<td> <td>
<vlc id="if" param1="file.type value 'directory' strcmp 0 =" /> <vlc id="if" param1="file.type value 'directory' strcmp 0 =" />
......
<html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml10/DTD/xhtml10transitional.dtd">
<head>
<title>VLC Media Player - Admin</title> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>VLC Media Player</title>
<style>
body {font-family:Verdana, Arial, Sans Serif; }
h2 { text-align:center; }
td {border:1pt black solid;margin:0em; }
table.border {border:1pt black solid;}
div.section {background-color:#FFFFCC;
border:1pt black solid;
margin-bottom:2em;
padding:0.5em; }
div.section-ctr {background-color:#FFFFCC;
border:1pt black solid;
margin-bottom:2em;
padding:0.5em;
font-size:1.2em;
text-align:center; }
div.sectitle { background-color:#FFFF99;
color:#019;
border:1pt black solid;
width:20%;
font-weight:bold;}
tr.ligne1 { background-color:#FFFFEE; }
tr.ligne2 { background-color:#FFFFAA; }
</style>
<vlc id="if" param1="url_param"/> <vlc id="if" param1="url_param"/>
<meta http-equiv="refresh" content="0;URL=/admin/" /> <meta http-equiv="refresh" content="0;URL=/admin/" />
<vlc id="end" /> <vlc id="end" />
...@@ -9,15 +35,13 @@ ...@@ -9,15 +35,13 @@
<vlc id="set" param1="sout" param2="string" /> <vlc id="set" param1="sout" param2="string" />
</head> </head>
<body> <body>
<h2> <h2><a href="/">VLC Media Player - Admin <vlc id="value" param1="version" /></a></h2>
<center>
<a href="/">VLC Media Player - Admin <vlc id="value" param1="version" /></a> <form method="get" action=""> <input type="submit" name="control" value="shutdown" /> </form>
</center>
</h2>
<hr/>
<h3>Host list</h3> <div class="section-ctr">Shutdown VLC<br /> <form method="get" action=""> <input type="submit" name="control" value="shutdown" /> </form></div>
<table border="1" cellspacing="0" >
<div class="sectitle">Host list</div>
<div class="section">
<table class="border" >
<tr> <tr>
<th>Id</th><th>Host</th><th>IP</th><th>Port</th> <th>Id</th><th>Host</th><th>IP</th><th>Port</th>
</tr> </tr>
...@@ -30,14 +54,16 @@ ...@@ -30,14 +54,16 @@
</tr> </tr>
<vlc id="end" /> <vlc id="end" />
</table> </table>
</div>
<h3>File list</h3>
<div class="sectitle">File list</div>
<div class="section">
<table border="1" cellspacing="0" > <table border="1" cellspacing="0" >
<tr> <tr>
<th>Id</th><th>URL</th><th>Mime</th><th>Protected</th><th>usage</th> <th>Id</th><th>URL</th><th>Mime</th><th>Protected</th><th>usage</th>
</tr> </tr>
<vlc id="foreach" param1="url" param2="urls" /> <vlc id="foreach" param1="url" param2="urls" />
<vlc id="if" param1="url.stream 0 =" /> <vlc id="if" param1="url.stream 0 =" />
<tr> <tr>
<td><vlc id="value" param1="url.id" /></td> <td><vlc id="value" param1="url.id" /></td>
<td><vlc id="value" param1="url.url" /></td> <td><vlc id="value" param1="url.url" /></td>
...@@ -48,8 +74,11 @@ ...@@ -48,8 +74,11 @@
<vlc id="end" /> <vlc id="end" />
<vlc id="end" /> <vlc id="end" />
</table> </table>
</div>
<h3>Stream list</h3> <div class="sectitle">Stream list</div>
<div class="section">
<table border="1" cellspacing="0" > <table border="1" cellspacing="0" >
<tr> <tr>
<th>Id</th><th>URL</th><th>Mime</th><th>Protected</th><th>usage</th> <th>Id</th><th>URL</th><th>Mime</th><th>Protected</th><th>usage</th>
...@@ -66,8 +95,10 @@ ...@@ -66,8 +95,10 @@
<vlc id="end" /> <vlc id="end" />
<vlc id="end" /> <vlc id="end" />
</table> </table>
</div>
<h3>Connections list</h3> <div class="sectitle">Connections list</div>
<div class="section">
<table border="1" cellspacing="0" > <table border="1" cellspacing="0" >
<tr> <tr>
<th>Id</th><th>ip</th><th>URL</th><th>Status</th><th>Actions</th> <th>Id</th><th>ip</th><th>URL</th><th>Status</th><th>Actions</th>
...@@ -88,7 +119,7 @@ ...@@ -88,7 +119,7 @@
</tr> </tr>
<vlc id="end" /> <vlc id="end" />
</table> </table>
</div>
<hr /> <hr />
<p> <vlc id="value" param1="copyright" /> </p> <p> <vlc id="value" param1="copyright" /> </p>
</body> </body>
......
<html> <?xml version="1.0" encoding="iso-8859-1" ?>
<head> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml10/DTD/xhtml10transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>VLC Media Player</title> <title>VLC Media Player</title>
<style type="css">
body {font-family:Verdana, Arial, Sans Serif; }
h2 { text-align:center; }
table {width:100%;}
table.add {width:70%;}
div.section {background-color:#FFFFCC;
border:1pt black solid;
margin-bottom:2em;
padding:0.5em;}
div.sectitle { background-color:#FFFF99;
color:#019;
border:1pt black solid;
width:20%;
font-weight:bold;}
tr.ligne1 { background-color:#FFFFEE; }
tr.ligne2 { background-color:#FFFFAA; }
</style>
<vlc id="if" param1="url_param"/> <vlc id="if" param1="url_param"/>
<meta http-equiv="refresh" content="0;URL=/" /> <meta http-equiv="refresh" content="0;URL=/" />
<vlc id="end" /> <vlc id="end" />
<vlc id="control" param1="stop,pause,previous,next,add,sout,play" /> <vlc id="control" param1="stop,pause,previous,next,add,sout,play" />
<vlc id="set" param1="sout" param2="string" /> <vlc id="set" param1="sout" param2="string" />
</head> </head>
<body> <body>
<h2><center><a href="http://www.videolan.org">VLC Media Player <vlc id="value" param1="version" /></a> (http interface)</center></h2> <h2>
<hr/> <a href="http://www.videolan.org">VLC Media Player <vlc id="value" param1="version" /></a> (http interface)</h2>
<td> <div class="sectitle">Control VLC</div>
<form method="get" action=""> <div class="section">
<input type="submit" name="control" value="stop" /> <form method="get" action="">
<input type="submit" name="control" value="pause" /> <table class="add">
<input type="submit" name="control" value="previous" /> <tr>
<input type="submit" name="control" value="next" /> <td><input type="submit" name="control" value="stop" /></td>
<a href="info.html">infos</a> <td><input type="submit" name="control" value="pause" /></td>
</form> <td><input type="submit" name="control" value="previous" /></td>
</td> <td><input type="submit" name="control" value="next" /></td>
<br /> <td><a href="admin/">Administration</a></td>
<td> </tr>
<form method="get" action="" enctype="text/plain" > </table>
<input type="text" name="mrl" size="40" /> </form>
<input type="submit" name="control" value="add" /> </div>
</form> <div class="sectitle">Add</div>
</td> <div class="section">
<td> <form method="get" action="" enctype="text/plain" >
<form method="get" action="" enctype="text/plain" > <table class="add">
<input type="text" name="sout" size="30" value="<vlc id="get" param1="sout" param2="string" />" /> <tr>
<input type="submit" name="control" value="sout" /> <td>Add a MRL (Media Resource Locator) to the playlist</td>
</form> <td><input type="text" name="mrl" size="40" /></td>
</td> <td><input type="submit" name="control" value="add" /></td>
<hr/> </tr>
<p> <tr>
<td>Stream Output:</td>
<td><input type="text" name="sout" size="40" value="<vlc id="get" param1="sout" param2="string" />" /></td>
<td><input type="submit" name="control" value="sout" /></td>
</tr>
</table>
</form>
</div>
<div class="sectitle">VLC Playlist</div>
<div class="section">
<table>
<vlc id="foreach" param1="pl" param2="playlist" /> <vlc id="foreach" param1="pl" param2="playlist" />
<vlc id="if" param1="pl.current" /> <tr class="<vlc id="if" param1="2 pl.index % 0 =" />ligne1<vlc id="else" />ligne2<vlc id="end" />">
<td>
<vlc id="if" param1="pl.current" />
<b> <b>
<vlc id="end" /> <vlc id="end" />
<a href=?control=play&item=<vlc id="value" param1="pl.index" />><vlc id="value" param1="pl.index" /> - <vlc id="value" param1="pl.name" /></a> <br /> <a href="?control=play&item=<vlc id="value" param1="pl.index" />"><vlc id="value" param1="pl.index" /> - <vlc id="value" param1="pl.name" /></a> <vlc id="if" param1="pl.current" />
<vlc id="if" param1="pl.current" />
</b> </b>
<vlc id="end" /> <vlc id="end" />
</td></tr>
<vlc id="end" /> <vlc id="end" />
</p> </table>
</div>
<hr/> <hr/>
<p> <vlc id="value" param1="copyright" /> </p> <p> <vlc id="value" param1="copyright" /> </p>
</body> </body>
......
...@@ -46,8 +46,6 @@ ...@@ -46,8 +46,6 @@
# include <sys/socket.h> # include <sys/socket.h>
#endif #endif
#undef DEBUG_BUFFER
#include "announce.h" #include "announce.h"
#include "network.h" #include "network.h"
...@@ -375,14 +373,7 @@ void sout_SAPSend( sout_instance_t *p_sout, sap_session_t * p_sap ) ...@@ -375,14 +373,7 @@ void sout_SAPSend( sout_instance_t *p_sout, sap_session_t * p_sap )
if( i_size < 1024 ) /* We mustn't send packets larger than 1024B */ if( i_size < 1024 ) /* We mustn't send packets larger than 1024B */
{ {
if( p_sap->i_ip_version == 6 ) i_ret = send( p_sap->i_socket, psz_send, i_size, 0 );
{
i_ret = send( p_sap->i_socket, psz_send, i_size, 0 );
}
else
{
i_ret = send( p_sap->i_socket, psz_send, i_size, 0 );
}
} }
if( i_ret <= 0 ) if( i_ret <= 0 )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment