int i_socket_listen;
int i_socket;
char *psz_unix_path;
- vlc_bool_t b_extend;
#ifdef WIN32
HANDLE hConsoleIn;
#define HOST_TEXT N_("TCP command input")
#define HOST_LONGTEXT N_("Accept commands over a socket rather than stdin. " \
"You can set the address and port the interface will bind to." )
-#define EXTEND_TEXT N_("Extended help")
-#define EXTEND_LONGTEXT N_("List additional commands.")
#ifdef WIN32
#define QUIET_TEXT N_("Do not open a DOS command box interface")
#endif
vlc_module_begin();
+ set_shortname( _("RC"));
set_category( CAT_INTERFACE );
set_subcategory( SUBCAT_INTERFACE_GENERAL );
set_description( _("Remote control interface") );
#ifdef WIN32
add_bool( "rc-quiet", 0, NULL, QUIET_TEXT, QUIET_LONGTEXT, VLC_FALSE );
#endif
- add_bool( "rc-extend", 0, NULL, EXTEND_TEXT, EXTEND_LONGTEXT, VLC_FALSE );
set_capability( "interface", 20 );
set_callbacks( Activate, Deactivate );
char p_buffer[ MAX_LINE_LENGTH + 1 ];
vlc_bool_t b_showpos = config_GetInt( p_intf, "rc-show-pos" );
+ vlc_bool_t b_longhelp = VLC_FALSE;
int i_size = 0;
int i_oldpos = 0;
p_input = NULL;
p_playlist = NULL;
- p_intf->p_sys->b_extend = config_GetInt( p_intf, "rc-extend" );
/* Register commands that will be cleaned up upon object destruction */
var_Create( p_intf, "quit", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "quit", Quit, NULL );
var_AddCallback( p_intf, "mosaic-xoffset", Other, NULL );
var_Create( p_intf, "mosaic-yoffset", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-yoffset", Other, NULL );
+ var_Create( p_intf, "mosaic-align", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "mosaic-align", Other, NULL );
var_Create( p_intf, "mosaic-vborder", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-vborder", Other, NULL );
var_Create( p_intf, "mosaic-hborder", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_Create( p_intf, "time-size", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "time-size", Other, NULL );
+ /* logo on the fly items */
+ var_Create( p_intf, "logo-file", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "logo-file", Other, NULL );
+ var_Create( p_intf, "logo-x", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "logo-x", Other, NULL );
+ var_Create( p_intf, "logo-y", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "logo-y", Other, NULL );
+ var_Create( p_intf, "logo-position", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "logo-position", Other, NULL );
+ var_Create( p_intf, "logo-transparency", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
+ var_AddCallback( p_intf, "logo-transparency", Other, NULL );
+
+
var_Create( p_intf, "pause", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "pause", Input, NULL );
var_Create( p_intf, "seek", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
msg_rc( "%s\n", p_input->input.p_item->psz_name );
}
}
- else switch( psz_cmd[0] )
+ else if( !strcmp( psz_cmd, "longhelp" ) || !strncmp( psz_cmd, "h", 1 )
+ || !strncmp( psz_cmd, "H", 1 ) || !strncmp( psz_cmd, "?", 1 ) )
{
- case 'f':
- case 'F':
- if( p_input )
- {
- vout_thread_t *p_vout;
- p_vout = vlc_object_find( p_input,
- VLC_OBJECT_VOUT, FIND_CHILD );
-
- if( p_vout )
- {
- p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
- vlc_object_release( p_vout );
- }
- }
- break;
-
- case 's':
- case 'S':
- ;
- break;
-
- case '?':
- case 'h':
- case 'H':
+ if( !strcmp( psz_cmd, "longhelp" ) || !strncmp( psz_cmd, "H", 1 ) )
+ b_longhelp = VLC_TRUE;
+ else b_longhelp = VLC_FALSE;
+
msg_rc(_("+----[ Remote control commands ]\n"));
msg_rc( "| \n");
msg_rc(_("| add XYZ . . . . . . . . . . add XYZ to playlist\n"));
msg_rc(_("| achan [X]. . . . . . . . set/get audio channels\n"));
msg_rc( "| \n");
- if (p_intf->p_sys->b_extend)
+ if (b_longhelp)
{
msg_rc(_("| marq-marquee STRING . . overlay STRING in video\n"));
- msg_rc(_("| marq-x X . . . . . offset of marquee, from left\n"));
- msg_rc(_("| marq-y Y . . . . . . offset of marquee, from top\n"));
+ msg_rc(_("| marq-x X . . . . . . . . . . . .offset from left\n"));
+ msg_rc(_("| marq-y Y . . . . . . . . . . . . offset from top\n"));
msg_rc(_("| marq-position #. . . .relative position control\n"));
- msg_rc(_("| marq-color # . . . . font color of marquee, RGB\n"));
- msg_rc(_("| marq-opacity # . . . . . . . .opacity of marquee\n"));
- msg_rc(_("| marq-timeout T. . . . timeout of marquee, in ms\n"));
- msg_rc(_("| marq-size # . . . font size of marquee, in pixels\n"));
+ msg_rc(_("| marq-color # . . . . . . . . . . font color, RGB\n"));
+ msg_rc(_("| marq-opacity # . . . . . . . . . . . . . opacity\n"));
+ msg_rc(_("| marq-timeout T. . . . . . . . . . timeout, in ms\n"));
+ msg_rc(_("| marq-size # . . . . . . . . font size, in pixels\n"));
msg_rc( "| \n");
msg_rc(_("| time-format STRING . . . overlay STRING in video\n"));
- msg_rc(_("| time-x X . . . . .offset of timestamp, from left\n"));
- msg_rc(_("| time-y Y . . . . . offset of timestamp, from top\n"));
- msg_rc(_("| time-position #. . . .relative position control\n"));
- msg_rc(_("| time-color # . . . font color of timestamp, RGB\n"));
- msg_rc(_("| time-opacity # . . . . . . .opacity of timestamp\n"));
- msg_rc(_("| time-size # . .font size of timestamp, in pixels\n"));
+ msg_rc(_("| time-x X . . . . . . . . . . . .offset from left\n"));
+ msg_rc(_("| time-y Y . . . . . . . . . . . . offset from top\n"));
+ msg_rc(_("| time-position #. . . . . . . . relative position\n"));
+ msg_rc(_("| time-color # . . . . . . . . . . font color, RGB\n"));
+ msg_rc(_("| time-opacity # . . . . . . . . . . . . . opacity\n"));
+ msg_rc(_("| time-size # . . . . . . . . font size, in pixels\n"));
+ msg_rc( "| \n");
+ msg_rc(_("| logo-file STRING . . . the overlay file path/name\n"));
+ msg_rc(_("| logo-x X . . . . . . . . . . . .offset from left\n"));
+ msg_rc(_("| logo-y Y . . . . . . . . . . . . offset from top\n"));
+ msg_rc(_("| logo-position #. . . . . . . . relative position\n"));
+ msg_rc(_("| logo-transparency #. . . . . . . . .transparency\n"));
+ msg_rc( "| \n");
+ msg_rc(_("| mosaic-alpha # . . . . . . . . . . . . . . alpha\n"));
+ msg_rc(_("| mosaic-height #. . . . . . . . . . . . . .height\n"));
+ msg_rc(_("| mosaic-width # . . . . . . . . . . . . . . width\n"));
+ msg_rc(_("| mosaic-xoffset # . . . .top left corner position\n"));
+ msg_rc(_("| mosaic-yoffset # . . . .top left corner position\n"));
+ msg_rc(_("| mosaic-align 0..2,4..6,8..10. . .mosaic alignment\n"));
+ msg_rc(_("| mosaic-vborder # . . . . . . . . vertical border\n"));
+ msg_rc(_("| mosaic-hborder # . . . . . . . horizontal border\n"));
+ msg_rc(_("| mosaic-position {0=auto,1=fixed} . . . .position\n"));
+ msg_rc(_("| mosaic-rows #. . . . . . . . . . .number of rows\n"));
+ msg_rc(_("| mosaic-cols #. . . . . . . . . . .number of cols\n"));
+ msg_rc(_("| mosaic-keep-aspect-ratio {0,1} . . .aspect ratio\n"));
msg_rc( "| \n");
}
msg_rc(_("| help . . . . . . . . . . . . . this help message\n"));
+ msg_rc(_("| longhelp . . . . . . . . . a longer help message\n"));
msg_rc(_("| logout . . . . . exit (if in socket connection)\n"));
msg_rc(_("| quit . . . . . . . . . . . . . . . . . quit vlc\n"));
msg_rc( "| \n");
msg_rc(_("+----[ end of help ]\n"));
+ }
+ else switch( psz_cmd[0] )
+ {
+ case 'f':
+ case 'F':
+ if( p_input )
+ {
+ vout_thread_t *p_vout;
+ p_vout = vlc_object_find( p_input,
+ VLC_OBJECT_VOUT, FIND_CHILD );
+
+ if( p_vout )
+ {
+ p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
+ vlc_object_release( p_vout );
+ }
+ }
+ break;
+
+ case 's':
+ case 'S':
+ ;
break;
case '\0':
}
else if( !strcmp( psz_cmd, "mosaic-alpha" ) )
{
- if( strlen( newval.psz_string) > 0)
+ if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-alpha", val );
}
else if( !strcmp( psz_cmd, "mosaic-height" ) )
{
- if( strlen( newval.psz_string) > 0)
+ if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-height", val );
}
else if( !strcmp( psz_cmd, "mosaic-width" ) )
{
- if( strlen( newval.psz_string) > 0)
+ if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-width", val );
}
else if( !strcmp( psz_cmd, "mosaic-xoffset" ) )
{
- if( strlen( newval.psz_string) > 0)
+ if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-xoffset", val );
}
else if( !strcmp( psz_cmd, "mosaic-yoffset" ) )
{
- if( strlen( newval.psz_string) > 0)
+ if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-yoffset", val );
}
}
+ else if( !strcmp( psz_cmd, "mosaic-align" ) )
+ {
+ if( strlen( newval.psz_string ) > 0 )
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_inp->p_libvlc, "mosaic-align", val );
+ }
+ }
else if( !strcmp( psz_cmd, "mosaic-vborder" ) )
{
- if( strlen( newval.psz_string) > 0)
+ if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-vborder", val );
}
else if( !strcmp( psz_cmd, "mosaic-hborder" ) )
{
- if( strlen( newval.psz_string) > 0)
+ if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-hborder", val );
}
else if( !strcmp( psz_cmd, "mosaic-position" ) )
{
- if( strlen( newval.psz_string) > 0)
+ if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-position", val );
}
else if( !strcmp( psz_cmd, "mosaic-rows" ) )
{
- if( strlen( newval.psz_string) > 0)
+ if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-rows", val );
}
else if( !strcmp( psz_cmd, "mosaic-cols" ) )
{
- if( strlen( newval.psz_string) > 0)
+ if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-cols", val );
}
else if( !strcmp( psz_cmd, "mosaic-keep-aspect-ratio" ) )
{
- if( strlen( newval.psz_string) > 0)
+ if( strlen( newval.psz_string ) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-keep-aspect-ratio", val );
var_Set( p_inp->p_libvlc, "time-size", val );
}
}
+ else if( !strcmp( psz_cmd, "logo-file" ) )
+ {
+ if( strlen( newval.psz_string ) > 0 )
+ {
+ val.psz_string = newval.psz_string;
+ var_Set( p_inp->p_libvlc, "logo-file", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-x" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_inp->p_libvlc, "logo-x", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-y" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_inp->p_libvlc, "logo-y", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-position" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = atoi( newval.psz_string );
+ var_Set( p_inp->p_libvlc, "logo-position", val );
+ }
+ }
+ else if( !strcmp( psz_cmd, "logo-transparency" ) )
+ {
+ if( strlen( newval.psz_string ) > 0)
+ {
+ val.i_int = strtol( newval.psz_string, NULL, 0 );
+ var_Set( p_inp->p_libvlc, "logo-transparency", val );
+ }
+ }
/*
* sanity check